diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index 7cf51de..b6b9993 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -53,7 +53,7 @@ this.label5 = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); this.btnExitDev = new System.Windows.Forms.Button(); - this.label11 = new System.Windows.Forms.Label(); + this.labelTitle = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.channelFree = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.channel1 = new DevComponents.Editors.ComboItem(); @@ -438,7 +438,7 @@ // this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); this.panel1.Controls.Add(this.btnExitDev); - this.panel1.Controls.Add(this.label11); + this.panel1.Controls.Add(this.labelTitle); this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(600, 32); @@ -461,16 +461,16 @@ this.btnExitDev.UseVisualStyleBackColor = false; this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // - // label11 + // labelTitle // - this.label11.BackColor = System.Drawing.Color.Transparent; - this.label11.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label11.ForeColor = System.Drawing.Color.White; - this.label11.Location = new System.Drawing.Point(10, 5); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(155, 23); - this.label11.TabIndex = 0; - this.label11.Text = "添加送检仪器"; + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加送检仪器"; // // panel2 // @@ -700,7 +700,7 @@ private System.Windows.Forms.Label label5; private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Button btnExitDev; - private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label labelTitle; private System.Windows.Forms.Panel panel2; private DevComponents.DotNetBar.Controls.ComboBoxEx channelFree; private System.Windows.Forms.Label label4; diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index 7cf51de..b6b9993 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -53,7 +53,7 @@ this.label5 = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); this.btnExitDev = new System.Windows.Forms.Button(); - this.label11 = new System.Windows.Forms.Label(); + this.labelTitle = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.channelFree = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.channel1 = new DevComponents.Editors.ComboItem(); @@ -438,7 +438,7 @@ // this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); this.panel1.Controls.Add(this.btnExitDev); - this.panel1.Controls.Add(this.label11); + this.panel1.Controls.Add(this.labelTitle); this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(600, 32); @@ -461,16 +461,16 @@ this.btnExitDev.UseVisualStyleBackColor = false; this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // - // label11 + // labelTitle // - this.label11.BackColor = System.Drawing.Color.Transparent; - this.label11.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label11.ForeColor = System.Drawing.Color.White; - this.label11.Location = new System.Drawing.Point(10, 5); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(155, 23); - this.label11.TabIndex = 0; - this.label11.Text = "添加送检仪器"; + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加送检仪器"; // // panel2 // @@ -700,7 +700,7 @@ private System.Windows.Forms.Label label5; private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Button btnExitDev; - private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label labelTitle; private System.Windows.Forms.Panel panel2; private DevComponents.DotNetBar.Controls.ComboBoxEx channelFree; private System.Windows.Forms.Label label4; diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs index adaf61f..aac4b31 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs @@ -29,8 +29,8 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.tableDevList = new System.Windows.Forms.DataGridView(); this.panel2 = new System.Windows.Forms.Panel(); @@ -89,14 +89,14 @@ this.tableDevList.AllowUserToDeleteRows = false; this.tableDevList.AllowUserToResizeColumns = false; this.tableDevList.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.tableDevList.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.tableDevList.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.tableDevList.BackgroundColor = System.Drawing.Color.White; this.tableDevList.BorderStyle = System.Windows.Forms.BorderStyle.None; this.tableDevList.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; @@ -108,15 +108,15 @@ this.tableDevList.ReadOnly = true; this.tableDevList.RowHeadersVisible = false; this.tableDevList.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.tableDevList.RowsDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle2.NullValue = "-"; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.tableDevList.RowsDefaultCellStyle = dataGridViewCellStyle2; this.tableDevList.RowTemplate.Height = 44; this.tableDevList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.tableDevList.Size = new System.Drawing.Size(964, 480); @@ -566,6 +566,7 @@ this.btnEdit.TabIndex = 10; this.btnEdit.Text = "修改"; this.btnEdit.UseVisualStyleBackColor = true; + this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click); // // btnQuery // diff --git a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs index 7cf51de..b6b9993 100644 --- a/RbFreqStandMeasure/info/AddDevDlg.Designer.cs +++ b/RbFreqStandMeasure/info/AddDevDlg.Designer.cs @@ -53,7 +53,7 @@ this.label5 = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); this.btnExitDev = new System.Windows.Forms.Button(); - this.label11 = new System.Windows.Forms.Label(); + this.labelTitle = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.channelFree = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.channel1 = new DevComponents.Editors.ComboItem(); @@ -438,7 +438,7 @@ // this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); this.panel1.Controls.Add(this.btnExitDev); - this.panel1.Controls.Add(this.label11); + this.panel1.Controls.Add(this.labelTitle); this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(600, 32); @@ -461,16 +461,16 @@ this.btnExitDev.UseVisualStyleBackColor = false; this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); // - // label11 + // labelTitle // - this.label11.BackColor = System.Drawing.Color.Transparent; - this.label11.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - this.label11.ForeColor = System.Drawing.Color.White; - this.label11.Location = new System.Drawing.Point(10, 5); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(155, 23); - this.label11.TabIndex = 0; - this.label11.Text = "添加送检仪器"; + this.labelTitle.BackColor = System.Drawing.Color.Transparent; + this.labelTitle.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.labelTitle.ForeColor = System.Drawing.Color.White; + this.labelTitle.Location = new System.Drawing.Point(10, 5); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(155, 23); + this.labelTitle.TabIndex = 0; + this.labelTitle.Text = "添加送检仪器"; // // panel2 // @@ -700,7 +700,7 @@ private System.Windows.Forms.Label label5; private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Button btnExitDev; - private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label labelTitle; private System.Windows.Forms.Panel panel2; private DevComponents.DotNetBar.Controls.ComboBoxEx channelFree; private System.Windows.Forms.Label label4; diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs index adaf61f..aac4b31 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.Designer.cs @@ -29,8 +29,8 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); this.tableDevList = new System.Windows.Forms.DataGridView(); this.panel2 = new System.Windows.Forms.Panel(); @@ -89,14 +89,14 @@ this.tableDevList.AllowUserToDeleteRows = false; this.tableDevList.AllowUserToResizeColumns = false; this.tableDevList.AllowUserToResizeRows = false; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.tableDevList.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.tableDevList.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.tableDevList.BackgroundColor = System.Drawing.Color.White; this.tableDevList.BorderStyle = System.Windows.Forms.BorderStyle.None; this.tableDevList.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; @@ -108,15 +108,15 @@ this.tableDevList.ReadOnly = true; this.tableDevList.RowHeadersVisible = false; this.tableDevList.RowHeadersWidth = 30; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.NullValue = "-"; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.tableDevList.RowsDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle2.NullValue = "-"; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.tableDevList.RowsDefaultCellStyle = dataGridViewCellStyle2; this.tableDevList.RowTemplate.Height = 44; this.tableDevList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.tableDevList.Size = new System.Drawing.Size(964, 480); @@ -566,6 +566,7 @@ this.btnEdit.TabIndex = 10; this.btnEdit.Text = "修改"; this.btnEdit.UseVisualStyleBackColor = true; + this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click); // // btnQuery // diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index e7bbb25..2c0a4ef 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -501,7 +501,32 @@ private void btnDetail_Click(object sender, EventArgs e) { + int rowIndex = tableDevList.CurrentRow.Index; + int id = (int)tableDevList.Rows[rowIndex].Cells[8].Value; + MessageBox.Show(id.ToString()); + } + private void btnEdit_Click(object sender, EventArgs e) + { + int rowIndex = tableDevList.CurrentRow.Index; + int id = (int)tableDevList.Rows[rowIndex].Cells[8].Value; + string devName = (string)tableDevList.Rows[rowIndex].Cells[2].Value; + string devModel = (string)tableDevList.Rows[rowIndex].Cells[3].Value; + string devCode = (string)tableDevList.Rows[rowIndex].Cells[4].Value; + + AddDevDlg editDlg = new AddDevDlg(); + editDlg.Controls.Find("labelTitle", true)[0].Text = "修改送检仪器"; + editDlg.Controls.Find("inputDevName", true)[0].Text = devName; + editDlg.Controls.Find("inputDevModel", true)[0].Text = devModel; + editDlg.Controls.Find("inputDevCode", true)[0].Text = devCode; + + editDlg.HideMaskAction += () => + { + this.HideMask(); + }; + this.ShowMask(); + editDlg.StartPosition = FormStartPosition.CenterParent; // 指定窗口弹出在父窗口的中间位置 + editDlg.ShowDialog(); } } }