private void Flag_Updated(object sender, FlagUpdatedEventArgs e)
        {
            int flagTypeId = e.FlagId;

            const string resource    = "account_statement";
            const string resourceKey = "transaction_code";

            int userId = AppUsers.GetCurrent().View.UserId.ToInt();

            Flags.CreateFlag(AppUsers.GetCurrentUserDB(), userId, flagTypeId, resource, resourceKey,
                             this.GetSelectedValues());

            this.BindGridView();
            this.CreateAccountOverviewPanel(this.accountOverviewTab);
        }
        private void Flag_Updated(object sender, FlagUpdatedEventArgs e)
        {
            int flagTypeId = e.FlagId;

            const string resource    = "transactions.inventory_transfer_requests";
            const string resourceKey = "inventory_transfer_request_id";

            if (string.IsNullOrWhiteSpace(resource))
            {
                throw new MixERPException(Warnings.CannotCreateFlagTransactionTableNull);
            }


            Flags.CreateFlag(AppUsers.GetCurrentUserDB(), AppUsers.GetCurrent().View.UserId.ToInt(), flagTypeId,
                             resource, resourceKey,
                             this.GetSelectedValues().Select(t => Conversion.TryCastString(t)).ToList().ToCollection());

            this.BindGridView();
        }
Esempio n. 3
0
        private void Flag_Updated(object sender, FlagUpdatedEventArgs e)
        {
            int flagTypeId = e.FlagId;

            string resource    = this.DbTableName;
            string resourceKey = this.PrimaryKey;

            if (string.IsNullOrWhiteSpace(resource))
            {
                throw new MixERPException(Warnings.CannotCreateFlagTransactionTableNull);
            }

            if (string.IsNullOrWhiteSpace(resourceKey))
            {
                throw new MixERPException(Warnings.CannotCreateFlagTransactionTablePrimaryKeyNull);
            }


            Flags.CreateFlag(this.UserId, flagTypeId, resource, resourceKey, this.GetSelectedValues().Select(t => Conversion.TryCastString(t)).ToList().ToCollection());

            this.LoadGridView();
        }