Exemplo n.º 1
0
 /// <summary>
 /// Calls frmEmployeePopup form to select and view Employee and enter key navigation
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmbEmployeeName_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter)
         {
             dtpMonth.Focus();
         }
         if (e.KeyCode == Keys.F && Control.ModifierKeys == Keys.Control) //Pop Up
         {
             frmEmployeeObj           = new frmEmployeePopup();
             frmEmployeeObj.MdiParent = formMDI.MDIObj;
             if (cmbEmployeeName.SelectedIndex > 0)
             {
                 frmEmployeeObj.CallFromBonusDeductionregister(this, Convert.ToDecimal(cmbEmployeeName.SelectedValue.ToString()));
             }
             else
             {
                 Messages.InformationMessage("Select employeename");
                 cmbEmployeeName.Focus();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("BDR12:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Enter key and Backspace navigation and Form Quick access
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmbEmployee_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter)
         {
             cmbStatus.Focus();
         }
         if (e.KeyCode == Keys.Back)
         {
             cmbDesigantion.Focus();
         }
         if (e.Control && e.KeyCode == Keys.F)
         {
             frmEmployeePopupObj           = new frmEmployeePopup();
             frmEmployeePopupObj.MdiParent = formMDI.MDIObj;
             if (cmbEmployee.SelectedIndex > 0)
             {
                 frmEmployeePopupObj.CallFromEmployeeReport(this, Convert.ToDecimal(cmbEmployee.SelectedValue.ToString()));
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("ER12" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Form Quick access and Enter,Backspace navigation
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmbEmployeeCode_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter)
         {
             txtSalaryMonth.Focus();
         }
         if (e.KeyCode == Keys.Back)
         {
             txtToDate.SelectionStart  = 0;
             txtToDate.SelectionLength = 0;
             txtToDate.Focus();
         }
         if (e.Control && e.KeyCode == Keys.F)
         {
             frmEmployeePopupObj           = new frmEmployeePopup();
             frmEmployeePopupObj.MdiParent = formMDI.MDIObj;
             if (cmbEmployeeCode.SelectedIndex > 0)
             {
                 frmEmployeePopupObj.CallFromAdvancePaymentReport(this, Convert.ToDecimal(cmbEmployeeCode.SelectedValue.ToString()));
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("APR:17" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Function to call frmEmployeePopup to view and select Employees
 /// </summary>
 /// <param name="frm"></param>
 /// <param name="decEmployeeId"></param>
 public void CallFromEmployeePopUp(frmEmployeePopup frm, decimal decEmployeeId)
 {
     try
     {
         base.Show();
         frmEmployeePopupObj       = frm;
         cmbEmployee.SelectedValue = decEmployeeId;
         cmbEmployee.Focus();
         frmEmployeePopupObj.Close();
         frmEmployeePopupObj = null;
     }
     catch (Exception ex)
     {
         MessageBox.Show("DAR:3" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// Function to call frmEmployeePopup form to select and view Employee
 /// </summary>
 /// <param name="frmEmployee"></param>
 /// <param name="decId"></param>
 public void CallFromEmployee(frmEmployeePopup frmEmployee, decimal decId) //POP UP
 {
     try
     {
         base.Show();
         this.frmEmployeeObj = frmEmployee;
         EmployeeNameComboFill();
         cmbEmployeeName.SelectedValue = decId;
         cmbEmployeeName.Focus();
         frmEmployeeObj.Close();
         frmEmployeeObj = null;
     }
     catch (Exception ex)
     {
         MessageBox.Show("BDR5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }