Esempio n. 1
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails           = clsAccessRights.Details(UID, (int)AccessTypes.Contacts);
            lnkCustomers.Visible = clsDetails.Read;

            clsDetails                   = clsAccessRights.Details(UID, (int)AccessTypes.SalesOrders);
            lnkSalesOrders.Visible       = clsDetails.Read;
            lnkPostedSalesOrders.Visible = clsDetails.Read;
            lnkSalesAnalysis.Visible     = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.SalesJournals);
            lnkSalesJournals.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.SalesReturns);
            lnkSalesReturns.Visible    = clsDetails.Read;
            lnkPostedSOReturns.Visible = clsDetails.Read;

            clsDetails                  = clsAccessRights.Details(UID, (int)AccessTypes.SalesCreditMemos);
            lnkCreditMemos.Visible      = clsDetails.Read;
            lnkPostedCreditMemo.Visible = clsDetails.Read;

            clsAccessRights.CommitAndDispose();
        }
Esempio n. 2
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails            = clsAccessRights.Details(UID, (int)AccessTypes.Products);
            imgAdd.Visible        = clsDetails.Write;
            cmdAdd.Visible        = clsDetails.Write;
            imgDelete.Visible     = clsDetails.Write;
            cmdDelete.Visible     = clsDetails.Write;
            cmdEdit.Visible       = clsDetails.Write;
            idEdit.Visible        = clsDetails.Write;
            lblSeparator1.Visible = clsDetails.Write;
            lblSeparator2.Visible = clsDetails.Write;

            clsDetails            = clsAccessRights.Details(UID, (int)AccessTypes.ProductComposition);
            cmdCompose.Visible    = clsDetails.Write;
            idCompose.Visible     = clsDetails.Write;
            lblSeparator3.Visible = clsDetails.Write;

            clsDetails            = clsAccessRights.Details(UID, (int)AccessTypes.ItemSetupFinancial);
            cmdFinance.Visible    = clsDetails.Write;
            idFinance.Visible     = clsDetails.Write;
            lblSeparator4.Visible = clsDetails.Write;

            clsAccessRights.CommitAndDispose();
        }
Esempio n. 3
0
        private void ManageSecurity()
        {
            Security.AccessUserDetails clsAccessUserDetails = (Security.AccessUserDetails)Session["AccessUserDetails"];
            AccessRights        clsAccessRights             = new AccessRights();
            AccessRightsDetails clsDetails = new AccessRightsDetails();

            clsDetails            = clsAccessRights.Details(clsAccessUserDetails.UID, (Int16)AccessTypes.Products);
            lnkProducts.Visible   = clsDetails.Read;
            lnkProductAdd.Visible = clsDetails.Write;

            clsDetails             = clsAccessRights.Details(clsAccessUserDetails.UID, (int)AccessTypes.SynchronizeBranchProducts);
            lnkSynchronize.Visible = clsDetails.Read;

            clsDetails         = clsAccessRights.Details(clsAccessUserDetails.UID, (Int16)AccessTypes.Contacts);
            lnkContact.Visible = clsDetails.Read;
            lnkRewards.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(clsAccessUserDetails.UID, (Int16)AccessTypes.InventoryList);
            lnkInventoryList.Visible = clsDetails.Read;

            clsDetails        = clsAccessRights.Details(clsAccessUserDetails.UID, (Int16)AccessTypes.StockTransactions);
            lnkStock.Visible  = clsDetails.Read;
            lnkUpload.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(clsAccessUserDetails.UID, (Int16)AccessTypes.AccessUsers);
            lnkAccessUserAdd.Visible = clsDetails.Write;

            clsDetails = clsAccessRights.Details(clsAccessUserDetails.UID, (Int16)AccessTypes.ReportFormat);
            lnkReceiptFormatEdit.Visible = clsDetails.Write;

            clsAccessRights.CommitAndDispose();
        }
Esempio n. 4
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails                          = clsAccessRights.Details(UID, (int)AccessTypes.RewardPointsSetup);
            lnkMembers.Visible                  = clsDetails.Read;
            lnkRewardsMovement.Visible          = clsDetails.Read;
            lnkCheckRewardPoints.Visible        = clsDetails.Read;
            lnkRewardsSummary.Visible           = clsDetails.Read;
            lnkRewardsSummaryStatistics.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.RewardPointsReedemption);
            lnkRewardsReddem.Visible = clsDetails.Read;

            clsAccessRights.CommitAndDispose();
        }
Esempio n. 5
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails             = clsAccessRights.Details(UID, (int)AccessTypes.PrintShlevesTagPrice);
            holderTagPrice.Visible = clsDetails.Write;

            clsAccessRights.CommitAndDispose();
        }
Esempio n. 6
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails            = clsAccessRights.Details(UID, (int)AccessTypes.Contacts);
            cmdEdit.Visible       = clsDetails.Write;
            idEdit.Visible        = clsDetails.Write;
            lblSeparator2.Visible = clsDetails.Write;

            clsAccessRights.CommitAndDispose();
        }
Esempio n. 7
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.SalesAndReceivablesMenu);
            if (clsDetails.Read == false)
            {
                Server.Transfer("/RetailPlus/Home/Default.aspx");
            }
            clsAccessRights.CommitAndDispose();
        }
Esempio n. 8
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails            = clsAccessRights.Details(UID, (int)AccessTypes.StockTransactions);
            imgAdd.Visible        = clsDetails.Write;
            cmdAdd.Visible        = clsDetails.Write;
            imgDelete.Visible     = clsDetails.Write;
            cmdDelete.Visible     = clsDetails.Write;
            cmdEdit.Visible       = clsDetails.Write;
            imgEdit.Visible       = clsDetails.Write;
            lblSeparator1.Visible = clsDetails.Write;
            lblSeparator2.Visible = clsDetails.Write;

            clsDetails            = clsAccessRights.Details(UID, (int)AccessTypes.BranchTransfer);
            lblSeparator3.Visible = clsDetails.Read;
            cmdTransfer.Visible   = clsDetails.Read;

            clsAccessRights.CommitAndDispose();
        }
Esempio n. 9
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.WarehouseToBranchTransfer);
            if (!clsDetails.Read)
            {
                Server.Transfer(Constants.ROOT_DIRECTORY + "/Home/Default.aspx");
            }
            clsAccessRights.CommitAndDispose();
        }
Esempio n. 10
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails            = clsAccessRights.Details(UID, (int)AccessTypes.PurchaseReturns);
            imgAdd.Visible        = clsDetails.Write;
            cmdAdd.Visible        = clsDetails.Write;
            imgDelete.Visible     = clsDetails.Write;
            cmdDelete.Visible     = clsDetails.Write;
            cmdEdit.Visible       = clsDetails.Write;
            imgEdit.Visible       = clsDetails.Write;
            lblSeparator1.Visible = clsDetails.Write;
            lblSeparator2.Visible = clsDetails.Write;
//			lblSeparator3.Visible = clsDetails.Write;

            clsDetails        = clsAccessRights.Details(UID, (int)AccessTypes.ManagePurchaseReturnsSales);
            divesales.Visible = clsDetails.Write;

            clsAccessRights.CommitAndDispose();
        }
Esempio n. 11
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.GeneralLedgerMenu);
            if (clsDetails.Read == false)
            {
                Server.Transfer(Constants.ROOT_DIRECTORY + "/Home/Default.aspx");
            }
            clsAccessRights.CommitAndDispose();
        }
Esempio n. 12
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails      = clsAccessRights.Details(UID, (int)AccessTypes.Home);
            NavHome.Visible = clsDetails.Read;

            clsDetails             = clsAccessRights.Details(UID, (int)AccessTypes.MasterFilesMenu);
            NavMasterFiles.Visible = clsDetails.Read;

            clsDetails         = clsAccessRights.Details(UID, (int)AccessTypes.RewardCardIssuance);
            NavRewards.Visible = clsDetails.Read;

            clsDetails         = clsAccessRights.Details(UID, (int)AccessTypes.CreditCardIssuance);
            NavCredits.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.GeneralLedgerMenu);
            NavGeneralLedger.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.PurchasesAndPayablesMenu);
            NavPurchasesAndPayables.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.SalesAndReceivablesMenu);
            NavSalesAndReceivables.Visible = clsDetails.Read;

            clsDetails           = clsAccessRights.Details(UID, (int)AccessTypes.InventoryMenu);
            NavInventory.Visible = clsDetails.Read;

            clsDetails         = clsAccessRights.Details(UID, (int)AccessTypes.ReportsMenu);
            NavReports.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.AdministrationFilesMenu);
            NavAdministrationFiles.Visible = clsDetails.Read;

            clsAccessRights.CommitAndDispose();
        }
Esempio n. 13
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.PurchasesAndPayablesMenu);
            clsAccessRights.CommitAndDispose();

            if (!clsDetails.Read)
            {
                Server.Transfer(Constants.ROOT_DIRECTORY + "/Home.aspx");
            }
        }
Esempio n. 14
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails            = clsAccessRights.Details(UID, (int)AccessTypes.AccessUsers);
            imgAdd.Visible        = clsDetails.Write;
            cmdAdd.Visible        = clsDetails.Write;
            imgDelete.Visible     = clsDetails.Write;
            cmdDelete.Visible     = clsDetails.Write;
            cmdEdit.Visible       = clsDetails.Write;
            imgEdit.Visible       = clsDetails.Write;
            lblSeparator1.Visible = clsDetails.Write;
            lblSeparator2.Visible = clsDetails.Write;


            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.AccessRights);
            cmdAccessRightsUpdate.Visible = clsDetails.Write;
            imgAccessRightsUpdate.Visible = clsDetails.Write;
            lblSeparator3.Visible         = clsDetails.Write;

            clsAccessRights.CommitAndDispose();
        }
Esempio n. 15
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.CloseInventory);
            imgZeroOutActualQuantity.Visible = clsDetails.Write;
            cmdZeroOutActualQuantity.Visible = clsDetails.Write;
            imgCloseInventory.Visible        = clsDetails.Write;
            cmdCloseInventory.Visible        = clsDetails.Write;
            lblSeparator1.Visible            = clsDetails.Write;
            //lblSeparator2.Visible = clsDetails.Write;

            clsAccessRights.CommitAndDispose();
        }
Esempio n. 16
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails           = clsAccessRights.Details(UID, (int)AccessTypes.InternalCreditCardSetup);
            lnkCardTypes.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.CreditorsWithoutGuarantor);
            lnkCreditorsWithoutGuarantors.Visible = clsDetails.Read;
            lnkChangeCreditType.Visible           = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.CreditorsWithoutGuarantorPurchases);
            lnkCreditorsWithoutGurantorPurchases.Visible = clsDetails.Read;
            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.CreditorsWithoutGuarantorPayments);
            lnkCreditorsWithoutGuarantorPayments.Visible = clsDetails.Read;
            lnkSummarizedStatistics.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.CreditorsLedgerSummary);
            lnkGuarantorsLedger.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.CreditorsWithGuarantor);
            lnkCreditorsWithGuarantors.Visible = clsDetails.Read;
            lnkChangeCreditTypeWG.Visible      = clsDetails.Read;
            lnkChangeCreditType.Visible        = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.CreditorsWithGuarantorPurchases);
            lnkCreditorsWithGurantorPurchases.Visible = clsDetails.Read;
            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.CreditorsWithGuarantorPayments);
            lnkCreditorsWithGuarantorPayments.Visible = clsDetails.Read;
            lnkSummarizedStatisticsWG.Visible         = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.GuarantorsLedgerSummary);
            lnkGuarantorsLedger.Visible = clsDetails.Read;

            clsAccessRights.CommitAndDispose();
        }
Esempio n. 17
0
        public DialogResult GetWriteAccess(Int64 UID, AccessTypes accesstype)
        {
            DialogResult resRetValue = DialogResult.None;

            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails = clsAccessRights.Details(UID, (Int16)accesstype);

            if (clsDetails.Write)
            {
                resRetValue = DialogResult.OK;
            }

            clsAccessRights.CommitAndDispose();

            return(resRetValue);
        }
Esempio n. 18
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails            = clsAccessRights.Details(UID, (int)AccessTypes.PaymentJournals);
            imgAdd.Visible        = clsDetails.Write;
            cmdAdd.Visible        = clsDetails.Write;
            imgCancel.Visible     = clsDetails.Write;
            cmdCancel.Visible     = clsDetails.Write;
            imgEdit.Visible       = clsDetails.Write;
            cmdEdit.Visible       = clsDetails.Write;
            lblSeparator1.Visible = clsDetails.Write;
            lblSeparator2.Visible = clsDetails.Write;

            clsAccessRights.CommitAndDispose();
        }
Esempio n. 19
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails                    = clsAccessRights.Details(UID, (int)AccessTypes.ProductVariations);
            imgAdd.Visible                = clsDetails.Write;
            cmdAdd.Visible                = clsDetails.Write;
            imgDelete.Visible             = clsDetails.Write;
            cmdDelete.Visible             = clsDetails.Write;
            cmdViewProductDetails.Visible = clsDetails.Write;
            idViewProductDetails.Visible  = clsDetails.Write;
            lblSeparator1.Visible         = clsDetails.Write;
            lblSeparator2.Visible         = clsDetails.Write;

            clsAccessRights.CommitAndDispose();
        }
Esempio n. 20
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.BankDeposits);
            lnkBankDeposits.Visible = clsDetails.Read;

            clsDetails             = clsAccessRights.Details(UID, (int)AccessTypes.WriteCheques);
            lnkWriteCheque.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.FundTransfers);
            lnkFundTransfers.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.ReconcileAccounts);
            lnkReconcileAccounts.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.AccountSummary);
            lnkAccountSummaries.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.AccountCategory);
            lnkAccountCategory.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.ChartOfAccounts);
            lnkChartOfAccounts.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.PaymentJournals);
            lnkGeneralJournals.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.PaymentJournals);
            lnkPaymentJournals.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.PostingDates);
            lnkPostingDates.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.Banks);
            lnkBankAccounts.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.APLinkConfig);
            lnkLinkAccountsProduct.Visible = clsDetails.Read;
            lnkLinkAccountsAP.Visible      = clsDetails.Read;

            //lnkBalanceSheetReport.Visible = false;
            //lnkChartOfAccountsReport.Visible = true;
            //lnkGeneralLedgerReport.Visible = false;
            lnkGeneralJournalsReport.Visible = false;
            lnkPaymentJournalReport.Visible  = false;
            lnkProfitAndLossReport.Visible   = false;
            lnkTrialBalanceReport.Visible    = false;

            clsAccessRights.CommitAndDispose();
        }
Esempio n. 21
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            bool boShowFinancialReports = false;
            bool boShoweSalesReports    = false;
            bool boShowActionBar        = false;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.Contacts);
            if (!clsDetails.Read)
            {
                divlnkVendors.Style.Add("display", "none");
            }
            lnkVendors.Visible = clsDetails.Read;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.PurchaseOrders);
            lnkPurchaseOrders.Visible = clsDetails.Read;
            if (!clsDetails.Read)
            {
                divlnkPurchaseOrders.Style.Add("display", "none");
            }

            lnkPostedPO.Visible = clsDetails.Read;
            if (!clsDetails.Read)
            {
                divlnkPostedPurchaseOrder.Style.Add("display", "none");
            }

            if (!clsDetails.Read)
            {
                divlnkPostedPO.Style.Add("display", "none");
            }

            lnkPOAdd.Visible = clsDetails.Write;
            if (!clsDetails.Write)
            {
                divlnkPOAdd.Style.Add("display", "none");
            }

            // show label for reporting
            if (clsDetails.Write && !boShowFinancialReports)
            {
                boShowFinancialReports = true;
            }
            if (clsDetails.Write && !boShowActionBar)
            {
                boShowActionBar = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.PurchaseReturns);
            lnkPurchaseReturns.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkPurchaseReturns.Style.Add("display", "none");
            }

            lnkPostedPOReturns.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkPostedPOReturns.Style.Add("display", "none");
            }

            // show label for reporting
            if (clsDetails.Write && !boShowFinancialReports)
            {
                boShowFinancialReports = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.PurchaseDebitMemo);
            lnkPurchaseDebitMemo.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkPurchaseDebitMemo.Style.Add("display", "none");
            }

            lnkPostedDebitMemo.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkPostedDebitMemo.Style.Add("display", "none");
            }

            // show label for reporting
            if (clsDetails.Write && !boShowFinancialReports)
            {
                boShowFinancialReports = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.PurchaseAnalysis);
            lnkPurchaseAnalysis.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkPurchaseAnalysis.Style.Add("display", "none");
            }

            // esales access
            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.PurchaseOrderseSales);
            lnkPurchaseOrdereSales.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkPurchaseOrdereSales.Style.Add("display", "none");
            }

            lnkPostedPOeSales.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkPostedPOeSales.Style.Add("display", "none");
            }

            // show label for reporting
            if (clsDetails.Write && !boShoweSalesReports)
            {
                boShoweSalesReports = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.PurchaseReturnseSales);
            lnkPurchaseReturnseSales.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkPurchaseReturnseSales.Style.Add("display", "none");
            }

            lnkPostedPOReturnseSales.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkPostedPOReturnseSales.Style.Add("display", "none");
            }

            // show label for reporting
            if (clsDetails.Write && !boShoweSalesReports)
            {
                boShoweSalesReports = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.PurchaseDebitMemoeSales);
            lnkPurchaseDebitMemoeSales.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkPurchaseDebitMemoeSales.Style.Add("display", "none");
            }

            lnkPostedDebitMemoeSales.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkPostedDebitMemoeSales.Style.Add("display", "none");
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.PurchaseAnalysiseSales);
            lnkPurchaseAnalysiseSales.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkPurchaseAnalysiseSales.Style.Add("display", "none");
            }

            // show label for reporting
            if (clsDetails.Write && !boShoweSalesReports)
            {
                boShoweSalesReports = true;
            }

            clsAccessRights.CommitAndDispose();

            // show the actual label for reporting
            if (!boShowFinancialReports)
            {
                divlblFinancialReports.Style.Add("display", "none");
                divtblFinancialReports.Style.Add("display", "none");
            }

            // show the actual label for reporting
            if (!boShoweSalesReports)
            {
                divlbleSalesReports.Style.Add("display", "none");
                divtbleSalesReports.Style.Add("display", "none");
            }

            // show the actual label for reporting
            if (!boShowActionBar)
            {
                divlblActionBar.Style.Add("display", "none");
            }
        }
Esempio n. 22
0
        private void ManageSecurity()
        {
            Security.AccessUserDetails clsAccessUserDetails = (Security.AccessUserDetails)Session["AccessUserDetails"];
            AccessRights        clsAccessRights             = new AccessRights();
            AccessRightsDetails clsDetails = new AccessRightsDetails();

            bool boShowMyFavorites = false;
            bool boShowActionBar   = false;

            clsDetails          = clsAccessRights.Details(clsAccessUserDetails.UID, (Int16)AccessTypes.Products);
            lnkProducts.Visible = clsDetails.Read;
            if (!clsDetails.Read)
            {
                divlnkProducts.Style.Add("display", "none");
            }

            lnkProductAdd.Visible = clsDetails.Write;
            if (!clsDetails.Write)
            {
                divlnkProductAdd.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowMyFavorites)
            {
                boShowMyFavorites = true;
            }

            clsDetails             = clsAccessRights.Details(clsAccessUserDetails.UID, (int)AccessTypes.SynchronizeBranchProducts);
            lnkSynchronize.Visible = clsDetails.Read;
            if (!clsDetails.Read)
            {
                divlnkSynchronize.Style.Add("display", "none");
            }

            // show label for reporting
            if (clsDetails.Read && !boShowActionBar)
            {
                boShowActionBar = true;
            }

            clsDetails         = clsAccessRights.Details(clsAccessUserDetails.UID, (Int16)AccessTypes.Contacts);
            lnkContact.Visible = clsDetails.Read;
            if (!clsDetails.Read)
            {
                divlnkContact.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowMyFavorites)
            {
                boShowMyFavorites = true;
            }

            clsDetails         = clsAccessRights.Details(clsAccessUserDetails.UID, (Int16)AccessTypes.RewardItemsSetup);
            lnkRewards.Visible = clsDetails.Read;
            if (!clsDetails.Read)
            {
                divlnkRewards.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowMyFavorites)
            {
                boShowMyFavorites = true;
            }

            clsDetails = clsAccessRights.Details(clsAccessUserDetails.UID, (Int16)AccessTypes.InventoryList);
            lnkInventoryList.Visible = clsDetails.Read;
            if (!clsDetails.Read)
            {
                divlnkInventoryList.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowMyFavorites)
            {
                boShowMyFavorites = true;
            }

            clsDetails       = clsAccessRights.Details(clsAccessUserDetails.UID, (Int16)AccessTypes.StockTransactions);
            lnkStock.Visible = clsDetails.Read;
            if (!clsDetails.Read)
            {
                divlnkStock.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowMyFavorites)
            {
                boShowMyFavorites = true;
            }

            lnkUpload.Visible = clsDetails.Read;
            //if (!clsDetails.Read) divactlnkUpload.Style.Add("display", "none");
            if (!clsDetails.Read)
            {
                divlnkUpload.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowActionBar)
            {
                boShowActionBar = true;
            }

            clsDetails = clsAccessRights.Details(clsAccessUserDetails.UID, (Int16)AccessTypes.AccessUsers);
            lnkAccessUserAdd.Visible = clsDetails.Write;
            if (!clsDetails.Read)
            {
                divlnkAccessUserAdd.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowActionBar)
            {
                boShowActionBar = true;
            }

            clsDetails = clsAccessRights.Details(clsAccessUserDetails.UID, (Int16)AccessTypes.ReportFormat);
            lnkReceiptFormatEdit.Visible = clsDetails.Write;
            if (!clsDetails.Read)
            {
                divlnkReceiptFormatEdit.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowActionBar)
            {
                boShowActionBar = true;
            }

            //divactlnkGLAUploadSales.Style.Add("display", "none");
            divlnkGLAUploadSales.Style.Add("display", "none");
            lnkGLAUploadSales.Visible = false;

            clsAccessRights.CommitAndDispose();

            if (!boShowMyFavorites)
            {
                divlblMyFavorites.Style.Add("display", "none");
                divtblMyFavorites.Style.Add("display", "none");
            }

            if (!boShowActionBar)
            {
                divlblActionBar.Style.Add("display", "none");
            }
        }
Esempio n. 23
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            bool boShowProductSetup = false;
            bool boShowContactSetup = false;
            bool boShowMiscSetup    = false;
            bool boShowActionBar    = false;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.Products);

            lnkProducts.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkProducts.Style.Add("display", "none");
            }

            lnkProductsDetailed.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkProductsDetailed.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowProductSetup)
            {
                boShowProductSetup = true;
            }

            lnkAddvariationType.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkAddvariationType.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowActionBar)
            {
                boShowActionBar = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.ProductGroups);
            lnkProductGroup.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkProductGroup.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowProductSetup)
            {
                boShowProductSetup = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.ProductSubGroups);
            lnkProductSubGroup.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkProductSubGroup.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowProductSetup)
            {
                boShowProductSetup = true;
            }

            clsDetails       = clsAccessRights.Details(UID, (int)AccessTypes.Promos);
            lnkPromo.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkPromo.Style.Add("display", "none");
            }
            // show label for Misc
            if (clsDetails.Read && !boShowProductSetup)
            {
                boShowProductSetup = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.PromosBySupplier);
            lnkPromoBySupplier.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkPromoBySupplier.Style.Add("display", "none");
            }
            // show label for Misc
            if (clsDetails.Read && !boShowProductSetup)
            {
                boShowProductSetup = true;
            }

            clsDetails           = clsAccessRights.Details(UID, (int)AccessTypes.Variations);
            lnkVariation.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkVariation.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowProductSetup)
            {
                boShowProductSetup = true;
            }

            clsDetails      = clsAccessRights.Details(UID, (int)AccessTypes.UnitMeasurement);
            lnkUnit.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkUnit.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowProductSetup)
            {
                boShowProductSetup = true;
            }

            clsDetails             = clsAccessRights.Details(UID, (int)AccessTypes.SynchronizeBranchProducts);
            lnkSynchronize.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkSynchronize.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Write && !boShowActionBar)
            {
                boShowActionBar = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.RewardPointsSetup);
            lnkChangeRewardPoints.Visible = clsDetails.Write;
            if (!clsDetails.Write)
            {
                divlnkChangeRewardPoints.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Write && !boShowActionBar)
            {
                boShowActionBar = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.ChangeProductPrices);
            lnkChangeProductPrice.Visible = clsDetails.Write;
            if (!clsDetails.Write)
            {
                divlnkChangeProductPrice.Style.Add("display", "none");
            }

            lnkChangeTax.Visible = clsDetails.Write;
            if (!clsDetails.Write)
            {
                divlnkChangeTax.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Write && !boShowActionBar)
            {
                boShowActionBar = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.PrintShlevesTagPrice);
            lnkChangeOSPrinter.Visible = clsDetails.Write;
            if (!clsDetails.Write)
            {
                divlnkChangeOSPrinter.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Write && !boShowActionBar)
            {
                boShowActionBar = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.ChangePriceLevel);
            lnkChangePriceLevel.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkChangePriceLevel.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Write && !boShowActionBar)
            {
                boShowActionBar = true;
            }

            // Contacts
            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.ContactGroups);
            lnkContactGroup.Visible = clsDetails.Read;

            clsDetails         = clsAccessRights.Details(UID, (int)AccessTypes.Contacts);
            lnkContact.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkContact.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Write && !boShowContactSetup)
            {
                boShowContactSetup = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.CustomerManagement);
            lnkContactDetailed.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkContactDetailed.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Write && !boShowContactSetup)
            {
                boShowContactSetup = true;
            }

            clsDetails           = clsAccessRights.Details(UID, (int)AccessTypes.Position);
            lnkPositions.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkPositions.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Write && !boShowContactSetup)
            {
                boShowContactSetup = true;
            }

            clsDetails             = clsAccessRights.Details(UID, (int)AccessTypes.Department);
            lnkDepartments.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkDepartments.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Write && !boShowContactSetup)
            {
                boShowContactSetup = true;
            }

            // Miscellaneous
            clsDetails          = clsAccessRights.Details(UID, (int)AccessTypes.Discounts);
            lnkDiscount.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkDiscount.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Write && !boShowMiscSetup)
            {
                boShowMiscSetup = true;
            }

            clsDetails            = clsAccessRights.Details(UID, (int)AccessTypes.CardType);
            lnkChargeType.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkCardType.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Write && !boShowMiscSetup)
            {
                boShowMiscSetup = true;
            }

            clsDetails            = clsAccessRights.Details(UID, (int)AccessTypes.ChargeType);
            lnkChargeType.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkChargeType.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Write && !boShowMiscSetup)
            {
                boShowMiscSetup = true;
            }

            clsAccessRights.CommitAndDispose();

            if (!boShowProductSetup)
            {
                divlblProductSetup.Style.Add("display", "none");
                divtblProductSetup.Style.Add("display", "none");
            }

            if (!boShowContactSetup)
            {
                divlblContactSetup.Style.Add("display", "none");
                divtblContactSetup.Style.Add("display", "none");
            }

            if (!boShowMiscSetup)
            {
                divlblMiscSetup.Style.Add("display", "none");
                divtblMiscSetup.Style.Add("display", "none");
            }

            if (!boShowActionBar)
            {
                divlblActionBar.Style.Add("display", "none");
            }
        }
Esempio n. 24
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            clsDetails            = clsAccessRights.Details(UID, (int)AccessTypes.Products);
            imgAdd.Visible        = clsDetails.Write;
            cmdAdd.Visible        = clsDetails.Write;
            imgDelete.Visible     = clsDetails.Write;
            cmdDelete.Visible     = clsDetails.Write;
            cmdEdit.Visible       = clsDetails.Write;
            idEdit.Visible        = clsDetails.Write;
            lblSeparator1.Visible = clsDetails.Write;
            lblSeparator2.Visible = clsDetails.Write;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.ProductUnitMatrix);
            lblUnitMatrixAccess.Text = Convert.ToInt16(clsDetails.Write).ToString();

            clsDetails            = clsAccessRights.Details(UID, (int)AccessTypes.ProductComposition);
            cmdCompose.Visible    = clsDetails.Write;
            idCompose.Visible     = clsDetails.Write;
            lblSeparator3.Visible = clsDetails.Write;

            clsDetails            = clsAccessRights.Details(UID, (int)AccessTypes.ItemSetupFinancial);
            cmdFinance.Visible    = clsDetails.Write;
            idFinance.Visible     = clsDetails.Write;
            lblSeparator4.Visible = clsDetails.Write;

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.Variations);
            lblVariationsAccess.Text = Convert.ToInt16(clsDetails.Write).ToString();

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.ProductPackage);
            lblProductPackageAccess.Text = Convert.ToInt16(clsDetails.Write).ToString();

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.InvAdjustment);
            lblInvAdjustmentAccess.Text = Convert.ToInt16(clsDetails.Write).ToString();

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.ProductsListReport);
            lblProductsListReportAccess.Text = Convert.ToInt16(clsDetails.Write).ToString();

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.ProductsListReport);
            lblProductsListReportAccess.Text = Convert.ToInt16(clsDetails.Write).ToString();

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.PricesReport);
            lblPricesReportAccess.Text = Convert.ToInt16(clsDetails.Write).ToString();

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.ChangeProductPrices);
            lblChangePriceAccess.Text = Convert.ToInt16(clsDetails.Write).ToString();

            clsAccessRights.CommitAndDispose();
        }
Esempio n. 25
0
        private void ManageSecurity()
        {
            Int64               UID             = Convert.ToInt64(Session["UID"]);
            AccessRights        clsAccessRights = new AccessRights();
            AccessRightsDetails clsDetails      = new AccessRightsDetails();

            bool boShowInventory = false;
            bool boShowActionBar = false;
            bool boShowReports   = false;

            clsDetails        = clsAccessRights.Details(UID, (int)AccessTypes.Branch);
            lnkBranch.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkBranch.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowInventory)
            {
                boShowInventory = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.InventoryList);
            lnkInventoryList.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkInventoryList.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowInventory)
            {
                boShowInventory = true;
            }

            clsDetails           = clsAccessRights.Details(UID, (int)AccessTypes.StockTypes);
            lnkStockType.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkStockType.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowInventory)
            {
                boShowInventory = true;
            }

            clsDetails       = clsAccessRights.Details(UID, (int)AccessTypes.StockTransactions);
            lnkStock.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkStock.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowInventory)
            {
                boShowInventory = true;
            }

            lnkUpload.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkUpload.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowActionBar)
            {
                boShowActionBar = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.BranchInventoryTransfer);
            lnkBranchTransfer.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkBranchTransfer.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowInventory)
            {
                boShowInventory = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.WarehouseToBranchTransfer);
            lnkWarehouseTransfer.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkWarehouseTransfer.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowInventory)
            {
                boShowInventory = true;
            }

            clsDetails            = clsAccessRights.Details(UID, (int)AccessTypes.TransferIn);
            lnkTransferIn.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkTransferIn.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowInventory)
            {
                boShowInventory = true;
            }

            clsDetails             = clsAccessRights.Details(UID, (int)AccessTypes.TransferOut);
            lnkTransferOut.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkTransferOut.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowInventory)
            {
                boShowInventory = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.InvAdjustment);
            lnkInvAdjustment.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkInvAdjustment.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowInventory)
            {
                boShowInventory = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.InvThreshold);
            lnkInvThreshold.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkInvThreshold.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowInventory)
            {
                boShowInventory = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.InventoryAnalyst);
            lnkInventoryAnalyst.Visible = clsDetails.Write;
            if (!clsDetails.Write)
            {
                divlnkInventoryAnalyst.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowActionBar)
            {
                boShowInventory = true;
            }

            clsDetails = clsAccessRights.Details(UID, (int)AccessTypes.CloseInventory);
            lnkCloseInventory.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkCloseInventory.Style.Add("display", "none");
            }

            lnkCloseInventoryProduct.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkCloseInventoryProduct.Style.Add("display", "none");
            }

            lnkCloseInventoryDetailed.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkCloseInventoryDetailed.Style.Add("display", "none");
            }

            lnkCLosingInventoryReport.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkCLosingInventoryReport.Style.Add("display", "none");
            }

            // show label for reporting
            if (clsDetails.Read && !boShowActionBar)
            {
                boShowActionBar = true;
            }

            clsDetails             = clsAccessRights.Details(UID, (int)AccessTypes.SynchronizeInventoryCount);
            lnkSynchronize.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkSynchronize.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowActionBar)
            {
                boShowActionBar = true;
            }

            clsDetails        = clsAccessRights.Details(UID, (int)AccessTypes.ExportInventoryCount);
            lnkExport.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkExport.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowActionBar)
            {
                boShowActionBar = true;
            }

            clsDetails        = clsAccessRights.Details(UID, (int)AccessTypes.ImportInventoryCount);
            lnkImport.Visible = clsDetails.Read;
            if (!clsDetails.Write)
            {
                divlnkImport.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowActionBar)
            {
                boShowActionBar = true;
            }

            clsDetails           = clsAccessRights.Details(UID, (int)AccessTypes.InventoryReport);
            lnkInventory.Visible = clsDetails.Read;
            if (!clsDetails.Read)
            {
                divlnkInventory.Style.Add("display", "none");
            }

            lnkBranchInventory.Visible = clsDetails.Read;
            if (!clsDetails.Read)
            {
                divlnkBranchInventory.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowReports)
            {
                boShowReports = true;
            }

            clsDetails            = clsAccessRights.Details(UID, (int)AccessTypes.eInventoryReport);
            lnkeInventory.Visible = clsDetails.Read;
            if (!clsDetails.Read)
            {
                divlnkeInventory.Style.Add("display", "none");
            }
            // show label for reporting
            if (clsDetails.Read && !boShowReports)
            {
                boShowReports = true;
            }

            //lnkExpiredInventory.Visible = clsDetails.Read;

            //clsDetails = clsAccessRights.Details(UID,(int) AccessTypes.ReorderReport);
            //lnkReorder.Visible = clsDetails.Read;

            //clsDetails = clsAccessRights.Details(UID,(int) AccessTypes.OverStockReport);
            //lnkOverStock.Visible = clsDetails.Read;

            //clsDetails = clsAccessRights.Details(UID,(int) AccessTypes.TotalStockReport);
            //lnkTotalStock.Visible = clsDetails.Read;

            clsAccessRights.CommitAndDispose();

            if (!boShowInventory)
            {
                divlblInventory.Style.Add("display", "none");
                divtblInventory.Style.Add("display", "none");
            }

            if (!boShowActionBar)
            {
                divlblActionBar.Style.Add("display", "none");
            }

            if (!boShowReports)
            {
                divlblReports.Style.Add("display", "none");
            }
        }
Esempio n. 26
0
		private void ManageSecurity()
		{
			Int64 UID = Convert.ToInt64(Session["UID"]);
			AccessRights clsAccessRights = new AccessRights(); 
			AccessRightsDetails clsDetails = new AccessRightsDetails();

			clsDetails = clsAccessRights.Details(UID,(int) AccessTypes.AccessGroups); 
			imgAdd.Visible = clsDetails.Write; 
			cmdAdd.Visible = clsDetails.Write; 
			imgDelete.Visible = clsDetails.Write; 
			cmdDelete.Visible = clsDetails.Write; 
			cmdEdit.Visible = clsDetails.Write; 
			idEdit.Visible = clsDetails.Write; 
			lblSeparator1.Visible = clsDetails.Write;
			lblSeparator2.Visible = clsDetails.Write;

			clsAccessRights.CommitAndDispose();
		}