Ejemplo n.º 1
0
        private void 新增ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            InDepartment AddDep = new InDepartment();

            AddDep._update = false;
            AddDep.ShowDialog(this);
        }
Ejemplo n.º 2
0
 private void 编辑ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (superGridControl1.GetSelectedRows().Count > 0)
     {
         Model.Department          dep = new Model.Department();
         SelectedElementCollection col = superGridControl1.GetSelectedRows();
         if (col.Count > 0)
         {
             GridRow gridRow = col[0] as GridRow;
             dep.Dt_Code     = gridRow["gridColumn2"].Value.ToString();
             dep.Dt_Name     = gridRow["gridColumn4"].Value.ToString();
             dep.Dt_RoleCode = gridRow["gridColumn3"].Value.ToString();
         }
         InDepartment updatedep = new InDepartment();
         updatedep._update     = true;
         updatedep._Department = dep;
         updatedep.ShowDialog(this);
     }
     else
     {
         MessageBox.Show("请先选择需要编辑的信息");
     }
 }