예제 #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmPunish frmpunish = new frmPunish();

            frmpunish.DSPunish = dsPunish;
            frmpunish.ShowDialog();
            PopulateListPunish();
            selectedRowIndex = -1;
            tableModel1.Selections.Clear();
        }
예제 #2
0
 private void lvwListPunish_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left && e.Clicks == 2)
     {
         if (lvwListPunish.SelectedItems.Length > 0)
         {
             frmPunish frm = new frmPunish();
             frm.DSPunish      = dsPunish;
             frm.CurrentPunish = selectedRowIndex;
             frm.ShowDialog();
             PopulateListPunish();
         }
         selectedRowIndex = -1;
         tableModel1.Selections.Clear();
     }
 }
예제 #3
0
 private void btnModify_Click(object sender, EventArgs e)
 {
     if (selectedRowIndex < 0)
     {
         string str  = WorkingContext.LangManager.GetString("frmListPunish_Sua_Messa");
         string str1 = WorkingContext.LangManager.GetString("frmListPunish_Messa_Title");
         //MessageBox.Show("Không có nhân viên nào được chọn","Thông báo",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
         MessageBox.Show(str, str1, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     else
     {
         frmPunish frm = new frmPunish();
         frm.DSPunish      = dsPunish;
         frm.CurrentPunish = selectedRowIndex;
         frm.ShowDialog();
         PopulateListPunish();
     }
     selectedRowIndex = -1;
     tableModel1.Selections.Clear();
 }
예제 #4
0
 private void lvwListPunish_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left && e.Clicks == 2)
     {
         if(lvwListPunish.SelectedItems.Length > 0)
         {
             frmPunish frm = new frmPunish();
             frm.DSPunish = dsPunish;
             frm.CurrentPunish = selectedRowIndex;
             frm.ShowDialog();
             PopulateListPunish();
         }
         selectedRowIndex = -1;
         tableModel1.Selections.Clear();
     }
 }
예제 #5
0
 private void btnModify_Click(object sender, EventArgs e)
 {
     if(selectedRowIndex < 0)
     {
         string str = WorkingContext.LangManager.GetString("frmListPunish_Sua_Messa");
         string str1 = WorkingContext.LangManager.GetString("frmListPunish_Messa_Title");
         //MessageBox.Show("Không có nhân viên nào được chọn","Thông báo",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
         MessageBox.Show(str,str1,MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
     }
     else
     {
         frmPunish frm = new frmPunish();
         frm.DSPunish = dsPunish;
         frm.CurrentPunish = selectedRowIndex;
         frm.ShowDialog();
         PopulateListPunish();
     }
     selectedRowIndex = -1;
     tableModel1.Selections.Clear();
 }
예제 #6
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     frmPunish frmpunish = new frmPunish();
     frmpunish.DSPunish = dsPunish;
     frmpunish.ShowDialog();
     PopulateListPunish();
     selectedRowIndex = -1;
     tableModel1.Selections.Clear();
 }