Exemple #1
0
 private void btnOpenCash_Click(object sender, EventArgs e)
 {
     if (clsFormRights.HasFormRight(clsFormRights.Forms.frmCloseShifWindow) || clsUtility.IsAdmin)
     {
         if (btnOpenCash.Text == "View Details")
         {
             // Enter code for opening Cash clsoing window
             Sales.frmCloseShifWindow Obj = new Sales.frmCloseShifWindow();
             Obj.pMasterCashClosingID = Home_MasterCashClosingID;
             Obj.ShowDialog();
             LoadCashStatus();
         }
         else
         {
             bool result = clsUtility.ShowQuestionMessage("Are you sure, you want to open cash box ?", clsUtility.strProjectTitle);
             if (result)
             {
                 this.Cursor = Cursors.WaitCursor;
                 System.Threading.Thread.Sleep(2000);
                 OpenCashBox();
                 this.Cursor = Cursors.Default;
             }
         }
     }
     else
     {
         clsUtility.ShowInfoMessage("You have no rights to perform this task", clsUtility.strProjectTitle);
     }
 }
Exemple #2
0
 private void closeCashToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (clsFormRights.HasFormRight(clsFormRights.Forms.frmCloseShifWindow) || clsUtility.IsAdmin)
     {
         Sales.frmCloseShifWindow Obj = new Sales.frmCloseShifWindow();
         Obj.pMasterCashClosingID = Home_MasterCashClosingID;
         Obj.ShowDialog();
         LoadCashStatus();
     }
     else
     {
         clsUtility.ShowInfoMessage("You have no rights to perform this task", clsUtility.strProjectTitle);
     }
 }