Example #1
0
 /// <summary>
 /// On 'Save' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
         {
             if (dgvAttendance.RowCount == 0)
             {
                 Messages.InformationMessage("There is no employee in the selected date.Select another date");
                 txtCompanyCurrentdate.Focus();
             }
             else
             {
                 SaveOrEdit();
             }
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "A15:" + ex.Message;
     }
 }
Example #2
0
 /// <summary>
 /// On 'Save' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
         {
             if (PublicVariables.isMessageAdd)
             {
                 if (Messages.SaveMessage())
                 {
                     SaveFunction();
                 }
             }
             else
             {
                 SaveFunction();
             }
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "HO5:" + ex.Message;
     }
 }
Example #3
0
 /// <summary>
 /// On 'Delete' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPayheadDelete_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(decUserId, strFormName, btnPayheadDelete.Text))
         {
             if (PublicVariables.isMessageDelete)
             {
                 if (Messages.DeleteMessage())
                 {
                     DeleteFunction();
                 }
             }
             else
             {
                 DeleteFunction();
             }
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PH11:" + ex.Message;
     }
 }
Example #4
0
 /// <summary>
 /// Save button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
         {
             if (dgvBankReconciliation.RowCount > 0)
             {
                 if (PublicVariables.isMessageAdd)
                 {
                     if (Messages.SaveMessage())
                     {
                         saveOrEdit();
                         FindTotal();
                         Messages.SavedMessage();
                     }
                 }
             }
             else
             {
                 Messages.InformationMessage("No row to save");
             }
             clear();
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("BR:14" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// On 'Delete' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnDelete.Text))
         {
             MonthlySalarySP spMonthlySalary = new MonthlySalarySP();
             if (spMonthlySalary.MonthlySalarySettingsMonthlySalaryIdSearchUsingSalaryMonth(Convert.ToDateTime(dtpSalaryMonth.Text)) > 0)
             {
                 Delete();
             }
             else
             {
                 btnDelete.Enabled = false;
             }
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "MSS14:" + ex.Message;
     }
 }
Example #6
0
 /// <summary>
 /// On 'Save' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
         {
             if (dgvAttendance.RowCount == 0)
             {
                 Messages.InformationMessage("There is no employee in the selected date.Select another date");
                 txtCompanyCurrentdate.Focus();
             }
             else
             {
                 SaveOrEdit();
             }
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("A14" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #7
0
 /// <summary>
 /// On 'Save' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
         {
             if (PublicVariables.isMessageAdd)
             {
                 if (Messages.SaveMessage())
                 {
                     SaveFunction();
                 }
             }
             else
             {
                 SaveFunction();
             }
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("HO5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// On 'Delete' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPayheadDelete_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(decUserId, strFormName, btnPayheadDelete.Text))
         {
             if (PublicVariables.isMessageDelete)
             {
                 if (Messages.DeleteMessage())
                 {
                     DeleteFunction();
                 }
             }
             else
             {
                 DeleteFunction();
             }
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PH11:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// On 'save' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
         {
             if (dgvChangeProductTax.RowCount < 1)
             {
                 Messages.InformationMessage("There is no items in the grid");
                 cmbSearchBy.Focus();
             }
             else
             {
                 Save();
             }
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("CPT 15 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #10
0
 /// <summary>
 /// On 'Save' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
         {
             if (txtFromDate.Text != string.Empty && txtToDate.Text != string.Empty)
             {
                 if (Convert.ToDateTime(txtToDate.Text) < Convert.ToDateTime(txtFromDate.Text))
                 {
                     MessageBox.Show("From date is greater than to date", "Openmiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
                     txtToDate.Focus();
                 }
                 else
                 {
                     SaveOrEdit();
                     Clear();
                     txtFromDate.Focus();
                 }
             }
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PREM8:" + ex.Message;
     }
 }
Example #11
0
 /// <summary>
 /// On 'save' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
         {
             if (dgvChangeProductTax.RowCount < 1)
             {
                 Messages.InformationMessage("There is no items in the grid");
                 cmbSearchBy.Focus();
             }
             else
             {
                 Save();
             }
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "CPT 15 : " + ex.Message;;
     }
 }
 /// <summary>
 /// On 'Delete' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnDelete.Text))
         {
             MonthlySalarySP spMonthlySalary = new MonthlySalarySP();
             if (spMonthlySalary.MonthlySalarySettingsMonthlySalaryIdSearchUsingSalaryMonth(Convert.ToDateTime(dtpSalaryMonth.Text)) > 0)
             {
                 Delete();
             }
             else
             {
                 btnDelete.Enabled = false;
             }
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("MSS14" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #13
0
 /// <summary>
 /// form keydown for save delete and close functions using keyboard
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmSuffixPrefixSettings_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Escape)
         {
             if (PublicVariables.isMessageClose)
             {
                 Messages.CloseMessage(this);
             }
             else
             {
                 this.Close();
             }
         }
         if (e.KeyCode == Keys.S && Control.ModifierKeys == Keys.Control)
         {
             if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
             {
                 if (cmbVoucherType.Focused)
                 {
                     cmbVoucherType.DropDownStyle = ComboBoxStyle.DropDown;
                 }
                 else
                 {
                     cmbVoucherType.DropDownStyle = ComboBoxStyle.DropDownList;
                 }
                 btnSave_Click(sender, e);
             }
             else
             {
                 Messages.NoPrivillageMessage();
             }
         }
         if (e.KeyCode == Keys.D && Control.ModifierKeys == Keys.Control)
         {
             if (btnDelete.Enabled)
             {
                 if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnDelete.Text))
                 {
                     btnDelete_Click(sender, e);
                 }
                 else
                 {
                     Messages.NoPrivillageMessage();
                 }
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "SPS24" + ex.Message;
     }
 }
Example #14
0
 /// <summary>
 /// For the shortcut keys
 /// Escape for closing the form
 /// ctrl+s for Save
 /// ctrl+d for delete
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmRoute_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Escape)
         {
             if (PublicVariables.isMessageClose)
             {
                 Messages.CloseMessage(this);
             }
             else
             {
                 this.Close();
             }
         }
         if (e.KeyCode == Keys.S && Control.ModifierKeys == Keys.Control) //Save
         {
             if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
             {
                 if (cmbArea.Focused)
                 {
                     cmbArea.DropDownStyle = ComboBoxStyle.DropDown;
                 }
                 else
                 {
                     cmbArea.DropDownStyle = ComboBoxStyle.DropDownList;
                 }
                 btnSave_Click(sender, e);
             }
             else
             {
                 Messages.NoPrivillageMessage();
             }
         }
         if (e.KeyCode == Keys.D && Control.ModifierKeys == Keys.Control) //Delete
         {
             if (btnDelete.Enabled)
             {
                 if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnDelete.Text))
                 {
                     btnDelete_Click(sender, e);
                 }
                 else
                 {
                     Messages.NoPrivillageMessage();
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("RT26" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #15
0
 /// <summary>
 /// Function to call Save or Edit
 /// </summary>
 public void SaveOrEdit()
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
         {
             if (txtPackageName.Text.Trim() != string.Empty)
             {
                 if (cmbActive.Text.Trim() != string.Empty)
                 {
                     if (dgvSalaryPackage.Rows.Count > 1)
                     {
                         if (SalaryPackageCheckGridCompleteCheck())
                         {
                             SaveOrEditFunction();
                         }
                         else
                         {
                             if (MessageBox.Show("Pay head details are incomplete for salary package.Do you want to continue?", "Openmiracle", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                             {
                                 RemoveIncompleteRowsFromGrid();
                             }
                         }
                     }
                     else
                     {
                         Messages.InformationMessage("Select any payhead");
                     }
                 }
                 else
                 {
                     Messages.InformationMessage("Select isActive or Not");
                     cmbActive.Focus();
                 }
             }
             else
             {
                 Messages.InformationMessage("Enter package name");
                 txtPackageName.Focus();
             }
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "SPC11:" + ex.Message;
     }
 }
Example #16
0
 /// <summary>
 /// For the shortcut keys
 /// Escape for close
 /// ctrl+s for save
 /// ctrl+d for delete
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmPriceListPopup_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Tab)
         {
             cmbBatch.Focus();
         }
         if (e.KeyCode == Keys.Escape)
         {
             if (PublicVariables.isMessageClose)
             {
                 Messages.CloseMessage(this);
                 frmPriceListobj.Enabled = true;
             }
             else
             {
                 this.Close();
             }
         }
         if (e.KeyCode == Keys.S && Control.ModifierKeys == Keys.Control)
         {
             if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
             {
                 SaveOrEdit();
                 if (frmPriceListobj != null)
                 {
                     frmPriceListobj.Clear();
                 }
             }
             else
             {
                 Messages.NoPrivillageMessage();
             }
         }
         if (e.KeyCode == Keys.D && Control.ModifierKeys == Keys.Control)
         {
             if (btnDelete.Enabled)
             {
                 btnDelete_Click(sender, e);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PLP22" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #17
0
 /// <summary>
 /// For the shortcut keys
 /// Escape for close
 /// ctrl+s for save
 /// ctrl+d for delete
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmPriceListPopup_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Tab)
         {
             cmbBatch.Focus();
         }
         if (e.KeyCode == Keys.Escape)
         {
             if (PublicVariables.isMessageClose)
             {
                 Messages.CloseMessage(this);
                 frmPriceListobj.Enabled = true;
             }
             else
             {
                 this.Close();
             }
         }
         if (e.KeyCode == Keys.S && Control.ModifierKeys == Keys.Control) //Save
         {
             if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
             {
                 SaveOrEdit();
                 if (frmPriceListobj != null)
                 {
                     frmPriceListobj.Clear();
                 }
             }
             else
             {
                 Messages.NoPrivillageMessage();
             }
         }
         if (e.KeyCode == Keys.D && Control.ModifierKeys == Keys.Control) //Delete
         {
             if (btnDelete.Enabled)
             {
                 btnDelete_Click(sender, e);
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PLP25" + ex.Message + ex.Message;
     }
 }
Example #18
0
        /// <summary>
        /// Function for print
        /// </summary>
        public void Print()
        {
            try
            {
                if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnPrint.Text))
                {
                    if (cmbEmployee.Text == string.Empty || cmbEmployee.Text == "--Select--")
                    {
                        Messages.InformationMessage("Select an employee");
                        cmbEmployee.Focus();
                    }
                    else
                    {
                        SalaryVoucherMasterSP spSalaryVoucherMaster = new SalaryVoucherMasterSP();
                        DateTime dtMon         = DateTime.Parse(dtpSalaryMonth.Text);
                        DateTime dtSalaryMonth = new DateTime(dtMon.Year, dtMon.Month, 1);
                        decimal  decEmployeeId = Convert.ToDecimal(cmbEmployee.SelectedValue.ToString());
                        DataSet  dsPaySlip     = spSalaryVoucherMaster.PaySlipPrinting(decEmployeeId, dtSalaryMonth, 1);

                        foreach (DataTable dtbl in dsPaySlip.Tables)
                        {
                            if (dtbl.TableName == "Table1")
                            {
                                if (dtbl.Rows.Count > 0)
                                {
                                    frmReport frmReport = new frmReport();
                                    frmReport.MdiParent = formMDI.MDIObj;
                                    frmReport.PaySlipPrinting(dsPaySlip);
                                }
                                else
                                {
                                    MessageBox.Show("Salary not paid", "Openmiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
                                }
                            }
                        }
                    }
                }
                else
                {
                    Messages.NoPrivillageMessage();
                }
            }
            catch (Exception ex)
            {
                formMDI.infoError.ErrorString = "PS3:" + ex.Message;
            }
        }
Example #19
0
 /// <summary>
 /// Escape key navigation and Form keydown for quick access
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmAttendance_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Escape)
         {
             if (PublicVariables.isMessageClose)
             {
                 Messages.CloseMessage(this);
             }
             else
             {
                 this.Close();
             }
         }
         if (e.KeyCode == Keys.S && Control.ModifierKeys == Keys.Control) //Save
         {
             if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
             {
                 btnSave.Focus();
                 btnSave_Click(sender, e);
             }
             else
             {
                 Messages.NoPrivillageMessage();
             }
         }
         if (e.KeyCode == Keys.D && Control.ModifierKeys == Keys.Control) //Delete
         {
             if (btnDelete.Enabled == true)
             {
                 if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnDelete.Text))
                 {
                     btnDelete_Click(sender, e);
                 }
                 else
                 {
                     Messages.NoPrivillageMessage();
                 }
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "A18:" + ex.Message;
     }
 }
Example #20
0
 /// <summary>
 /// For form keydown for Quick access
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmSize_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Escape)
         {
             if (PublicVariables.isMessageClose)
             {
                 Messages.CloseMessage(this);
             }
             else
             {
                 this.Close();
             }
         }
         if (e.KeyCode == Keys.S && Control.ModifierKeys == Keys.Control)
         {
             if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
             {
                 btnSave_Click(sender, e);
             }
             else
             {
                 Messages.NoPrivillageMessage();
             }
         }
         if (e.KeyCode == Keys.D && Control.ModifierKeys == Keys.Control)
         {
             if (btnDelete.Enabled == true)
             {
                 if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnDelete.Text))
                 {
                     btnDelete_Click(sender, e);
                 }
                 else
                 {
                     Messages.NoPrivillageMessage();
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SZ25:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #21
0
 /// <summary>
 /// form keydown
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmChangeProductTax_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Escape)
         {
             FormClose();
         }
         if (e.KeyCode == Keys.S && Control.ModifierKeys == Keys.Control) //Save Ctrl + S
         {
             if (dgvChangeProductTax.Focused)
             {
                 btnSave.Focus();
                 dgvChangeProductTax.Focus();
             }
             if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
             {
                 if (cmbNewTaxType.Focused || cmbSearchBy.Focused || cmbProductGroupTax.Focused)
                 {
                     cmbNewTaxType.DropDownStyle      = ComboBoxStyle.DropDown;
                     cmbProductGroupTax.DropDownStyle = ComboBoxStyle.DropDown;
                     cmbSearchBy.DropDownStyle        = ComboBoxStyle.DropDown;
                 }
                 else
                 {
                     cmbNewTaxType.DropDownStyle      = ComboBoxStyle.DropDownList;
                     cmbProductGroupTax.DropDownStyle = ComboBoxStyle.DropDownList;
                     cmbSearchBy.DropDownStyle        = ComboBoxStyle.DropDownList;
                 }
                 cmbNewTaxType.DropDownStyle      = ComboBoxStyle.DropDownList;
                 cmbProductGroupTax.DropDownStyle = ComboBoxStyle.DropDownList;
                 cmbSearchBy.DropDownStyle        = ComboBoxStyle.DropDownList;
                 btnSave_Click(sender, e);
             }
             else
             {
                 Messages.NoPrivillageMessage();
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "CPT 27 : " + ex.Message;
     }
 }
 /// <summary>
 /// On delete button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, "Delete"))
         {
             Delete();
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SC12" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #23
0
 /// <summary>
 /// Delete button click, to delete the items
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnDelete.Text))
         {
             Delete();
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PB:27" + ex.Message;
     }
 }
Example #24
0
 /// <summary>
 /// Delete button click and checking the User privilage
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmStandardRate", "Delete"))
         {
             Delete();
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "SRP13" + ex.Message;
     }
 }
 /// <summary>
 /// ON 'Save' buton click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPayheadSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(decUserId, strFormName, btnPayheadSave.Text))
         {
             SaveorEdit();
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PH7:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #26
0
 /// <summary>
 /// Save button click, here checking the user privilege
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmStandardRate", btnSave.Text))
         {
             SaveOrEdit();
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SRP12:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #27
0
 /// <summary>
 /// ON 'Save' buton click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPayheadSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(decUserId, strFormName, btnPayheadSave.Text))
         {
             SaveorEdit();
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PH7:" + ex.Message;
     }
 }
Example #28
0
 /// <summary>
 /// On 'Delete' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(decUserId, strFormName, "Delete"))
         {
             Delete();
             GridFill();
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "D12:" + ex.Message;
     }
 }
Example #29
0
 /// <summary>
 /// Save button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, this.Name, btnSave.Text))
         {
             SaveOrEdit();
             GridClear();
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "Ser16:" + ex.Message;
     }
 }
Example #30
0
 /// <summary>
 /// On 'Delete' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(decUserId, strFormName, "Delete"))
         {
             Delete();
             GridFill();
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("D12:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }