// // 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())); }
// // 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; }
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; }
// // Cancel Change private void btCancel_Click(object sender, EventArgs e) { State = EnumStateAction.Cancel; setText(ed.getObject(gridView1.GetDataRow(gridView1.GetSelectedRows()[0])[0].ToString())); }