using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using Core.Mes.ClientFrameWork;
using Core.Mes.IBaseInterface;
using System.Data;
using System.Runtime.InteropServices;
using Core.XgMes.Client.JGKC.TurnoffSendManager;

namespace Core.XgMes.Client.JGKC.MaterialManager
{
    public partial class FrmAcppetSheetNew : Mes.ClientFrameWork.FrmBase
    {
        public FrmAcppetSheetNew()
        {
            InitializeComponent();
        }

        private void Cmb_wzdm_TextChanged(object sender, EventArgs e)
        {

        }
      



      


        private void Cmb_wzdm_DoubleClick(object sender, EventArgs e)
        {

        }

        private void Cmb_wzdm_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
        {
            FrmMaterialDaioageNew metaterial = new FrmMaterialDaioageNew();
            metaterial.StartPosition = FormStartPosition.CenterParent;
            metaterial.ShowDialog();
            Cmb_wzdm.Text = metaterial.strwzdm;
            txt_WZMC.Text = metaterial.strwzmc;
            txt_GGXH.Text = metaterial.strgg;
            txt_JLDW.Text = metaterial.strjldw;
            txt_CZ.Text = metaterial.strcz;
            txt_DZ.Text = metaterial.strdz;
            Cmb_CKDM.Text = metaterial.strckcode;
            cmb_StorageLB.Text = metaterial.strcklb;
            txt_CKMC.Text = metaterial.strckmc;
            ultraCombo1.Text = metaterial.strlbdm;
            ultraTextEditor42.Text = metaterial.strlbmc;
        }

        private void Cmb_CKDM_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
        {
            FrmDepotDialogNew depot = new FrmDepotDialogNew();
            depot.StartPosition = FormStartPosition.CenterParent;
            depot.ShowDialog();
            Cmb_CKDM.Text = depot.strckdm;
            cmb_StorageLB.Text = depot.strcklb;
            txt_CKMC.Text = depot.stckmc;

        }

        private void Cmd_GFCode_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
        {
            FrmProvlderDialog provlder = new FrmProvlderDialog();
            provlder.StartPosition = FormStartPosition.CenterParent;
            provlder.ShowDialog();
            Cmd_GFCode.Text = provlder.strgfdm;
            txt_GYMC.Text = provlder.strgfmc;
        }

        private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key)
            {
                case "Add":
                    Add("ADD");
                    break;
                case "Query":
                    DoQuery();
                    break;
                case "UPDATE":
                    Add("UPDATE");
                    break;
                    //break;
                case "Del":
                    Add("Del");
                    break;
                case "Export":
                    Export();
                    break;
                case "ZK":
                    Transefer();
                    break;
                case "Close":
                    this.Close();
                    break;

                    
            }
        }
        private void gd_CK_AfterRowActivate(object sender, EventArgs e)
        {
            try
            {
                if (this.gd_CK.Rows.Count > 0)
                {

                    this.txt_BH.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["SHEET_NO"].Value);//验收单号
                    Cmb_CKDM.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["STORE_CODE"].Value);//仓库代码
                    cmb_StorageLB.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["CATEGORY"].Value);//仓库类别
                    txt_CKMC.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["STORE_NAME"].Value);//仓库名称 
                    Cmb_wzdm.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["MATERIALS_CODE"].Value);//物资代码
                    txt_WZMC.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["MATERIALS_NAME"].Value);//物资名称 
                    txt_GGXH.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["SPECT"].Value);//规格型号 
                    txt_JLDW.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["UNIT"].Value);//计量单位
                    txt_CZ.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["MATERIALS"].Value);//材质
                    txt_DZ.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["WEIGHT"].Value);//单重
                    txt_Pactnobh.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["PACTNO_NO"].Value);//合同编号
                    txt_YSS.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["NUMBERS"].Value);//验收数量
                    txt_Moneny.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["MONMER"].Value);//金额
                    txt_Price.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["PRICE"].Value);//单价
                    Cmd_GFCode.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["PROVIDER_CODE"].Value);//供方代码
                    txt_GYMC.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["PROVIDER"].Value);//供方名称 
                    txt_Remark.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["REMARK"].Value);//备注
                    ultraComboEditor22.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["TAX"].Value);//税率
                    ultraTextEditor43.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["UNIT_PRICE"].Value);//含税单价
                    ultraCombo1.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["MATERIALS_LB_CODE"].Value);//类别代码
                    ultraTextEditor42.Text = Comm.ObjToStr(this.gd_CK.ActiveRow.Cells["MATERIALS_LB_NAME"].Value);//类别名称 





                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex.ToString());
            }
        }






        private void chk_AllowFilter_CheckedChanged(object sender, System.EventArgs e)
        {
            if (this.chk_AllowFilter.Checked)
            {
                this.gd_CK.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.True;
            }
            else
            {
                this.gd_CK.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;

            }

        }
	
        private void Export()
        {
            if (this.gd_CK.Rows.Count > 0)
            {
                Comm.ExPortExcel(this.gd_CK, this.excelExporter);
            }
            else
            {
                MessageBox.Show("无仓库代码信息数据，不能导出！", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

        }
        private void Transefer()
        {
            try
            {
                string strerr = "";

                System.Collections.ArrayList MetarilInfo = new ArrayList();


                /*if (strMode == "UPDATE")
                {
                    if (txt_BH.Text.Trim().ToString() == "")
                    {
                        MessageBox.Show("验收单号不能为空");
                        return;
                    }
                }*/
                /*if (this.txt_BH.Text.Trim().ToString().Substring(0,1)!="Y")
                {
                    MessageBox.Show("验收单号第一位请输入Y");
                    return;
                }*/
                MetarilInfo.Add(Comm.ObjToStr(this.txt_BH.Text.Trim().ToString()));//1 验收单号
                MetarilInfo.Add(Comm.ObjToStr(Convert.ToDateTime( this.date_YS.Value.ToString().Trim()).ToString("yyyyMMdd")));//2 验收日期
                MetarilInfo.Add(Comm.ObjToStr(this.Cmb_CKDM.Text.ToString().Trim()));//3 仓库代码
                MetarilInfo.Add(Comm.ObjToStr(this.cmb_StorageLB.Text.Trim().ToString()));//4 仓库类别
                MetarilInfo.Add(Comm.ObjToStr(this.txt_CKMC.Text.Trim().ToString()));//5 仓库名称
                MetarilInfo.Add(Comm.ObjToStr(this.Cmb_wzdm.Text.Trim().ToString()));//6 物资代码
                MetarilInfo.Add(Comm.ObjToStr(this.txt_WZMC.Text.Trim().ToString()));//7 物资名称
                MetarilInfo.Add(Comm.ObjToStr(this.txt_GGXH.Text.Trim().ToString()));//8 规格型号
                MetarilInfo.Add(Comm.ObjToStr(this.txt_JLDW.Text.Trim().ToString()));//9 计量单位
                MetarilInfo.Add(Comm.ObjToStr(this.txt_CZ.Text.Trim().ToString()));//10 材质
                MetarilInfo.Add(Comm.ObjToStr(this.txt_Pactnobh.Text.Trim().ToString()));//11 合同编号
                MetarilInfo.Add(Comm.ObjToStr(this.txt_YSS.Text.Trim().ToString()));//12 验收数量
                MetarilInfo.Add(Comm.ObjToStr(this.txt_Price.Text.Trim().ToString()));//13 单价
                MetarilInfo.Add(Comm.ObjToStr(this.txt_Moneny.Text.Trim().ToString()));//14 金额
                MetarilInfo.Add(Comm.ObjToStr(this.Cmd_GFCode.Text.Trim().ToString()));//15 供方代码
                MetarilInfo.Add(Comm.ObjToStr(this.txt_GYMC.Text.Trim().ToString()));//16 供方名称
                
                MetarilInfo.Add(Comm.ObjToStr(this.txt_Remark.Text.Trim().ToString()));//17 备注
        




                MetarilInfo.Add(ClientCommon._UserInfo.UserName.ToString());//18 操作人
                MetarilInfo.Add("ADD");//19 操作模式
                MetarilInfo.Add(txt_DZ.Text.Trim().ToString());//单重
                MetarilInfo.Add(Comm.ObjToStr(this.ultraCombo1.Text.Trim().ToString()));// 大类代码
                MetarilInfo.Add(Comm.ObjToStr(this.ultraTextEditor42.Text.Trim().ToString()));// 大类名称
                /*MetarilInfo.Add(ultraCombo1.Text.Trim().ToString());//大类代码
                MetarilInfo.Add(ultraTextEditor42.Text.Trim().ToString());//大类名称*/
                MetarilInfo.Add(Comm.ObjToStr(this.ultraTextEditor43.Text.Trim().ToString()));//含税单价
                MetarilInfo.Add(Comm.ObjToStr(this.ultraComboEditor22.Text.Trim().ToString()));//税率
                //object obj = new object();
                if (this.txt_CKMC.Text.Trim().ToString() == "3#" || this.txt_CKMC.Text.Trim().ToString()=="2#")
                {
                    MessageBox.Show("确定进行转库操作?", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    
                }
                else
                {
                    MessageBox.Show("转入的不是实物库，请重新选择库位信息", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                

                object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("BJZWWLStuff", "Core.XgMes.Server.JGKC.MaterialManager.Metarial",
                    "AccpetSheetAddNewZK", new object[] { MetarilInfo }, out strerr);
                if (obj != null && obj.ToString() == "1")
                {
                    MessageBox.Show("新增成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    DoQuery();
                }
                else
                {
                    MessageBox.Show(strerr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
            }
        }

        private void Add(string strMode)
        {
            try
            {
                string strerr = "";

                System.Collections.ArrayList MetarilInfo = new ArrayList();


                if (strMode == "UPDATE")
                {
                    if (txt_BH.Text.Trim().ToString() == "")
                    {
                        MessageBox.Show("验收单号不能为空");
                        return;
                    }
                }
                /*if (this.txt_BH.Text.Trim().ToString().Substring(0, 1) != "Y")
                {
                    MessageBox.Show("验收单号第一位请输入Y");
                    return;
                }*/
                MetarilInfo.Add(Comm.ObjToStr(this.txt_BH.Text.Trim().ToString()));//1 验收单号
                MetarilInfo.Add(Comm.ObjToStr(Convert.ToDateTime(this.date_YS.Value.ToString().Trim()).ToString("yyyyMMdd")));//2 验收日期
                MetarilInfo.Add(Comm.ObjToStr(this.Cmb_CKDM.Text.ToString().Trim()));//3 仓库代码
                MetarilInfo.Add(Comm.ObjToStr(this.cmb_StorageLB.Text.Trim().ToString()));//4 仓库类别
                MetarilInfo.Add(Comm.ObjToStr(this.txt_CKMC.Text.Trim().ToString()));//5 仓库名称
                MetarilInfo.Add(Comm.ObjToStr(this.Cmb_wzdm.Text.Trim().ToString()));//6 物资代码
                MetarilInfo.Add(Comm.ObjToStr(this.txt_WZMC.Text.Trim().ToString()));//7 物资名称
                MetarilInfo.Add(Comm.ObjToStr(this.txt_GGXH.Text.Trim().ToString()));//8 规格型号
                MetarilInfo.Add(Comm.ObjToStr(this.txt_JLDW.Text.Trim().ToString()));//9 计量单位
                MetarilInfo.Add(Comm.ObjToStr(this.txt_CZ.Text.Trim().ToString()));//10 材质
                MetarilInfo.Add(Comm.ObjToStr(this.txt_Pactnobh.Text.Trim().ToString()));//11 合同编号
                MetarilInfo.Add(Comm.ObjToStr(this.txt_YSS.Text.Trim().ToString()));//12 验收数量
                MetarilInfo.Add(Comm.ObjToStr(this.txt_Price.Text.Trim().ToString()));//13 单价
                MetarilInfo.Add(Comm.ObjToStr(this.txt_Moneny.Text.Trim().ToString()));//14 金额
                MetarilInfo.Add(Comm.ObjToStr(this.Cmd_GFCode.Text.Trim().ToString()));//15 供方代码
                MetarilInfo.Add(Comm.ObjToStr(this.txt_GYMC.Text.Trim().ToString()));//16 供方名称

                MetarilInfo.Add(Comm.ObjToStr(this.txt_Remark.Text.Trim().ToString()));//17 备注





                MetarilInfo.Add(ClientCommon._UserInfo.UserName.ToString());//18 操作人
                MetarilInfo.Add(strMode);//19 操作模式
                MetarilInfo.Add(txt_DZ.Text.Trim().ToString());//单重
                MetarilInfo.Add(Comm.ObjToStr(this.ultraCombo1.Text.Trim().ToString()));// 大类代码
                MetarilInfo.Add(Comm.ObjToStr(this.ultraTextEditor42.Text.Trim().ToString()));// 大类名称
                /*MetarilInfo.Add(ultraCombo1.Text.Trim().ToString());//大类代码
                MetarilInfo.Add(ultraTextEditor42.Text.Trim().ToString());//大类名称*/
                MetarilInfo.Add(Comm.ObjToStr(this.ultraTextEditor43.Text.Trim().ToString()));//含税单价
                MetarilInfo.Add(Comm.ObjToStr(this.ultraComboEditor22.Text.Trim().ToString()));//税率
                object obj = new object();
                if (this.txt_CKMC.Text.Trim().ToString() == "3#" || this.txt_CKMC.Text.Trim().ToString() == "2#")
                {
                    //入实物库
                    obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("BJZWWLStuff", "Core.XgMes.Server.JGKC.MaterialManager.Metarial",
                   "AccpetSheetAddNew", new object[] { MetarilInfo }, out strerr);
                }
                else
                {
                    //入虚拟库
                    obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("BJZWWLStuff", "Core.XgMes.Server.JGKC.MaterialManager.Metarial",
                   "AccpetSheetAddNewVR", new object[] { MetarilInfo }, out strerr);
                }

                /*object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("BJZWWLStuff", "Core.XgMes.Server.JGKC.MaterialManager.Metarial",
                    "AccpetSheetAddNew", new object[] { MetarilInfo }, out strerr);*/
                if (obj != null && obj.ToString() == "1")
                {
                    MessageBox.Show("新增成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    DoQuery();
                }
                else
                {
                    MessageBox.Show(strerr, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
            }
        }

        private void DoQuery()
        {
            string strWhere = "";
            string sql = "";
            if (chk_Time.Checked)
            {
                strWhere += " AND  ACCPECT_DATE >='" + Convert.ToDateTime(dte_BeginTime.Value.ToString()).ToString("yyyyMMdd") + "' AND ACCPECT_DATE <='" + Convert.ToDateTime(dte_EndTime.Value.ToString()).ToString("yyyyMMdd") + "'";
            }
            if (Chk_CKLB.Checked && txt_ckm.Text.Trim().Length>0)
            {
                strWhere += " AND CATEGORY LIKE '%" + txt_ckm.Text.Trim().ToString() + "%' ";
            }
            if (Chk_WZDM.Checked && txt_wzdm.Text.Trim().Length > 0)
            {
                strWhere += " AND MATERIALS_CODE LIKE '%" + txt_wzdm.Text.Trim().ToString() + "%' ";
            }
            if (chk_wz.Checked && txt_wz.Text.Trim().Length > 0)
            {
                strWhere += " AND materials_name LIKE '%" + txt_wz.Text.Trim().ToString() + "%' ";
            }
            if (chk_Spet.Checked && txt_Spet.Text.Trim().Length > 0)
            {
                strWhere += " AND spect LIKE '%" + txt_Spet.Text.Trim().ToString() + "%' ";
            }
            string err = "";
             sql = "select sheet_no,accpect_date,category,store_name,materials_code,materials_name,spect,unit, provider,"
                         + "pactno_no,numbers, price,monmer,materials,weight,input_recoder, input_date,store_code, remark,provider_code,tax,unit_price,materials_lb_code,materials_lb_name     "
                         +" from sheet_manager1 where isvalid='1' "+strWhere;
 
                           
            DataSet ds = (DataSet)ClientCommon._RemotingHelp.ExecuteMethod("BJZWStuff", "Core.XgMes.Server.JGKC.SteelPlateManager.Common", "GetDataSet", new object[] { sql }, out err);
            if (err == "")
            {
                gd_CK.DataSource = ds;
            }
        }

        private void FrmAcppetSheet_Load(object sender, EventArgs e)
        {
            dte_BeginTime.DateTime = DateTime.Now;
            dte_EndTime.DateTime = DateTime.Now;
            date_YS.DateTime = DateTime.Now;
            Init();
        }

        private void Chk_CKLB_CheckedChanged(object sender, EventArgs e)
        {
            txt_ckm.Enabled = Chk_CKLB.Checked;
        }

        private void Chk_WZDM_CheckedChanged(object sender, EventArgs e)
        {
            txt_wzdm.Enabled = Chk_WZDM.Checked;
        }

        private void Cmb_wzdm_Enter(object sender, EventArgs e)
        {

        }

        private void Cmb_wzdm_KeyDown(object sender, KeyEventArgs e)
        {

        }

        private void chk_wz_CheckedChanged(object sender, EventArgs e)
        {
            txt_wz.Enabled=chk_wz.Checked ;
        }

        private void chk_Spet_CheckedChanged(object sender, EventArgs e)
        {
            txt_Spet.Enabled=chk_Spet.Checked ;
        }

        private void ultraComboEditor22_TextChanged(object sender, EventArgs e)
        {
            if (this.txt_Price.Text.Trim().ToString() == "" || this.txt_YSS.Text.Trim().ToString() == "")
            {
                MessageBox.Show("请先输入验收数量和税前单价", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            string s_manei = this.ultraComboEditor22.Text.Trim().ToString().Replace("%","");
            this.ultraTextEditor43.Value = (Convert.ToDouble(this.ultraComboEditor22.Text.Trim().ToString().Replace("%", "")) / 100.0 +1)*
                   Convert.ToDouble(this.txt_Price.Text.Trim().ToString());
            this.txt_Moneny.Value = (Convert.ToDouble(this.ultraComboEditor22.Text.Trim().ToString().Replace("%", "")) / 100.0  +1)*
                   Convert.ToDouble(this.txt_Price.Text.Trim().ToString()) * Convert.ToDouble(this.txt_YSS.Text.Trim().ToString());    
        }

        private void ultraCombo1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
        {
            FrmMaterialLBDaioage metaterial = new FrmMaterialLBDaioage();
            metaterial.StartPosition = FormStartPosition.CenterParent;
            metaterial.ShowDialog();
            /*Cmb_wzdm.Text = metaterial.strwzdm;
            txt_WZMC.Text = metaterial.strwzmc;
            txt_GGXH.Text = metaterial.strgg;
            txt_JLDW.Text = metaterial.strjldw;
            txt_CZ.Text = metaterial.strcz;
            txt_DZ.Text = metaterial.strdz;
            Cmb_CKDM.Text = metaterial.strckcode;
            cmb_StorageLB.Text = metaterial.strcklb;
            txt_CKMC.Text = metaterial.strckmc;*/
            ultraCombo1.Text = metaterial.strwzdm;
            ultraTextEditor42.Text = metaterial.strwzmc;
        }

        private void txt_Price_Enter(object sender, EventArgs e)
        {

        }

        private void txt_Price_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode != Keys.Enter)

                return; //只对回车事件操作
            if (this.txt_YSS.Text.Trim().ToString() == "" || ultraComboEditor22.Text.ToString()=="")
            {
                MessageBox.Show("请先输入验收数量和税率", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            string s_manei = this.ultraComboEditor22.Text.Trim().ToString().Replace("%", "");
            this.ultraTextEditor43.Value = (Convert.ToDouble(this.ultraComboEditor22.Text.Trim().ToString().Replace("%", "")) / 100.0 + 1) *
                   Convert.ToDouble(this.txt_Price.Text.Trim().ToString());
            this.txt_Moneny.Value = (Convert.ToDouble(this.ultraComboEditor22.Text.Trim().ToString().Replace("%", "")) / 100.0 + 1) *
                   Convert.ToDouble(this.txt_Price.Text.Trim().ToString()) * Convert.ToDouble(this.txt_YSS.Text.Trim().ToString());
        }

        private void Init()
        {
            try
            {
                string strOut = "";
                string sql = "";
                DataSet ds;

                //审核人
                sql = "SELECT PROCUREMENT FROM KCJ_PROCUREMENT order by PROCUREMENT ";
                ds = (DataSet)ClientCommon._RemotingHelp.ExecuteMethod("BJZWStuff", "Core.XgMes.Server.JGKC.SteelPlateManager.Common", "GetDataSet", new object[] { sql }, out strOut);
                ds.Tables[0].TableName = "KCJ_PROCUREMENT";
                Cmb_Procure.DataSource = (DataSet)ds;
                Cmb_Procure.DisplayMember = "PROCUREMENT";

                Cmb_Procure.SelectedRow = null;





            }
            catch (Exception ex)
            {
            }
        }

        private void txt_YSS_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode != Keys.Enter)

                return; //只对回车事件操作
            if (this.txt_Price.Text.Trim().ToString() == "" || ultraComboEditor22.Text.ToString() == "")
            {
                MessageBox.Show("请先输入单价和税率", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            string s_manei = this.ultraComboEditor22.Text.Trim().ToString().Replace("%", "");
            this.ultraTextEditor43.Value = (Convert.ToDouble(this.ultraComboEditor22.Text.Trim().ToString().Replace("%", "")) / 100.0 + 1) *
                   Convert.ToDouble(this.txt_Price.Text.Trim().ToString());
            this.txt_Moneny.Value = (Convert.ToDouble(this.ultraComboEditor22.Text.Trim().ToString().Replace("%", "")) / 100.0 + 1) *
                   Convert.ToDouble(this.txt_Price.Text.Trim().ToString()) * Convert.ToDouble(this.txt_YSS.Text.Trim().ToString());
        }

        private void txt_WZMC_ValueChanged(object sender, EventArgs e)
        {

        }
    }
}