示例#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();
 }