private void btnEditShift_Click(object sender, EventArgs e) { if (selectedRow < 0) { string str = WorkingContext.LangManager.GetString("frmListShift_Edit_Messa"); string str1 = WorkingContext.LangManager.GetString("frmListShift_Edit_Title"); //MessageBox.Show("Bạn chưa chọn ca cần sửa!", "Sửa ca", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); MessageBox.Show(str, str1, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { frmShift shift = new frmShift(); shift.DsOverTime = dsShift; shift.CurrentShift = selectedRow; shift.ShowDialog(); PopulateShift(); } selectedRow = -1; tableModel1.Selections.Clear(); }
private void lvwShift_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left && e.Clicks == 2) { if (lvwShift.SelectedIndicies.Length > 0) { frmShift shift = new frmShift(); shift.DsOverTime = dsShift; shift.CurrentShift = selectedRow; shift.ShowDialog(); PopulateShift(); } selectedRow = -1; tableModel1.Selections.Clear(); } }
private void btnAddShift_Click(object sender, EventArgs e) { frmShift frm = new frmShift(); frm.ShowDialog(); PopulateShift(); selectedRow = -1; tableModel1.Selections.Clear(); }