コード例 #1
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);
     }
 }
コード例 #2
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);
     }
 }
コード例 #3
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);
     }
 }
コード例 #4
0
 /// <summary>
 /// Function to call frmEmployeePopup to view and select Employee details
 /// </summary>
 /// <param name="frm"></param>
 /// <param name="decEmployeeId"></param>
 public void CallFromEmployeePopUp(frmEmployeePopup frm, decimal decEmployeeId)
 {
     try
     {
         base.Show();
         frmEmployeePopupObj           = frm;
         cmbEmployeeCode.SelectedValue = decEmployeeId;
         cmbEmployeeCode.Focus();
         frmEmployeePopupObj.Close();
         frmEmployeePopupObj = null;
     }
     catch (Exception ex)
     {
         MessageBox.Show(" APR:3" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
コード例 #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);
     }
 }