示例#1
0
文件: FormCarInfo.cs 项目: 16201320/-
 private void 修改车列ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.gridView2.RowCount == 0 || this.gridView2.GetSelectedRows()[0] < 0)
         {
             MessageBox.Show("请选中要修改的行");
             return;
         }
         strOperationFlag = "modify";
         Dictionary <string, string> dic = new Dictionary <string, string>();
         dic.Add("列号", this.gridView2.GetRowCellValue(this.gridView2.FocusedRowHandle, this.gridView2.Columns[0]).ToString());
         dic.Add("列名称", this.gridView2.GetRowCellValue(this.gridView2.FocusedRowHandle, this.gridView2.Columns[1]).ToString());
         FormLatheColumnEdit frm = new FormLatheColumnEdit(strOperationFlag, dic);
         frm.Owner = this;
         frm.ShowDialog();
         if (frm.DialogResult == DialogResult.OK)
         {
             FreshForm();
         }
     }
     catch (System.Exception ex)
     {
         MessageBox.Show("修改车列信息时发生错误!" + ex.Message, "提示信息");
         return;
     }
 }
示例#2
0
文件: FormCarInfo.cs 项目: 16201320/-
 private void 添加车列ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         strOperationFlag = "add";
         FormLatheColumnEdit frm = new FormLatheColumnEdit(strOperationFlag, null);
         frm.Owner = this;
         frm.ShowDialog();
         if (frm.DialogResult == DialogResult.OK)
         {
             FreshForm();
         }
     }
     catch (System.Exception ex)
     {
         MessageBox.Show("添加车列信息时发生错误!" + ex.Message, "提示信息");
         return;
     }
 }