コード例 #1
0
ファイル: Events.cs プロジェクト: roczj/mixerp
        private void Flag_Updated(object sender, FlagUpdatedEventArgs e)
        {
            int flagTypeId = e.FlagId;

            const string resource = "transactions.transaction_master";
            const string resourceKey = "transaction_master_id";

            int userId = this.UserId;

            TransactionGovernor.Flags.CreateFlag(this.Catalog, userId, flagTypeId, resource, resourceKey, this.GetSelectedValues());

            this.BindGrid();
        }
コード例 #2
0
ファイル: Flag.cs プロジェクト: JonathanValle/mixerp
        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.Catalog, this.UserId, flagTypeId, resource, resourceKey, this.GetSelectedValues().Select(t => Conversion.TryCastString(t)).ToList().ToCollection());

            this.LoadGridView();
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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();
        }