Exemple #1
0
        private void AddGridView(HtmlGenericControl container)
        {
            this.transactionGridView                     = new MixERPGridView();
            this.transactionGridView.ID                  = "TransactionGridView";
            this.transactionGridView.GridLines           = GridLines.None;
            this.transactionGridView.AutoGenerateColumns = false;
            this.transactionGridView.CssClass            = this.GridViewCssClass;
            this.transactionGridView.RowDataBound       += this.TransactionGridView_RowDataBound;
            GridViewColumnHelper.AddColumns(this.transactionGridView);

            container.Controls.Add(this.transactionGridView);
        }
Exemple #2
0
        private void LoadGridView()
        {
            DateTime dateFrom           = Conversion.TryCastDate(this.dateFromDateTextBox.Text);
            DateTime dateTo             = Conversion.TryCastDate(this.dateToDateTextBox.Text);
            string   office             = this.officeInputText.Value;
            string   party              = this.partyInputText.Value;
            string   priceType          = string.Empty;
            string   user               = this.userInputText.Value;
            string   referenceNumber    = this.referenceNumberInputText.Value;
            string   statementReference = this.statementReferenceInputText.Value;
            string   bookName           = TransactionBookHelper.GetInvariantTransactionBookName(this.Book, this.SubBook);

            if (this.priceTypeInputText != null)
            {
                priceType = this.priceTypeInputText.Value;
            }

            int userId   = this.UserId;
            int officeId = this.OfficeId;

            GridViewColumnHelper.AddColumns(this.productViewGridView, this.SubBook);

            if (this.IsNonGlTransaction)
            {
                this.productViewGridView.DataSource = NonGlStockTransaction.GetView(this.Catalog, userId, bookName, officeId, dateFrom,
                                                                                    dateTo, office, party, priceType, user, referenceNumber, statementReference);
                this.productViewGridView.DataBind();
                return;
            }

            if (this.Book == TranBook.Sales && this.SubBook == SubTranBook.Receipt)
            {
                this.productViewGridView.DataSource = CustomerReceipts.GetView(this.Catalog, userId, officeId, dateFrom, dateTo,
                                                                               office, party, user, referenceNumber, statementReference);
                this.productViewGridView.DataBind();
                return;
            }


            this.productViewGridView.DataSource = GLStockTransaction.GetView(this.Catalog, userId, bookName, officeId, dateFrom,
                                                                             dateTo, office, party, priceType, user, referenceNumber, statementReference);
            this.productViewGridView.DataBind();
        }