private void btnAddNew_Click(object sender, EventArgs e) { frmHospital frm = new frmHospital(); 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) { frmHospital frm = new frmHospital(); 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 bệnh viện nào", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error); //MessageBox.Show(str, str1, MessageBoxButtons.OK, MessageBoxIcon.Error); } else { frmHospital frm = new frmHospital(); 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 bệnh viện nào", "Thông báo" ,MessageBoxButtons.OK,MessageBoxIcon.Error); //MessageBox.Show(str, str1, MessageBoxButtons.OK, MessageBoxIcon.Error); } else { frmHospital frm = new frmHospital(); frm.PositionDataSet = dsPosition; frm.SelectedPosition = selectedRowIndex; frm.ShowDialog(this); PopulatePositionListView(); } selectedRowIndex = -1; tableModel1.Selections.Clear(); }