private void btnAddNew_Click(object sender, EventArgs e) { frmDepartmentGroup frm = new frmDepartmentGroup(); frm.PositionDataSet = dsPosition; frm.ShowDialog(this); PopulatePositionListView(); selectedRowIndex = -1; tableModel1.Selections.Clear(); }
private void lvwPosition_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left && e.Clicks == 2) { if (lvwPosition.SelectedItems.Length > 0) { frmDepartmentGroup frm = new frmDepartmentGroup(); frm.PositionDataSet = dsPosition; frm.SelectedPosition = selectedRowIndex; frm.ShowDialog(this); PopulatePositionListView(); } selectedRowIndex = -1; tableModel1.Selections.Clear(); } }
private void btnUpdate_Click(object sender, EventArgs e) { if (selectedRowIndex < 0) { //string str = WorkingContext.LangManager.GetString("frmPosition_UpDate_Error_Messa"); //string str1 = WorkingContext.LangManager.GetString("frmPosition_UpDate_Error_Title"); MessageBox.Show("Bạn chưa chọn nhóm phòng ban nào", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error); //MessageBox.Show(str, str1, MessageBoxButtons.OK, MessageBoxIcon.Error); } else { frmDepartmentGroup frm = new frmDepartmentGroup(); frm.PositionDataSet = dsPosition; frm.SelectedPosition = selectedRowIndex; frm.ShowDialog(this); PopulatePositionListView(); } selectedRowIndex = -1; tableModel1.Selections.Clear(); }