예제 #1
0
 private void btnModify_Click(object sender, System.EventArgs e)
 {
     if (selectedRowIndex < 0)
     {
         string str  = WorkingContext.LangManager.GetString("frmChangeInOut_Sua_CanhBao_Messa");
         string str1 = WorkingContext.LangManager.GetString("frmChangeInOut_Sua_CanhBao_Title");
         //MessageBox.Show("Không có thời gian nào được chọn", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         MessageBox.Show(str, str1, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     else
     {
         string errStr = CheckInput();
         if (errStr != "")
         {
             string str = WorkingContext.LangManager.GetString("frmChangeInOut_Messa3");
             //MessageBox.Show(errStr, "Sửa thời gian", MessageBoxButtons.OK,  MessageBoxIcon.Information);
             MessageBox.Show(errStr, str, MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             frmAddTimeInOut frm = new frmAddTimeInOut();
             frm.EmployeeId       = int.Parse(((MTGCComboBoxItem)cboEmployee.SelectedItem).Col1);
             frm.EmployeeName     = (((MTGCComboBoxItem)cboEmployee.SelectedItem).Col3);
             frm.DsTimeInOut      = dsTimeInOut;
             frm.SelectedRowIndex = selectedRowIndex;
             frm.ShowDialog();
             FillListTimeInOut();
         }
     }
     selectedRowIndex = -1;
     tableModel1.Selections.Clear();
 }
예제 #2
0
 private void lvwTimeInOut_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left && e.Clicks == 2)
     {
         if (lvwTimeInOut.SelectedIndicies.Length > 0)
         {
             frmAddTimeInOut frm = new frmAddTimeInOut();
             frm.EmployeeId       = int.Parse(((MTGCComboBoxItem)cboEmployee.SelectedItem).Col1);
             frm.EmployeeName     = (((MTGCComboBoxItem)cboEmployee.SelectedItem).Col3);
             frm.DsTimeInOut      = dsTimeInOut;
             frm.SelectedRowIndex = selectedRowIndex;
             frm.ShowDialog();
             FillListTimeInOut();
             selectedRowIndex = -1;
             tableModel1.Selections.Clear();
         }
     }
 }
예제 #3
0
        private void btnAdd_Click(object sender, System.EventArgs e)
        {
            string errStr = CheckInput();

            if (errStr != "")
            {
                string str = WorkingContext.LangManager.GetString("frmChangeInOut_Messa1");
                //MessageBox.Show(errStr, "Thêm thời gian", MessageBoxButtons.OK,  MessageBoxIcon.Exclamation);
                MessageBox.Show(errStr, str, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            else
            {
                frmAddTimeInOut frm = new frmAddTimeInOut();
                frm.EmployeeId   = int.Parse(((MTGCComboBoxItem)cboEmployee.SelectedItem).Col1);
                frm.EmployeeName = (((MTGCComboBoxItem)cboEmployee.SelectedItem).Col3);
                frm.DsTimeInOut  = dsTimeInOut;
                frm.ShowDialog();
                FillListTimeInOut();
            }
            selectedRowIndex = -1;
            tableModel1.Selections.Clear();
        }
예제 #4
0
 private void lvwTimeInOut_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if(e.Button == MouseButtons.Left && e.Clicks== 2)
     {
         if(lvwTimeInOut.SelectedIndicies.Length > 0)
         {
             frmAddTimeInOut frm = new frmAddTimeInOut();
             frm.EmployeeId = int.Parse(((MTGCComboBoxItem)cboEmployee.SelectedItem).Col1);
             frm.EmployeeName = (((MTGCComboBoxItem)cboEmployee.SelectedItem).Col3);
             frm.DsTimeInOut = dsTimeInOut;
             frm.SelectedRowIndex = selectedRowIndex;
             frm.ShowDialog();
             FillListTimeInOut();
             selectedRowIndex = -1;
             tableModel1.Selections.Clear();
         }
     }
 }
예제 #5
0
 private void btnModify_Click(object sender, System.EventArgs e)
 {
     if(selectedRowIndex < 0)
     {
         string str = WorkingContext.LangManager.GetString("frmChangeInOut_Sua_CanhBao_Messa");
         string str1 = WorkingContext.LangManager.GetString("frmChangeInOut_Sua_CanhBao_Title");
         //MessageBox.Show("Không có thời gian nào được chọn", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         MessageBox.Show(str, str1, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     else
     {
         string errStr = CheckInput();
         if(errStr != "")
         {
             string str = WorkingContext.LangManager.GetString("frmChangeInOut_Messa3");
             //MessageBox.Show(errStr, "Sửa thời gian", MessageBoxButtons.OK,  MessageBoxIcon.Information);
             MessageBox.Show(errStr, str, MessageBoxButtons.OK,  MessageBoxIcon.Information);
         }
         else
         {
             frmAddTimeInOut frm = new frmAddTimeInOut();
             frm.EmployeeId = int.Parse(((MTGCComboBoxItem)cboEmployee.SelectedItem).Col1);
             frm.EmployeeName = (((MTGCComboBoxItem)cboEmployee.SelectedItem).Col3);
             frm.DsTimeInOut = dsTimeInOut;
             frm.SelectedRowIndex = selectedRowIndex;
             frm.ShowDialog();
             FillListTimeInOut();
         }
     }
     selectedRowIndex = -1;
     tableModel1.Selections.Clear();
 }
예제 #6
0
 private void btnAdd_Click(object sender, System.EventArgs e)
 {
     string errStr = CheckInput();
     if(errStr != "")
     {
         string str = WorkingContext.LangManager.GetString("frmChangeInOut_Messa1");
         //MessageBox.Show(errStr, "Thêm thời gian", MessageBoxButtons.OK,  MessageBoxIcon.Exclamation);
         MessageBox.Show(errStr, str, MessageBoxButtons.OK,  MessageBoxIcon.Exclamation);
     }
     else
     {
         frmAddTimeInOut frm = new frmAddTimeInOut();
         frm.EmployeeId = int.Parse(((MTGCComboBoxItem)cboEmployee.SelectedItem).Col1);
         frm.EmployeeName = (((MTGCComboBoxItem)cboEmployee.SelectedItem).Col3);
         frm.DsTimeInOut = dsTimeInOut;
         frm.ShowDialog();
         FillListTimeInOut();
     }
     selectedRowIndex = -1;
     tableModel1.Selections.Clear();
 }