Beispiel #1
0
 private void ListVendorsDGView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.EditVendors) == EventStatus.Permit)
         {
             if (e.RowIndex >= 0)
             {
                 DataRow aVendorDataRow = VendorsMgmt.SelectVendorRowByName(ListVendorsDGView.Rows[e.RowIndex].Cells["Namecol"].Value.ToString());
                 if (aVendorDataRow == null)
                 {
                     ListVendorsBtn.PerformClick();
                 }
                 else
                 {
                     EditVendor aEditVendor = new EditVendor();
                     aEditVendor.TopMost = true;
                     aEditVendor.UpdateVariables(aVendorDataRow);
                     aEditVendor.Show();
                 }
             }
         }
         else
         {
             MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(MsgTxt.UnexpectedError + "\n IN [ListVendors:ListVendorsDGView_CellDoubleClick()] \n Exception: \n" + ex.ToString(), MsgTxt.ErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
         throw;
     }
 }
Beispiel #2
0
 private void ListUsersDgView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.EditUsers) == EventStatus.Permit)
         {
             Users aUserDataRow = new Users();
             aUserDataRow.User_Name        = ListUsersDgView.Rows[e.RowIndex].Cells["Namecol"].Value.ToString();
             aUserDataRow.User_Address     = ListUsersDgView.Rows[e.RowIndex].Cells["Address"].Value.ToString();
             aUserDataRow.User_Phone1      = ListUsersDgView.Rows[e.RowIndex].Cells["Phone1"].Value.ToString();
             aUserDataRow.User_Phone2      = ListUsersDgView.Rows[e.RowIndex].Cells["Phone2"].Value.ToString();
             aUserDataRow.User_UserName    = ListUsersDgView.Rows[e.RowIndex].Cells["UserName"].Value.ToString();
             aUserDataRow.User_Password    = ListUsersDgView.Rows[e.RowIndex].Cells["Password"].Value.ToString();
             aUserDataRow.User_Description = ListUsersDgView.Rows[e.RowIndex].Cells["Description"].Value.ToString();
             EditUser aEditUser = new EditUser();
             aEditUser.ControlBox      = true;
             aEditUser.MaximizeBox     = true;
             aEditUser.FormBorderStyle = FormBorderStyle.Fixed3D;
             aEditUser.Show();
             aEditUser.UpdateVariables(ListUsersDgView.Rows[e.RowIndex].Cells["UserName"].Value.ToString());
         }
         else
         {
             MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(MsgTxt.UnexpectedError + "\n IN [ListUsers:ListUsersDgView_CellDoubleClick()] \n Exception: \n" + ex.ToString(), MsgTxt.ErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
         throw;
     }
 }
Beispiel #3
0
 private void TouchScreenRibnBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.TouchScreen) == EventStatus.Permit)
     {
         TouchScreenFrm aTouchScreen = new TouchScreenFrm();
         __AddTabPage(aTouchScreen, __POSColor);
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #4
0
 private void ReportsRbnBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.Reports) == EventStatus.Permit)
     {
         ReportsFrm aReportsFrm = new ReportsFrm();
         __AddTabPage(aReportsFrm, __ReportsColor);
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #5
0
 private void ConnStringRbnBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.DataBaseSettings) == EventStatus.Permit)
     {
         ConnStringFrm aConnStringFrm = new ConnStringFrm();
         __AddTabPage(aConnStringFrm, __ToolsColor);
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #6
0
 private void DatabaseRbnBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.DataBaseSettings) == EventStatus.Permit)
     {
         BackupManager.BackupFrm aBackupFrm = new BackupManager.BackupFrm();
         aBackupFrm.Show();
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #7
0
 private void ListUsersRbnBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.ListUsers) == EventStatus.Permit)
     {
         ListUsers aListUsers = new ListUsers();
         __AddTabPage(aListUsers, __ToolsColor);
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #8
0
 private void CustDebitCreditRbnBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.CustomerDebitCredit) == EventStatus.Permit)
     {
         CustomerDebitCredit aCustDebitCredit = new CustomerDebitCredit();
         __AddTabPage(aCustDebitCredit, __CustomersColor);
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #9
0
 private void EditCustomersRibnBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.EditCustomers) == EventStatus.Permit)
     {
         EditCustomer aEditCustomer = new EditCustomer();
         __AddTabPage(aEditCustomer, __CustomersColor);
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #10
0
 private void AddVendorPaymentRibnBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.AddVendorPayment) == EventStatus.Permit)
     {
         AddVendorPayment aAddVendorPayment = new AddVendorPayment();
         __AddTabPage(aAddVendorPayment, __VendorsColor);
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #11
0
 private void NewPurchaseVoucherRbnBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.PurchaseVoucher) == EventStatus.Permit)
     {
         PurchaseVoucher aPurchaseVoucher = new PurchaseVoucher();
         __AddTabPage(aPurchaseVoucher, __PurchaseColor);
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #12
0
 private void AdjustInvRbnBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.AdjustItems) == EventStatus.Permit)
     {
         AdjustItemsFrm aAdjustItemsFrm = new AdjustItemsFrm();
         __AddTabPage(aAdjustItemsFrm, __InventoryColor);
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #13
0
 private void WeightSettingsRibnBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.WeightEditing) == EventStatus.Permit)
     {
         WeightConfig aWeightConfig = new WeightConfig();
         __AddTabPage(aWeightConfig, __InventoryColor);
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #14
0
 private void DisposeItemsRibnBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.DisposeItems) == EventStatus.Permit)
     {
         DisposeItems aDisposeItems = new DisposeItems();
         __AddTabPage(aDisposeItems, __InventoryColor);
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #15
0
 private void EditBillRibnBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.EditBills) == EventStatus.Permit)
     {
         ChooseBillToEdit aChooseBillToEdit = new ChooseBillToEdit();
         __AddTabPage(aChooseBillToEdit, __POSColor);
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #16
0
 private void MakeSaleRibnBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.POS) == EventStatus.Permit)
     {
         POS aPos = new POS();
         __AddTabPage(aPos, __POSColor);
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #17
0
 private void EditItemBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.EditItems) == EventStatus.Permit)
     {
         EditItems aEditItem = new EditItems();
         aEditItem.Show();
         //aEditItem.MdiParent = Helper.Instance.ActiveMainWindow;
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #18
0
 private void ListCustomersBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.ListCustomers) == EventStatus.Permit)
     {
         ListCustomers aListCustomers = new ListCustomers();
         aListCustomers.Show();
         //  aListCustomers.MdiParent = Helper.Instance.ActiveMainWindow;
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #19
0
 private void PointOfSaleBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.POS) == EventStatus.Permit)
     {
         POS aPOS = new POS();
         aPOS.Show();
         //aPOS.MdiParent = Helper.Instance.ActiveMainWindow;
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #20
0
 private void AddVendorBtn_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.AddVendor) == EventStatus.Permit)
     {
         AddVendor aAddVendor = new AddVendor();
         //  aAddVendor.MdiParent = Helper.Instance.ActiveMainWindow;
         aAddVendor.Show();
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #21
0
 private void newPurchaseVoucherToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.PurchaseVoucher) == EventStatus.Permit)
     {
         PurchaseVoucher aPurchaseVoucher = new PurchaseVoucher();
         aPurchaseVoucher.Show();
         //  aPurchaseVoucher.MdiParent = Helper.Instance.ActiveMainWindow;
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #22
0
 private void addNewCustomerToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.AddCustomer) == EventStatus.Permit)
     {
         AddCustomer aAddCustomer = new AddCustomer();
         ///   aAddCustomer.MdiParent = Helper.Instance.ActiveMainWindow;
         aAddCustomer.Show();
         //  aAddCustomer.WindowState = FormWindowState.Normal;
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #23
0
 private void listBillsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.ListBills) == EventStatus.Permit)
     {
         ListBills aListBills = new ListBills();
         aListBills.Show();
         //   aListBills.MdiParent = Helper.Instance.ActiveMainWindow;
         aListBills.Dock = DockStyle.Fill;
         aListBills.BringToFront();
     }
     else
     {
         MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #24
0
        private void editUsersToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.EditUsers) == EventStatus.Permit)
            {
                EditUser aEditUser = new EditUser();
                aEditUser.Visible = false;
                //aEditUser.MdiParent = Helper.Instance.ActiveMainWindow;
                aEditUser.Activate();
                aEditUser.Visible = true;
//                aEditUser.Show();
            }
            else
            {
                MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Beispiel #25
0
 private void EditAdminsBtn_Click(object sender, EventArgs e)
 {
     try
     {
         if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.EditAdmins) == EventStatus.Permit)
         {
             EditAdmins aEditAdmin = new EditAdmins();
             //   aEditAdmin.MdiParent = Helper.Instance.ActiveMainWindow;
             aEditAdmin.ShowDialog();
         }
         else
         {
             MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(MsgTxt.UnexpectedError + "\n IN [EditAdminsBtn_Click] \n Exception: \n" + ex.ToString() + "\n" + MsgTxt.FormWillCloseNowTxt, MsgTxt.ErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #26
0
 private void editBillToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.EditBills) == EventStatus.Permit)
         {
             ChooseBillToEdit aChooseBillToEdit = new ChooseBillToEdit();
             // aChooseBillToEdit.MdiParent = Helper.Instance.ActiveMainWindow;
             aChooseBillToEdit.Show();
         }
         else
         {
             MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #27
0
 private void ListBillsDGView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.EditBills) == EventStatus.Permit)
         {
             if (e.RowIndex < 0)
             {
                 return;
             }
             else
             {
                 DataTable aDataTableToPass = BillDetailedMgmt.SelectBillByBillNumber(int.Parse(ListBillsDGView.Rows[e.RowIndex].Cells["Number"].Value.ToString()));
                 if (aDataTableToPass != null)
                 {
                     EditBill aEditBill = new EditBill();
                     //  aEditBill.Parent = Helper.Instance.ActiveMainWindow;
                     aEditBill.AddDgView(aDataTableToPass);
                     DataRow aGeneralBillDataRow = BillGeneralMgmt.SelectBillByNumber(int.Parse(ListBillsDGView.Rows[e.RowIndex].Cells["Number"].Value.ToString()));
                     if (aGeneralBillDataRow != null)
                     {
                         aEditBill.UpdateVariables(aGeneralBillDataRow);
                         aEditBill.Dock = DockStyle.Fill;
                         aEditBill.Show();
                     }
                 }
             }
         }
         else
         {
             MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(MsgTxt.UnexpectedError + "\n IN [ListBills:ListBillsDGView_CellDoubleClick()] \n Exception: \n" + ex.ToString(), MsgTxt.ErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
         //throw;
     }
 }
Beispiel #28
0
        private void DebitDGView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.EditVouchers) == EventStatus.Permit)
            {
                if (e.RowIndex < 0)
                {
                    return;
                }
                DataTable   aDataTableToPass = PurchaseVoucherDetailedMgmt.SelectVoucherByVoucherNumber(int.Parse(DebitDGView.Rows[e.RowIndex].Cells["VoucherNumber"].Value.ToString()));
                EditVoucher aEditVoucher     = new EditVoucher();
                aEditVoucher.AddDGView(aDataTableToPass);

                DataRow aGeneralVoucherDataRow = PurchaseVoucherGeneralMgmt.SelectGeneralVoucherByNumber(int.Parse(DebitDGView.Rows[e.RowIndex].Cells["VoucherNumber"].Value.ToString()));
                aEditVoucher.UpdateVariables(aGeneralVoucherDataRow);
                // aEditVoucher.MdiParent = Helper.Instance.ActiveMainWindow;
                aEditVoucher.Show();
            }
            else
            {
                MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Beispiel #29
0
        private void ListVouchersDGView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (PrivilegesManager.GetEventStatues(Calcium_RMS.Events.EditVouchers) == EventStatus.Permit)
            {
                if (e.RowIndex < 0)
                {
                    return;
                }

                DataTable aDataTableToPass = PurchaseVoucherDetailedMgmt.SelectVoucherByVoucherNumber(int.Parse(ListVouchersDGView.Rows[e.RowIndex].Cells["VoucherNumber"].Value.ToString()));
                if (aDataTableToPass == null)
                {
                    MessageBox.Show(MsgTxt.UnexpectedError + "\n IN [ListVouchersDGView_CellDoubleClick:DB-ERROR  aDataTableToPass=null] \n  \n", MsgTxt.ErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }


                DataRow aGeneralVoucherDataRow = PurchaseVoucherGeneralMgmt.SelectGeneralVoucherByNumber(int.Parse(ListVouchersDGView.Rows[e.RowIndex].Cells["VoucherNumber"].Value.ToString()));
                if (aDataTableToPass == null)
                {
                    MessageBox.Show(MsgTxt.UnexpectedError + "\n IN [ListVouchersDGView_CellDoubleClick:DB-ERROR  aDataTableToPass=null] \n  \n", MsgTxt.ErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                EditVoucher aEditVoucher = new EditVoucher();
                aEditVoucher.AddDGView(aDataTableToPass);
                aEditVoucher.UpdateVariables(aGeneralVoucherDataRow);
                //aEditVoucher.TopLevel = true;
                aEditVoucher.TopMost = true;
                aEditVoucher.Show();
            }
            else
            {
                MessageBox.Show(MsgTxt.PrivUserNotAllowedTxt, MsgTxt.InformationCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }