Exemplo n.º 1
0
 public void MakeTable(ref CustomStyleDataGrid dataGridView, int nYear, int nMonth)
 {
     try
     {
         dataGridView.ReadOnly = true;
         if (dataGridView.Rows.Count > 0)
         {
             int count = dataGridView.Rows.Count;
             while (count-- > 0)
             {
                 dataGridView.Rows.RemoveAt(0);
             }
         }
         DataTable table = new DataTable();
         table.Columns.Add("发票种类");
         table.Columns.Add("类别代码");
         table.Columns.Add("期初库存份数");
         table.Columns.Add("期初库存号码");
         table.Columns.Add("本期领购份数");
         table.Columns.Add("本期领购号码");
         table.Columns.Add("本期开具份数");
         table.Columns.Add("本期开具号码");
         table.Columns.Add("作废丢失份数");
         table.Columns.Add("作废丢失号码");
         table.Columns.Add("误售退回份数");
         table.Columns.Add("误售退回号码");
         table.Columns.Add("期末库存份数");
         table.Columns.Add("期末库存号码");
         List <InvVolume> invStockMonthStat = this.taxCard.GetInvStockMonthStat(nYear, nMonth);
         dataGridView.AllowUserToAddRows = false;
         for (int i = 0; i < invStockMonthStat.Count; i++)
         {
             string str = "";
             if (invStockMonthStat[i].InvType == null)
             {
                 str = "专用发票";
             }
             else if (invStockMonthStat[i].InvType == 2)
             {
                 str = "普通发票";
             }
             else if (invStockMonthStat[i].InvType == 11)
             {
                 str = "货物运输业增值税专用发票";
             }
             else if (invStockMonthStat[i].InvType == 12)
             {
                 str = "机动车销售统一发票";
             }
             object[] values = new object[] { str, invStockMonthStat[i].TypeCode, invStockMonthStat[i].PrdEarlyStockNum.ToString(), invStockMonthStat[i].PrdEarlyStockNO, invStockMonthStat[i].PrdThisBuyNum.ToString(), invStockMonthStat[i].PrdThisBuyNO, invStockMonthStat[i].PrdThisIssueNum.ToString(), invStockMonthStat[i].PrdThisIssueNO, invStockMonthStat[i].WasteNum.ToString(), invStockMonthStat[i].WasteNO, invStockMonthStat[i].MistakeNum.ToString(), invStockMonthStat[i].MistakeNO, invStockMonthStat[i].PrdEndStockNum.ToString(), invStockMonthStat[i].PrdEndStockNO };
             table.Rows.Add(values);
         }
         dataGridView.DataSource = table;
     }
     catch (Exception exception)
     {
         loger.Debug("exception:" + exception.Message);
         ExceptionHandler.HandleError(exception);
     }
 }
Exemplo n.º 2
0
 private void Initial()
 {
     this.InitializeComponent();
     this.customStyleDataGridDetail          = this.xmlComponentLoader1.GetControlByName <CustomStyleDataGrid>("customStyleDataGridDetail");
     this.customStyleDataGridDetail.ReadOnly = true;
     this.customStyleDataGridDetail.AllowUserToDeleteRows = false;
     this.customStyleDataGridDetail.set_AllowUserToResizeRows(false);
     this.customStyleDataGridDetail.set_ColumnHeadersHeightSizeMode(DataGridViewColumnHeadersHeightSizeMode.DisableResizing);
     this.toolStripMenu                             = this.xmlComponentLoader1.GetControlByName <ToolStrip>("toolStripMenu");
     this.toolStripButtonExit                       = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripButtonExit");
     this.toolStripButtonExit.Click                += new EventHandler(this.toolStripButtonExit_Click);
     this.toolStripButtonQuery                      = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripButtonQuery");
     this.toolStripButtonQuery.Visible              = false;
     this.toolStripButtonPrint                      = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripButtonPrint");
     this.toolStripButtonPrint.Click               += new EventHandler(this.toolStripButtonPrint_Click);
     this.toolStripButtonSum                        = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripButtonSum");
     this.toolStripButtonSum.Visible                = false;
     this.toolStripButtonForm                       = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripButtonForm");
     this.toolStripButtonForm.Click                += new EventHandler(this.toolStripButtonForm_Click);
     this.toolStripButtonRefresh                    = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripButtonRefresh");
     this.toolStripButtonRefresh.Click             += new EventHandler(this.toolStripButtonRefresh_Click);
     this.toolComboBox_yuefen                       = this.xmlComponentLoader1.GetControlByName <ToolStripComboBox>("toolComboBox_yuefen");
     this.toolLabel_yuefen                          = this.xmlComponentLoader1.GetControlByName <ToolStripLabel>("toolLabel_yuefen");
     this.toolComboBox_yuefen.SelectedIndexChanged += new EventHandler(this.toolComboBox_yuefen_SelectedIndexChanged);
 }
Exemplo n.º 3
0
 public ExcelSetPreviewForm(CustomStyleDataGrid dgvPreView)
 {
     this.InitializeComponent();
     base.Controls.Add(dgvPreView);
     dgvPreView.Dock    = DockStyle.Fill;
     dgvPreView.Visible = true;
 }
Exemplo n.º 4
0
 private void Initialize()
 {
     this.InitializeComponent();
     this.toolStrip1         = this.xmlComponentLoader1.GetControlByName <ToolStrip>("toolStrip1");
     this.toolStripButton1   = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripButton1");
     this.toolStripButton2   = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripButton2");
     this.toolStripButtonAdd = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripButtonAdd");
     this.toolStripButtonDel = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripButtonDel");
     this.toolStripBtnHSJG   = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripBtnHSJG");
     this.button1            = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("button1");
     this.button2            = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("button2");
     this.button3            = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("button3");
     this.textBox1           = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("textBox1");
     this.textBox2           = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("textBox2");
     this.textBox3           = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("textBox3");
     this.textBox4           = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("textBox4");
     this.textBox5           = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("textBox5");
     this.textBox6           = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("textBox6");
     this.textBox7           = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("textBox7");
     this.textBox8           = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("textBox8");
     this.textBox9           = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("textBox9");
     this.textBox10          = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("textBox10");
     this.textBox11          = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("textBox11");
     this.textBox12          = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("textBox12");
     this.textBox13          = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("textBox13");
     this.textBox15          = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("textBox15");
     this.textBox16          = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("textBox16");
     this.textBox17          = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("textBox17");
     this.dateTimePicker1    = this.xmlComponentLoader1.GetControlByName <DateTimePicker>("dateTimePicker1");
     this.dgFyxm             = this.xmlComponentLoader1.GetControlByName <CustomStyleDataGrid>("dgFyxm");
     this.colFyxm            = this.xmlComponentLoader1.GetControlByName <DataGridViewTextBoxColumn>("colFyxm");
     this.colJe = this.xmlComponentLoader1.GetControlByName <DataGridViewTextBoxColumn>("colJe");
     this.toolStripButton1.Click       += new EventHandler(this.QuitBtnClick);
     this.toolStripButton2.Click       += new EventHandler(this.SaveBtnClick);
     this.toolStripButtonAdd.Click     += new EventHandler(this.dataGridView_RowsAdded);
     this.toolStripButtonDel.Click     += new EventHandler(this.dataGridView_RowsRemoved);
     this.toolStripBtnHSJG.Click       += new EventHandler(this.HSJGBtnClick);
     this.toolStripBtnHSJG.CheckOnClick = true;
     this.toolStripBtnHSJG.Checked      = false;
     this.button1.Click         += new EventHandler(this.SHRMC_BtnClick);
     this.button2.Click         += new EventHandler(this.FHRMC_BtnClick);
     this.button3.Click         += new EventHandler(this.SPFMC_BtnClick);
     this.textBox16.KeyPress    += new KeyPressEventHandler(this.textBox16_KeyPress);
     this.textBox16.LostFocus   += new EventHandler(this.textBox16_LostFocus);
     base.FormClosing           += new FormClosingEventHandler(this.HYXSDJEdite_FormClosing);
     this.textBox1.TextChanged  += new EventHandler(this.textBox1_TextChanged);
     this.textBox2.TextChanged  += new EventHandler(this.textBox2_TextChanged);
     this.textBox3.TextChanged  += new EventHandler(this.textBox3_TextChanged);
     this.textBox4.TextChanged  += new EventHandler(this.textBox4_TextChanged);
     this.textBox5.TextChanged  += new EventHandler(this.textBox5_TextChanged);
     this.textBox6.TextChanged  += new EventHandler(this.textBox6_TextChanged);
     this.textBox7.TextChanged  += new EventHandler(this.textBox7_TextChanged);
     this.textBox8.TextChanged  += new EventHandler(this.textBox8_TextChanged);
     this.textBox9.TextChanged  += new EventHandler(this.textBox9_TextChanged);
     this.textBox10.TextChanged += new EventHandler(this.textBox10_TextChanged);
     this.textBox11.TextChanged += new EventHandler(this.textBox11_TextChanged);
     this.textBox12.TextChanged += new EventHandler(this.textBox12_TextChanged);
     this.textBox13.TextChanged += new EventHandler(this.textBox13_TextChanged);
     this.textBox17.TextChanged += new EventHandler(this.textBox17_TextChanged);
 }
Exemplo n.º 5
0
 public WSPZCXForm(FPLX fplx)
 {
     this.mfplx = fplx;
     this.InitializeComponent();
     this.btnQuery    = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("btnQuery");
     this.txtWspzh    = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txtWspzh");
     this.txtXfsh     = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txtXfsh");
     this.data_Jzrq   = this.xmlComponentLoader1.GetControlByName <DateTimePicker>("data_Jzrq");
     this.data_Qsrq   = this.xmlComponentLoader1.GetControlByName <DateTimePicker>("data_Qsrq");
     this.tool_select = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tool_select");
     this.tool_exit   = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tool_exit");
     this.tool_Args   = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tool_Args");
     this.dgSwdk      = this.xmlComponentLoader1.GetControlByName <CustomStyleDataGrid>("dgWspz");
     this.toolStrip1  = this.xmlComponentLoader1.GetControlByName <ToolStrip>("toolStrip1");
     ControlStyleUtil.SetToolStripStyle(this.toolStrip1);
     this.tool_exit.Click          += new EventHandler(this.BtnExit_Click);
     this.tool_select.Click        += new EventHandler(this.BtnSelect_Click);
     this.tool_Args.Click          += new EventHandler(this.BtnArgs_Click);
     this.btnQuery.Click           += new EventHandler(this.BtnSwdkFPFind_Click);
     this.dgSwdk.DoubleClick       += new EventHandler(this.BtnSelect_Click);
     this.txtWspzh.KeyPress        += new KeyPressEventHandler(this.txtWspzh_KeyPress);
     this.txtXfsh.KeyPress         += new KeyPressEventHandler(this.txtXfsh_KeyPress);
     this.txtWspzh.MaxLength        = 100;
     this.txtXfsh.MaxLength         = 20;
     this.dgSwdk.AllowUserToAddRows = false;
     this.dgSwdk.MultiSelect        = false;
     this.dgSwdk.SelectionMode      = DataGridViewSelectionMode.FullRowSelect;
     this.dgSwdk.ReadOnly           = true;
     this.SelectTimeBind();
     this.swdkFpLists = new List <SwdkFpxx>();
 }
Exemplo n.º 6
0
 private void Initialize()
 {
     this.InitializeComponent();
     this.dataGridView                    = this.xmlComponentLoader1.GetControlByName <CustomStyleDataGrid>("customStyleDataGrid1");
     this.toolStrip1                      = this.xmlComponentLoader1.GetControlByName <ToolStrip>("toolStrip1");
     this.label1                          = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("label1");
     this.label2                          = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("label2");
     this.labelReportType                 = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("labelReportType");
     this.labelFromFile                   = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("labelFromFile");
     this.groupBox1                       = this.xmlComponentLoader1.GetControlByName <AisinoGRP>("groupBox1");
     this.labelTotal                      = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("labelTotal");
     this.labelFail                       = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("labelFail");
     this.labelDuplicate                  = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("labelDuplicate");
     this.labelInvalid                    = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("labelInvalid");
     this.lableCorrect                    = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("lableCorrect");
     this.label10                         = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("label10");
     this.label9                          = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("label9");
     this.label8                          = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("label8");
     this.label7                          = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("label7");
     this.label6                          = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("label6");
     this.statusStrip1                    = this.xmlComponentLoader1.GetControlByName <StatusStrip>("statusStrip1");
     this.toolStripStatusLabel1           = this.xmlComponentLoader1.GetControlByName <ToolStripStatusLabel>("toolStripStatusLabel1");
     this.StatusLabel2                    = this.xmlComponentLoader1.GetControlByName <ToolStripStatusLabel>("StatusLabel2");
     this.toolStripStatusLabel2           = this.xmlComponentLoader1.GetControlByName <ToolStripStatusLabel>("toolStripStatusLabel2");
     this.StatusLabel3                    = this.xmlComponentLoader1.GetControlByName <ToolStripStatusLabel>("StatusLabel3");
     this.label5                          = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("label5");
     this.listView1                       = this.xmlComponentLoader1.GetControlByName <CustomListView>("listView1");
     this.toolStripPrint                  = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripPrint");
     this.toolStripSave                   = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripSave");
     this.toolStripPrint.Click           += new EventHandler(this.Print_Click);
     this.toolStripSave.Click            += new EventHandler(this.Save_Click);
     this.listView1.ItemSelectionChanged += new ListViewItemSelectionChangedEventHandler(this.listView1_ItemSelectionChanged);
 }
Exemplo n.º 7
0
 private void SetQingdanFormProp(Form qingdanForm, CustomStyleDataGrid dataGrid, ToolStripButton hsjbzButton, ToolStripButton zhekouButton, ToolStripButton addRowButton, ToolStripButton delRowButton)
 {
     this.hsjbzButton_qd         = hsjbzButton;
     this.hsjbzButton_qd.Checked = this._fpxx.Hsjbz;
     this.hsjbzButton_qd.Click  += new EventHandler(this.hsjbzButton_Click);
     this.dataGridView_qd        = dataGrid;
     this.SetDataGridPropEven(this.dataGridView_qd);
 }
Exemplo n.º 8
0
        private void _ShowDataGrid(CustomStyleDataGrid dataGridView1)
        {
            int count = this._fpxx.GetSpxxs().Count;

            for (int i = 0; i < count; i++)
            {
                this._ShowDataGrid(dataGridView1, this._fpxx.GetSpxx(i), i);
            }
        }
Exemplo n.º 9
0
 private void Initialize()
 {
     this.InitializeComponent();
     this.DraweeRB  = this.xmlComponentLoader1.GetControlByName <AisinoRDO>("Radio_BuyerSQ");
     this.CarrierRB = this.xmlComponentLoader1.GetControlByName <AisinoRDO>("Radio_SellerSQ");
     this.YDKRB     = this.xmlComponentLoader1.GetControlByName <AisinoRDO>("Radio_BuyerSQ_Ydk");
     this.WDKRB     = this.xmlComponentLoader1.GetControlByName <AisinoRDO>("Radio_BuyerSQ_Wdk");
     this.Carrier_MistakeRejectRB     = this.xmlComponentLoader1.GetControlByName <AisinoRDO>("Radio_SellerSQ_1");
     this.Carrier_MistakeNonDeliverRB = this.xmlComponentLoader1.GetControlByName <AisinoRDO>("Radio_SellerSQ_2");
     this.RenZRB                              = this.xmlComponentLoader1.GetControlByName <AisinoRDO>("Radio_BuyerSQ_Wdk_1");
     this.TaxcodeRB                           = this.xmlComponentLoader1.GetControlByName <AisinoRDO>("Radio_BuyerSQ_Wdk_2");
     this.InvCodeNoRB                         = this.xmlComponentLoader1.GetControlByName <AisinoRDO>("Radio_BuyerSQ_Wdk_3");
     this.GoodsRB                             = this.xmlComponentLoader1.GetControlByName <AisinoRDO>("Radio_BuyerSQ_Wdk_4");
     this.RenZRB.Enabled                      = false;
     this.TaxcodeRB.Enabled                   = false;
     this.InvCodeNoRB.Enabled                 = false;
     this.GoodsRB.Enabled                     = false;
     this.Carrier_MistakeRejectRB.Enabled     = false;
     this.Carrier_MistakeNonDeliverRB.Enabled = false;
     this.DraweeRB.Click                     += new EventHandler(this.DraweeRB_Click);
     this.CarrierRB.Click                    += new EventHandler(this.CarrierRB_Click);
     this.YDKRB.Click                        += new EventHandler(this.YDKRB_Click);
     this.WDKRB.Click                        += new EventHandler(this.WDKRB_Click);
     this.Carrier_MistakeRejectRB.Click      += new EventHandler(this.Carrier_MistakeRB_Click);
     this.Carrier_MistakeNonDeliverRB.Click  += new EventHandler(this.Carrier_MistakeRB_Click);
     this.RenZRB.Click                       += new EventHandler(this.WDK_SubItem_Click);
     this.TaxcodeRB.Click                    += new EventHandler(this.WDK_SubItem_Click);
     this.InvCodeNoRB.Click                  += new EventHandler(this.WDK_SubItem_Click);
     this.GoodsRB.Click                      += new EventHandler(this.WDK_SubItem_Click);
     this.InvKindCombo                        = this.xmlComponentLoader1.GetControlByName <AisinoCMB>("txt_fpzl");
     this.BtnNext                             = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("but_next");
     this.BtnOK                 = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("but_ok");
     this.BtnClose              = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("but_close");
     this.InvNumEdit            = this.xmlComponentLoader1.GetControlByName <TextBoxRegex>("txt_fphm");
     this.InvCodeEdit           = this.xmlComponentLoader1.GetControlByName <TextBoxRegex>("txt_fpdm");
     this.InvCodeEdit.KeyPress += new KeyPressEventHandler(this.InvCodeEdit_KeyPress);
     this.InvCodeEdit.MaxLength = 10;
     this.InvNumEdit.KeyPress  += new KeyPressEventHandler(this.InvNumEdit_KeyPress);
     this.InvNumEdit.MaxLength  = 8;
     this.DraweePanel           = this.xmlComponentLoader1.GetControlByName <AisinoPNL>("panel1");
     this.CarrierPanel          = this.xmlComponentLoader1.GetControlByName <AisinoPNL>("panel2");
     this.WDKPanel              = this.xmlComponentLoader1.GetControlByName <AisinoPNL>("panel1_2");
     this.panel3                = this.xmlComponentLoader1.GetControlByName <AisinoPNL>("panel3");
     this.panel4                = this.xmlComponentLoader1.GetControlByName <AisinoPNL>("panel4");
     this.lblInfo               = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("lblInfo");
     this.csdgBlueInvInfo       = this.xmlComponentLoader1.GetControlByName <CustomStyleDataGrid>("customStyleDataGrid1");
     this.GridShowHeaderInit();
     this.BtnClose.Click          += new EventHandler(this.btn_Close_Click);
     this.BtnNext.Click           += new EventHandler(this.btn_Next_Click);
     this.BtnOK.Click             += new EventHandler(this.btn_Ok_Click);
     this.InvCodeEdit.TextChanged += new EventHandler(this.txt_fphm_TextChanged);
     this.InvNumEdit.TextChanged  += new EventHandler(this.txt_fphm_TextChanged);
     this.panel5             = this.xmlComponentLoader1.GetControlByName <AisinoPNL>("panel5");
     base.Paint             += new PaintEventHandler(this.HySqdInfoSelect_Paint);
     base.Resize            += new EventHandler(this.HySqdInfoSelect_Resize);
     this.panel5.BorderStyle = BorderStyle.Fixed3D;
 }
Exemplo n.º 10
0
        private void _ShowDataGrid(CustomStyleDataGrid parent, Dictionary <SPXX, string> spxx, int index)
        {
            while ((parent.Rows.Count - 1) < index)
            {
                parent.Rows.Add();
            }
            FPLX   fplx = this._fpxx.Fplx;
            string str  = this._GetSLv(fplx, spxx[(SPXX)8], 0).ShowValue;

            if (((str != "") && (str == "0%")) && FLBM_lock.isFlbm())
            {
                if ((spxx[(SPXX)0x17] == "") || (spxx[(SPXX)0x17] == "3"))
                {
                    str = "0%";
                }
                if (spxx[(SPXX)0x17] == "1")
                {
                    str = "免税";
                }
                if (spxx[(SPXX)0x17] == "2")
                {
                    str = "不征税";
                }
            }
            else if (((str != "") && (str == "0%")) && !FLBM_lock.isFlbm())
            {
                str = "免税";
            }
            string          str2 = ((spxx[(SPXX)9].Length > 0) && (Math.Abs(double.Parse(spxx[(SPXX)9])) < 0.009)) ? "" : spxx[(SPXX)9];
            DataGridViewRow row  = parent.Rows[index];

            for (int i = 0; i < row.Cells.Count; i++)
            {
                string name = parent.Columns[i].Name;
                try
                {
                    if (name.Equals("SLV"))
                    {
                        row.Cells["SLV"].Value = str;
                    }
                    else if (name.Equals("SE"))
                    {
                        row.Cells["SE"].Value = str2;
                    }
                    else
                    {
                        row.Cells[name].Value = spxx[(SPXX)Enum.Parse(typeof(SPXX), name)];
                    }
                }
                catch (ArgumentException exception)
                {
                    this.log.Error("设置数据表格内容异常", exception);
                }
            }
            this._SetHzxx();
        }
Exemplo n.º 11
0
        private void _SetHsjxx(CustomStyleDataGrid dataGridView1, bool hsjbz)
        {
            string str = hsjbz ? "(含税)" : "(不含税)";

            if (dataGridView1.Columns["DJ"] != null)
            {
                char[] separator = new char[] { '(' };
                dataGridView1.Columns["DJ"].HeaderText = dataGridView1.Columns["DJ"].HeaderText.Split(separator)[0] + str;
            }
            if (dataGridView1.Columns["JE"] != null)
            {
                char[] chArray2 = new char[] { '(' };
                dataGridView1.Columns["JE"].HeaderText = dataGridView1.Columns["JE"].HeaderText.Split(chArray2)[0] + str;
            }
            this._fpxx.Hsjbz = hsjbz;
            if (this._fpxx.Qdbz)
            {
                if (this.dataGridView_qd != null)
                {
                    this._ShowDataGrid(dataGridView1);
                    if (this._DataGridView.Columns["DJ"] != null)
                    {
                        char[] chArray3 = new char[] { '(' };
                        this._DataGridView.Columns["DJ"].HeaderText = this._DataGridView.Columns["DJ"].HeaderText.Split(chArray3)[0] + str;
                    }
                    if (this._DataGridView.Columns["JE"] != null)
                    {
                        char[] chArray4 = new char[] { '(' };
                        this._DataGridView.Columns["JE"].HeaderText = this._DataGridView.Columns["JE"].HeaderText.Split(chArray4)[0] + str;
                    }
                }
                this._ShowDataGridMxxx(this._DataGridView);
            }
            else
            {
                this._ShowDataGrid(dataGridView1);
            }
            this.hsjbzButton.Checked = hsjbz;
            if (hsjbz)
            {
                this.hsjbzButton.Image = Resources.hanshuijiage_03;
                if (this.dataGridView_qd != null)
                {
                    this.qd.tool_jg.Image = Resources.hanshuijiage_03;
                }
            }
            else
            {
                this.hsjbzButton.Image = Resources.jiage_03;
                if (this.dataGridView_qd != null)
                {
                    this.qd.tool_jg.Image = Resources.jiage_03;
                }
            }
        }
Exemplo n.º 12
0
 public bool PrintTable(ref CustomStyleDataGrid dataGridView, string strTitle, List <PrinterItems> _PIHead, List <PrinterItems> _PIFoot)
 {
     try
     {
         return(DataGridPrintTools.Print(dataGridView, dataGridView.Parent, strTitle, _PIHead, _PIFoot, true));
     }
     catch (Exception exception)
     {
         ExceptionHandler.HandleError(exception);
         return(false);
     }
 }
Exemplo n.º 13
0
 private void Initialize()
 {
     this.InitializeComponent();
     base.MaximizeBox     = false;
     base.MinimizeBox     = false;
     base.FormBorderStyle = FormBorderStyle.FixedDialog;
     this.lblMsg          = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("lblMsg");
     this.btnOK           = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("btnOk");
     this.csdgList        = this.xmlComponentLoader1.GetControlByName <CustomStyleDataGrid>("csdgErrVolumn");
     this.btnOK.Click    += new EventHandler(this.btnOK_Click);
     this.gridSetting();
 }
Exemplo n.º 14
0
 private void Initialize()
 {
     this.InitializeComponent();
     this.csdgVolumns         = this.xmlComponentLoader1.GetControlByName <CustomStyleDataGrid>("csdgList");
     this.btnSetUpdate        = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("btn_SetUpdate");
     this.btnSyn              = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("btn_Syn");
     this.btnCancel           = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("btn_Cancel");
     this.btnSetUpdate.Click += new EventHandler(this.btnSetUpdate_Click);
     this.btnSyn.Click       += new EventHandler(this.btnSyn_Click);
     this.btnCancel.Click    += new EventHandler(this.btnCancel_Click);
     this.gridSetting();
 }
Exemplo n.º 15
0
        private void _ShowDataGridMxxx(CustomStyleDataGrid dataGridView1)
        {
            List <Dictionary <SPXX, string> > mxxxs = this._fpxx.GetMxxxs();

            if (mxxxs != null)
            {
                int count = mxxxs.Count;
                for (int i = 0; i < count; i++)
                {
                    this._ShowDataGrid(dataGridView1, mxxxs[i], i);
                }
            }
        }
Exemplo n.º 16
0
 public bool PrintTable(ref CustomStyleDataGrid dataGridView, string strTitle, List <PrinterItems> _PIHead, List <PrinterItems> _PIFoot, bool _bIsShow)
 {
     try
     {
         return(DataGridPrintToolsN.Print(dataGridView, dataGridView.Parent, strTitle, _PIHead, _PIFoot, _bIsShow));
     }
     catch (Exception exception)
     {
         this.loger.Info(exception.Message);
         ExceptionHandler.HandleError(exception);
         return(false);
     }
 }
Exemplo n.º 17
0
 private void SetHysyHsjxx(CustomStyleDataGrid dataGridView1, bool start)
 {
     if (start)
     {
         dataGridView1.Columns["DJ"].HeaderText = "单价(含税)";
         dataGridView1.Columns["JE"].HeaderText = "金额(不含税)";
         this.hsjbzButton.Click  -= new EventHandler(this.hsjbzButton_Click);
         this.hsjbzButton.Checked = true;
         this.hsjbzButton.Enabled = false;
         this.hsjbzButton.Click  += new EventHandler(this.hsjbzButton_Click);
         if (this._fpxx.Qdbz && (this.qd != null))
         {
             this._DataGridView.Columns["DJ"].HeaderText = "单价(含税)";
             this._DataGridView.Columns["JE"].HeaderText = "金额(不含税)";
             this.qd.tool_jg.Click  -= new EventHandler(this.hsjbzButton_Click);
             this.qd.tool_jg.Checked = true;
             this.qd.tool_jg.Enabled = false;
             this.qd.tool_jg.Click  += new EventHandler(this.hsjbzButton_Click);
         }
     }
     else
     {
         if (this._fpxx.Hsjbz)
         {
             dataGridView1.Columns["DJ"].HeaderText = "单价(含税)";
             dataGridView1.Columns["JE"].HeaderText = "金额(含税)";
         }
         else
         {
             dataGridView1.Columns["DJ"].HeaderText = "单价(不含税)";
             dataGridView1.Columns["JE"].HeaderText = "金额(不含税)";
         }
         this.hsjbzButton.Enabled = true;
         this.hsjbzButton.Checked = this._fpxx.Hsjbz;
         if (this._fpxx.Qdbz && (this.qd != null))
         {
             if (this._fpxx.Hsjbz)
             {
                 this._DataGridView.Columns["DJ"].HeaderText = "单价(含税)";
                 this._DataGridView.Columns["JE"].HeaderText = "金额(含税)";
             }
             else
             {
                 this._DataGridView.Columns["DJ"].HeaderText = "单价(不含税)";
                 this._DataGridView.Columns["JE"].HeaderText = "金额(不含税)";
             }
             this.qd.tool_jg.Enabled = true;
             this.qd.tool_jg.Checked = this._fpxx.Hsjbz;
         }
     }
 }
Exemplo n.º 18
0
        public string Search(ref CustomStyleDataGrid dataGridView)
        {
            string str = "";

            try
            {
                str = "";
            }
            catch (Exception exception)
            {
                this.loger.Info("search:" + exception.Message);
                ExceptionHandler.HandleError(exception);
            }
            return(str);
        }
Exemplo n.º 19
0
 public bool PrintTableSerial(ref CustomStyleDataGrid dataGridView, string strTitle, List <PrinterItems> _PIHead, List <PrinterItems> _PIFoot, bool _bIsShow, bool _isSerialPrint, string showText)
 {
     try
     {
         return(DataGridPrintToolsN.PrintSerial(dataGridView, dataGridView.Parent, strTitle, _PIHead, _PIFoot, _bIsShow, _isSerialPrint, showText));
     }
     catch (Exception exception)
     {
         this.loger.Info(exception.Message);
         if (exception.Message.Equals("用户放弃连续打印"))
         {
             throw exception;
         }
         return(false);
     }
 }
Exemplo n.º 20
0
 private void Initialize()
 {
     this.InitializeComponent();
     this.data_jsrq             = this.xmlComponentLoader1.GetControlByName <DateTimePicker>("data_jsrq");
     this.data_ksrq             = this.xmlComponentLoader1.GetControlByName <DateTimePicker>("data_ksrq");
     this.chkQS                 = this.xmlComponentLoader1.GetControlByName <AisinoCHK>("chkQS");
     this.chkJZ                 = this.xmlComponentLoader1.GetControlByName <AisinoCHK>("chkJZ");
     this.btnQuery              = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("btn_cx");
     this.btnFpxz               = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("btn_fpxz");
     this.csdgList              = this.xmlComponentLoader1.GetControlByName <CustomStyleDataGrid>("csdgList");
     this.chkQS.CheckedChanged += new EventHandler(this.chkQS_CheckedChanged);
     this.chkJZ.CheckedChanged += new EventHandler(this.chkJZ_CheckedChanged);
     this.btnQuery.Click       += new EventHandler(this.btnQuery_Click);
     this.btnFpxz.Click        += new EventHandler(this.btnFpxz_Click);
     this.gridSetting();
 }
Exemplo n.º 21
0
 private void Initialize()
 {
     this.InitializeComponent();
     this.toolStrip                     = this.xmlComponentLoader1.GetControlByName <ToolStrip>("toolStrip");
     this.tool_Close                    = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tool_Close");
     this.tool_Choose                   = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tool_Choose");
     this.tool_Default                  = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tool_Default");
     this.tool_Insert                   = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tool_Insert");
     this.tool_Update                   = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tool_Update");
     this.tool_Delete                   = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tool_Delete");
     this.pnl_Edit                      = this.xmlComponentLoader1.GetControlByName <AisinoPNL>("pnl_Edit");
     this.txt_Receiver                  = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txt_Receiver");
     this.txt_Cellphone                 = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txt_Cellphone");
     this.txt_Landline                  = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txt_Landline");
     this.txt_Postcode                  = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txt_Postcode");
     this.txt_Address                   = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txt_Address");
     this.rtxt_Memo                     = this.xmlComponentLoader1.GetControlByName <AisinoRTX>("rtxt_Memo");
     this.btn_InsertUpdate              = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("btn_InsertUpdate");
     this.btn_Reset                     = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("btn_Reset");
     this.btn_Indent                    = this.xmlComponentLoader1.GetControlByName <Button>("btn_Indent");
     this.csdgAddress                   = this.xmlComponentLoader1.GetControlByName <CustomStyleDataGrid>("csdgList");
     this.tool_Close.Click             += new EventHandler(this.tool_Close_Click);
     this.tool_Choose.Click            += new EventHandler(this.tool_Choose_Click);
     this.tool_Default.Click           += new EventHandler(this.tool_Default_Click);
     this.tool_Insert.Click            += new EventHandler(this.tool_Insert_Click);
     this.tool_Update.Click            += new EventHandler(this.tool_Update_Click);
     this.tool_Delete.Click            += new EventHandler(this.tool_Delete_Click);
     this.btn_Indent.Click             += new EventHandler(this.btn_Indent_Click);
     this.btn_InsertUpdate.Click       += new EventHandler(this.btn_InsertUpdate_Click);
     this.btn_Reset.Click              += new EventHandler(this.btn_Reset_Click);
     this.txt_Receiver.TextChanged     += new EventHandler(this.txt_Receiver_TextChanged);
     this.txt_Cellphone.TextChanged    += new EventHandler(this.txt_Cellphone_TextChanged);
     this.txt_Landline.TextChanged     += new EventHandler(this.txt_Landline_TextChanged);
     this.txt_Postcode.TextChanged     += new EventHandler(this.txt_Postcode_TextChanged);
     this.txt_Address.TextChanged      += new EventHandler(this.txt_Address_TextChanged);
     this.rtxt_Memo.TextChanged        += new EventHandler(this.rtxt_Memo_TextChanged);
     this.txt_Receiver.KeyPress        += new KeyPressEventHandler(this.txt_Receiver_KeyPress);
     this.txt_Cellphone.KeyPress       += new KeyPressEventHandler(this.txt_Cellphone_KeyPress);
     this.txt_Landline.KeyPress        += new KeyPressEventHandler(this.txt_Landline_KeyPress);
     this.txt_Postcode.KeyPress        += new KeyPressEventHandler(this.txt_Postcode_KeyPress);
     this.txt_Address.KeyPress         += new KeyPressEventHandler(this.txt_Address_KeyPress);
     this.rtxt_Memo.KeyPress           += new KeyPressEventHandler(this.rtxt_Memo_KeyPress);
     this.csdgAddress.MouseDoubleClick += new MouseEventHandler(this.csdgAddress_MouseDoubleClick);
     this.tool_Close.Margin             = new Padding(20, 1, 0, 2);
     ControlStyleUtil.SetToolStripStyle(this.toolStrip);
     this.gridSetting();
 }
Exemplo n.º 22
0
 private void Initialize()
 {
     this.InitializeComponent();
     this.toolStrip            = this.xmlComponentLoader1.GetControlByName <ToolStrip>("toolStrip");
     this.tool_Close           = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tool_Close");
     this.tool_Confirm         = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tool_Confirm");
     this.tool_Revoke          = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tool_Revoke");
     this.csdgStatusVolumn     = this.xmlComponentLoader1.GetControlByName <CustomStyleDataGrid>("csdgStatusVolumn");
     this.tool_Close.Click    += new EventHandler(this.tool_Close_Click);
     this.tool_Confirm.Click  += new EventHandler(this.tool_Confirm_Click);
     this.tool_Revoke.Click   += new EventHandler(this.tool_Revoke_Click);
     this.tool_Confirm.Visible = false;
     this.tool_Revoke.Visible  = false;
     this.tool_Close.Margin    = new Padding(20, 1, 0, 2);
     ControlStyleUtil.SetToolStripStyle(this.toolStrip);
     this.gridSetting();
 }
Exemplo n.º 23
0
        private void dataGridView_CellEndEdit(object sender, DataGridViewCellEventArgs e)
        {
            CustomStyleDataGrid grid = (CustomStyleDataGrid)sender;
            int    rowIndex          = e.RowIndex;
            int    columnIndex       = e.ColumnIndex;
            object obj2 = grid.Rows[rowIndex].Cells[columnIndex].Value;
            string s    = (obj2 == null) ? "" : obj2.ToString();

            if (columnIndex == 1)
            {
                double result = 0.0;
                if (!double.TryParse(s, out result))
                {
                    grid.Rows[rowIndex].Cells[columnIndex].Value = "";
                }
                this.UpdateJE();
            }
        }
Exemplo n.º 24
0
 private void Initialize()
 {
     this.InitializeComponent();
     base.MaximizeBox     = false;
     base.MinimizeBox     = false;
     base.FormBorderStyle = FormBorderStyle.FixedDialog;
     this.btnOK           = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("btnOk");
     this.btnExecute      = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("btnExecute");
     this.btnCancel       = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("btnCancel");
     this.lblMsg          = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("lblMsg");
     this.dgInvInfo       = this.xmlComponentLoader1.GetControlByName <CustomStyleDataGrid>("customStyleDataGrid1");
     this.dgInvInfo.AllowUserToDeleteRows = false;
     this.dgInvInfo.AutoSizeColumnsMode   = DataGridViewAutoSizeColumnsMode.Fill;
     this.dgInvInfo.set_GridStyle(1);
     this.btnOK.Click      += new EventHandler(this.btnOK_Click);
     this.btnExecute.Click += new EventHandler(this.btnExecute_Click);
     this.btnCancel.Click  += new EventHandler(this.btnCancel_Click);
 }
Exemplo n.º 25
0
 private void qingdanButton_Click(object sender, EventArgs e)
 {
     if (this._fpxx.Qdbz)
     {
         this._InitQingdanForm();
         this._ShowDataGridMxxx(this._DataGridView);
         this._DataGridView.ReadOnly = true;
         this.addRowButton.Enabled   = false;
         this.zhekouButton.Enabled   = false;
         this.delRowButton.Enabled   = false;
         this._ShowDataGrid(this.dataGridView_qd);
         if (this.qd != null)
         {
             this.qd.ShowDialog();
             this.qd = null;
         }
         this.dataGridView_qd = null;
     }
 }
Exemplo n.º 26
0
 private void SetDataGridPropEven(CustomStyleDataGrid obj)
 {
     obj.RowHeadersWidth = 0x19;
     for (int i = 0; i < obj.Columns.Count; i++)
     {
         obj.Columns[i].SortMode = DataGridViewColumnSortMode.NotSortable;
     }
     obj.AllowUserToAddRows = false;
     obj.ReadOnly           = true;
     obj.GridStyle          = CustomStyle.invWare;
     obj.BorderStyle        = BorderStyle.FixedSingle;
     if ((int)this.mFplx == 2)
     {
         this._DataGridView.GridColor = Color.DodgerBlue;
     }
     else
     {
         this._DataGridView.GridColor = Color.Black;
     }
 }
Exemplo n.º 27
0
 private void Initialize()
 {
     this.InitializeComponent();
     this.data_jsrq                = this.xmlComponentLoader1.GetControlByName <DateTimePicker>("data_jsrq");
     this.data_ksrq                = this.xmlComponentLoader1.GetControlByName <DateTimePicker>("data_ksrq");
     this.chkQS                    = this.xmlComponentLoader1.GetControlByName <AisinoCHK>("chkQS");
     this.chkJZ                    = this.xmlComponentLoader1.GetControlByName <AisinoCHK>("chkJZ");
     this.btnQuery                 = this.xmlComponentLoader1.GetControlByName <AisinoBTN>("btn_cx");
     this.cmbInvType               = this.xmlComponentLoader1.GetControlByName <AisinoCMB>("cmb_fpzl");
     this.cmbStatus                = this.xmlComponentLoader1.GetControlByName <AisinoCMB>("cmb_Slzt");
     this.txtApplyNo               = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("txt_slxh");
     this.csdgStatusVolumn         = this.xmlComponentLoader1.GetControlByName <CustomStyleDataGrid>("csdgStatusVolumn");
     this.cmbInvType.DropDownStyle = ComboBoxStyle.DropDownList;
     this.cmbStatus.DropDownStyle  = ComboBoxStyle.DropDownList;
     this.gridSetting();
     this.chkQS.CheckedChanged += new EventHandler(this.chkQS_CheckedChanged);
     this.chkJZ.CheckedChanged += new EventHandler(this.chkJZ_CheckedChanged);
     this.btnQuery.Click       += new EventHandler(this.btnQuery_Click);
     this.csdgStatusVolumn.CellContentClick += new DataGridViewCellEventHandler(this.csdgStatusVolumn_CellContentClick);
 }
Exemplo n.º 28
0
 private void Initialize()
 {
     this.InitializeComponent();
     this.FPZL        = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("FPZL");
     this.LBDM        = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("LBDM");
     this.QSHM        = this.xmlComponentLoader1.GetControlByName <AisinoLBL>("QSHM");
     this.FPZS        = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("FPZS");
     this.XH          = this.xmlComponentLoader1.GetControlByName <AisinoTXT>("XH");
     this.FPJ         = this.xmlComponentLoader1.GetControlByName <CustomStyleDataGrid>("FPJ");
     this.tool_exit   = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tool_exit");
     this.tool_select = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("tool_select");
     this.toolStrip1  = this.xmlComponentLoader1.GetControlByName <ToolStrip>("toolStrip1");
     ControlStyleUtil.SetToolStripStyle(this.toolStrip1);
     this.FPJ.MultiSelect     = false;
     this.FPJ.SelectionMode   = DataGridViewSelectionMode.FullRowSelect;
     this.FPJ.RowHeadersWidth = 30;
     this.FPJ.ReadOnly        = true;
     this.tool_exit.Click    += new EventHandler(this.tool_exit_Click);
     this.tool_select.Click  += new EventHandler(this.tool_select_Click);
 }
Exemplo n.º 29
0
 private void Initial()
 {
     this.InitializeComponent();
     this.customStyleDataGridDetail = this.xmlComponentLoader1.GetControlByName <CustomStyleDataGrid>("customStyleDataGridDetail");
     base.Load                          += new EventHandler(this.InvoiceResultForm_Load);
     this.toolStripMenu                  = this.xmlComponentLoader1.GetControlByName <ToolStrip>("toolStripMenu");
     this.toolStripButtonExit            = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripButtonExit");
     this.toolStripButtonExit.Click     += new EventHandler(this.toolStripButtonExit_Click);
     this.toolStripButtonQuery           = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripButtonQuery");
     this.toolStripButtonQuery.Click    += new EventHandler(this.toolStripButtonQuery_Click);
     this.toolStripButtonQuery.Enabled   = false;
     this.toolStripButtonPrint           = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripButtonPrint");
     this.toolStripButtonPrint.Click    += new EventHandler(this.toolStripButtonPrint_Click);
     this.toolStripButtonSum             = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripButtonSum");
     this.toolStripButtonSum.Click      += new EventHandler(this.toolStripButtonSum_Click);
     this.toolStripButtonSum.Enabled     = false;
     this.toolStripButtonForm            = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripButtonForm");
     this.toolStripButtonForm.Click     += new EventHandler(this.toolStripButtonForm_Click);
     this.toolStripButtonRefresh         = this.xmlComponentLoader1.GetControlByName <ToolStripButton>("toolStripButtonRefresh");
     this.toolStripButtonRefresh.Visible = false;
 }
Exemplo n.º 30
0
        private void dataGridView_CurrentCellChanged(object sender, EventArgs e)
        {
            CustomStyleDataGrid grid   = (CustomStyleDataGrid)sender;
            AisinoMultiCombox   combox = grid.Controls["SPMCBT"] as AisinoMultiCombox;

            if ((grid.CurrentCell != null) && !grid.CurrentRow.ReadOnly)
            {
                DataGridViewColumn owningColumn = grid.CurrentCell.OwningColumn;
                if (owningColumn.Name.Equals("colFyxm"))
                {
                    int       index     = owningColumn.Index;
                    int       rowIndex  = grid.CurrentCell.RowIndex;
                    Rectangle rectangle = grid.GetCellDisplayRectangle(index, rowIndex, false);
                    if (combox != null)
                    {
                        combox.Left   = rectangle.Left;
                        combox.Top    = rectangle.Top;
                        combox.Width  = rectangle.Width;
                        combox.Height = rectangle.Height;
                        combox.Text   = (grid.CurrentCell.Value == null) ? "" : grid.CurrentCell.Value.ToString();
                        DataTable table = combox.get_DataSource();
                        if (table != null)
                        {
                            table.Clear();
                        }
                        combox.Visible = true;
                        combox.Focus();
                    }
                }
                else if (combox != null)
                {
                    combox.Visible = false;
                }
            }
            else if (((grid.CurrentRow != null) && grid.CurrentRow.ReadOnly) && (combox != null))
            {
                combox.Visible = false;
            }
        }