Beispiel #1
0
 private void 修改吊挂设备ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.gridView3.RowCount == 0 || this.gridView3.GetSelectedRows()[0] < 0)
         {
             MessageBox.Show("请选中要修改的行");
             return;
         }
         strOperationFlag = "modify";
         Dictionary <string, string> dic = new Dictionary <string, string>();
         dic.Add("设备编号", this.gridView3.GetRowCellValue(this.gridView3.FocusedRowHandle, this.gridView3.Columns[0]).ToString());
         dic.Add("设备名称", this.gridView3.GetRowCellValue(this.gridView3.FocusedRowHandle, this.gridView3.Columns[1]).ToString());
         FormHoistingEquipmentInfoEdit frm = new FormHoistingEquipmentInfoEdit(strOperationFlag, dic);
         frm.Owner = this;
         frm.ShowDialog();
         if (frm.DialogResult == DialogResult.OK)
         {
             FreshForm();
         }
     }
     catch (System.Exception ex)
     {
         MessageBox.Show("修改吊挂设备信息时发生错误!" + ex.Message, "提示信息");
         return;
     }
 }
Beispiel #2
0
        private void 添加吊挂设备ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                strOperationFlag = "add";
                FormHoistingEquipmentInfoEdit frm = new FormHoistingEquipmentInfoEdit(strOperationFlag, null);
                frm.Owner = this;
                frm.ShowDialog();

                if (frm.DialogResult == DialogResult.OK)
                {
                    FreshForm();
                }
            }
            catch (System.Exception ex)
            {
                MessageBox.Show("添加吊挂设备信息时发生错误!" + ex.Message, "提示信息");
                return;
            }
        }