Esempio n. 1
0
        protected override void Init()
        {
            base.Init();

            permissionAllBranch = GlobalVariable.GetPermission((int)ObjectNames.CloseDayAllBranch);

            lookBranch.Properties.ReadOnly = !IsPermitted(permissionAllBranch, DatabaseAction.View);
        }
Esempio n. 2
0
        protected override void Init()
        {
            base.Init();

            _PermissionAllBranch = GlobalVariable.GetPermission((int)ObjectNames.SalesOrderDetailInfoAllBranch);

            lookBranch.Properties.ReadOnly = !IsPermitted(_PermissionAllBranch, DatabaseAction.View);
        }
        protected override void Init()
        {
            base.Init();

            _permissionAllBranch = GlobalVariable.GetPermission((int)ObjectNames.ProductDistributionHeaderAllBranch);

            lookFromBranch.Properties.ReadOnly   =
                lookToBranch.Properties.ReadOnly = !IsPermitted(_permissionAllBranch, DatabaseAction.View);
        }
Esempio n. 4
0
        protected override void Init()
        {
            base.Init();

            _PermissionAllBranch = GlobalVariable.GetPermission((int)ObjectNames.PurchaseOrderHeaderAllBranch);

            lookBranch.Properties.ReadOnly = !IsPermitted(_PermissionAllBranch, DatabaseAction.View);

            miGenerateSales.Enabled = IsPermitted(ObjectNames.SalesOrderHeaderByPurchaseID, DatabaseAction.Add);
        }
Esempio n. 5
0
        protected override void Init()
        {
            base.Init();

            permissionAllBranch = GlobalVariable.GetPermission((int)ObjectNames.CloseDayAllBranch);

            OptionsBaseForm.ReadOnly = (OptionsBaseForm.ReadOnly || (BranchID != GlobalVariable.BranchID && !IsPermitted(permissionAllBranch, Action)));

            lookBranch.Properties.ReadOnly    = OptionsBaseForm.ReadOnly || !IsPermitted(permissionAllBranch, Action);
            dateCloseDate.Properties.ReadOnly = OptionsBaseForm.ReadOnly;
            memoComment.Properties.ReadOnly   = OptionsBaseForm.ReadOnly;
        }
Esempio n. 6
0
 protected override void InitPermission()
 {
     if (ObjectName == ObjectNames.None)
     {
         return;
     }
     try
     {
         _permission = GlobalVariable.GetPermission(FormEnum.ToInt32());
     }
     catch (Exception ex)
     {
         ExceptionHelper.Show(this, ex, "უფლებების ინიციალიზაცია ვერ მოხერხდა მონაცემთა ბაზიდან", MessageBoxIcon.Error);
     }
 }
Esempio n. 7
0
        protected override void Init()
        {
            base.Init();

            if (OptionsListForm.ServerMode)
            {
                OptionsListForm.IsFilterable = false;
                OptionsListForm.IsTopable    = false;
                gridView.Columns.Remove(colBranchName);
                gridView.Columns.Remove(col__PurchaseLineTotal);
                gridView.Columns.Remove(col__SalesLineTotal);
                gridView.Columns.Remove(col__PurchaseTaxAmt);
                gridView.Columns.Remove(col__SalesTaxAmt);
            }
            else
            {
                OptionsBaseForm.IsPrintable = true;
            }

            _PermissionAllBranch           = GlobalVariable.GetPermission((int)ObjectNames.PurchaseOrderHeaderAllBranch);
            lookBranch.Properties.ReadOnly = !IsPermitted(_PermissionAllBranch, DatabaseAction.View);
        }
Esempio n. 8
0
 public static bool IsPermitted(ObjectNames objectName, int permissionToCheck)
 {
     return(IsPermitted(GlobalVariable.GetPermission((int)objectName), permissionToCheck));
 }