Example #1
0
 //
 // Edit Employee
 private void btEdit_Click(object sender, EventArgs e)
 {
     btCancel.Enabled      = true;
     grStatistical.Enabled = false;
     btApply.Enabled       = true;
     State = EnumStateAction.Update;
     setText(ed.getObject(gridView1.GetDataRow(gridView1.GetSelectedRows()[0])[0].ToString()));
 }
Example #2
0
 //
 // Add New Employee
 private void btAdd_Click(object sender, EventArgs e)
 {
     btCancel.Enabled = true;
     setText(new Employee());
     txID.Text             = MyAction.AutoIncreaseID("E", ed.EmployeeIdMax(), 5);
     grStatistical.Enabled = false;
     btApply.Enabled       = true;
     State = EnumStateAction.Insert;
 }
Example #3
0
 private void gridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
 {
     setText(ed.getObject(gridView1.GetDataRow(e.RowHandle)[0].ToString()));
     grStatistical.Enabled = true;
     State = EnumStateAction.Cancel;
 }
Example #4
0
 //
 // Cancel Change
 private void btCancel_Click(object sender, EventArgs e)
 {
     State = EnumStateAction.Cancel;
     setText(ed.getObject(gridView1.GetDataRow(gridView1.GetSelectedRows()[0])[0].ToString()));
 }