예제 #1
0
        public override void OnControlLoad(object sender, EventArgs e)
        {
            string accountNumber = this.Page.Request["AccountNumber"];
            DateTime from = Conversion.TryCastDate(this.Page.Request["From"]);
            DateTime to = Conversion.TryCastDate(this.Page.Request["To"]);

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

            Collection<KeyValuePair<string, object>> parameter1 = new Collection<KeyValuePair<string, object>>();
            parameter1.Add(new KeyValuePair<string, object>("@OfficeId", officeId.ToString(CultureInfo.InvariantCulture)));
            parameter1.Add(new KeyValuePair<string, object>("@AccountNumber", accountNumber));

            Collection<KeyValuePair<string, object>> parameter2 = new Collection<KeyValuePair<string, object>>();
            parameter2.Add(new KeyValuePair<string, object>("@From", from));
            parameter2.Add(new KeyValuePair<string, object>("@To", to));
            parameter2.Add(new KeyValuePair<string, object>("@UserId", userId.ToString(CultureInfo.InvariantCulture)));
            parameter2.Add(new KeyValuePair<string, object>("@AccountNumber", accountNumber));
            parameter2.Add(new KeyValuePair<string, object>("@OfficeId", officeId.ToString(CultureInfo.InvariantCulture)));

            using (WebReport report = new WebReport())
            {
                report.AddParameterToCollection(parameter1);
                report.AddParameterToCollection(parameter2);
                report.RunningTotalText = Titles.RunningTotal;
                report.Path = "~/Modules/Finance/Reports/Source/Transactions.AccountStatement.xml";
                report.AutoInitialize = true;

                this.Placeholder1.Controls.Add(report);
            }
        }
        public override void OnControlLoad(object sender, EventArgs e)
        {
            string itemCode = this.Page.Request["ItemCode"];
            DateTime from = Conversion.TryCastDate(this.Page.Request["From"]);
            DateTime to = Conversion.TryCastDate(this.Page.Request["To"]);
            int storeId = Conversion.TryCastInteger(this.Page.Request["StoreId"]);

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


            Collection<KeyValuePair<string, object>> parameter1 = new Collection<KeyValuePair<string, object>>();
            parameter1.Add(new KeyValuePair<string, object>("@ItemCode", itemCode));

            Collection<KeyValuePair<string, object>> parameter2 = new Collection<KeyValuePair<string, object>>();
            parameter2.Add(new KeyValuePair<string, object>("@From", from));
            parameter2.Add(new KeyValuePair<string, object>("@To", to));
            parameter2.Add(new KeyValuePair<string, object>("@UserId", userId.ToString(CultureInfo.InvariantCulture)));
            parameter2.Add(new KeyValuePair<string, object>("@ItemCode", itemCode));
            parameter2.Add(new KeyValuePair<string, object>("@StoreId", storeId.ToString(CultureInfo.InvariantCulture)));

            using (WebReport report = new WebReport())
            {
                report.AddParameterToCollection(parameter1);
                report.AddParameterToCollection(parameter2);
                report.RunningTotalText = Titles.RunningTotal;
                report.Path = "~/Modules/Inventory/Reports/Source/Inventory.AccountStatement.xml";
                report.AutoInitialize = true;

                this.Controls.Add(report);
            }
        }
예제 #3
0
        public override void OnControlLoad(object sender, EventArgs e)
        {
            string tranId = this.Page.Request["TranId"];
            string tranCode = this.Page.Request["TranCode"];

            if (Conversion.TryCastLong(tranId).Equals(0))
            {
                if (!string.IsNullOrWhiteSpace(tranCode))
                {
                    tranId =
                        Transaction.GetTranIdByTranCode(AppUsers.GetCurrentUserDB(), tranCode)
                            .ToString(CultureInfo.InvariantCulture);
                }
            }

            Collection<KeyValuePair<string, object>> list = new Collection<KeyValuePair<string, object>>();
            list.Add(new KeyValuePair<string, object>("@transaction_master_id", tranId));

            using (WebReport report = new WebReport())
            {
                report.AddParameterToCollection(list);
                report.AddParameterToCollection(list);
                report.RunningTotalText = Titles.RunningTotal;
                report.Path = "~/Modules/Finance/Reports/Source/Transactions.GLEntry.xml";
                report.AutoInitialize = true;

                this.Placeholder1.Controls.Add(report);
            }
        }
예제 #4
0
        public override void OnControlLoad(object sender, EventArgs e)
        {
            DateTime previousPeriod = Conversion.TryCastDate(this.Page.Request["PreviousPeriod"]);
            DateTime currentPeriod = Conversion.TryCastDate(this.Page.Request["CurrentPeriod"]);
            decimal factor = Conversion.TryCastDecimal(this.Page.Request["Factor"]);

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

            Collection<KeyValuePair<string, object>> parameter2 = new Collection<KeyValuePair<string, object>>();
            parameter2.Add(new KeyValuePair<string, object>("@PreviousPeriod", previousPeriod));
            parameter2.Add(new KeyValuePair<string, object>("@CurrentPeriod", currentPeriod));
            parameter2.Add(new KeyValuePair<string, object>("@UserId", userId.ToString(CultureInfo.InvariantCulture)));
            parameter2.Add(new KeyValuePair<string, object>("@Factor", factor.ToString(CultureInfo.InvariantCulture)));
            parameter2.Add(new KeyValuePair<string, object>("@OfficeId", officeId.ToString(CultureInfo.InvariantCulture)));

            using (WebReport report = new WebReport())
            {
                report.AddParameterToCollection(parameter2);
                report.Path = "~/Modules/Finance/Reports/Source/Transactions.BalanceSheet.xml";
                report.AutoInitialize = true;

                this.Placeholder1.Controls.Add(report);
            }
        }
        public override void OnControlLoad(object sender, EventArgs e)
        {

            DateTime fromDate = Conversion.TryCastDate(this.Page.Request["FromDate"]);
            DateTime toDate = Conversion.TryCastDate(this.Page.Request["ToDate"]);
            decimal factor = Conversion.TryCastDecimal(this.Page.Request["Factor"]);
            bool compact = Conversion.TryCastBoolean(this.Page.Request["Compact"]);
            bool changeSide = Conversion.TryCastBoolean(this.Page.Request["ChangeSide"]);
            bool includeZeroBalanceAccounts = Conversion.TryCastBoolean(this.Page.Request["IncludeZeroBalanceAccounts"]);

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


            Collection<KeyValuePair<string, object>> parameter1 = new Collection<KeyValuePair<string, object>>();
            parameter1.Add(new KeyValuePair<string, object>("@From", fromDate));
            parameter1.Add(new KeyValuePair<string, object>("@To", toDate));
            parameter1.Add(new KeyValuePair<string, object>("@OfficeId", officeId.ToString(CultureInfo.InvariantCulture)));
            parameter1.Add(new KeyValuePair<string, object>("@Compact", compact.ToString(CultureInfo.InvariantCulture)));
            parameter1.Add(new KeyValuePair<string, object>("@Factor", factor.ToString(CultureInfo.InvariantCulture)));
            parameter1.Add(new KeyValuePair<string, object>("@UserId", userId.ToString(CultureInfo.InvariantCulture)));
            parameter1.Add(new KeyValuePair<string, object>("@ChangeSideWhenNegative", changeSide.ToString(CultureInfo.InvariantCulture)));
            parameter1.Add(new KeyValuePair<string, object>("@IncludeZeroBalanceAccounts", includeZeroBalanceAccounts.ToString(CultureInfo.InvariantCulture)));
           

            using (WebReport report = new WebReport())
            {
                report.AddParameterToCollection(parameter1);
                report.RunningTotalText = Titles.RunningTotal;
                report.Path = "~/Modules/Finance/Reports/Source/Transactions.TrialBalance.xml";
                report.AutoInitialize = true;

                this.Placeholder1.Controls.Add(report);
            }
        }
예제 #6
0
 protected void Page_Init(object sender, EventArgs e)
 {
     this.report = new WebReport();
     this.report.Catalog = AppUsers.GetCurrentUserDB();
     this.report.AutoInitialize = false;
     this.Placeholder1.Controls.Add(this.report);
     this.AddParameters();
 }
 public override void OnControlLoad(object sender, EventArgs e)
 {
     using (WebReport report = new WebReport())
     {
         report.AutoInitialize = true;
         report.NoHeader = true;
         report.Path = "~/Modules/Sales/Reports/Source/TopSellingProductsOfAllTime.xml";
         this.Controls.Add(report);
     }
 }
예제 #8
0
        public override void OnControlLoad(object sender, EventArgs e)
        {
            Collection<KeyValuePair<string, object>> list = new Collection<KeyValuePair<string, object>>();
            list.Add(new KeyValuePair<string, object>("@transaction_master_id", this.Page.Request["TranId"]));

            using (WebReport report = new WebReport())
            {
                report.AddParameterToCollection(list);
                report.AddParameterToCollection(list);
                report.AutoInitialize = true;
                report.Path = "~/Modules/Sales/Reports/Source/Sales.CustomerDeliveryNote.xml";
                this.Controls.Add(report);
            }
        }
        public override void OnControlLoad(object sender, EventArgs e)
        {
            Collection<KeyValuePair<string, object>> list = new Collection<KeyValuePair<string, object>>();
            list.Add(new KeyValuePair<string, object>("@office_id", AppUsers.GetCurrent().View.OfficeId.ToInt() ));

            using (WebReport report = new WebReport())
            {
                report.AutoInitialize = true;
                report.NoHeader = true;
                report.AddParameterToCollection (list);
                report.Path = "~/Modules/Sales/Reports/Source/SalesByOffice.xml";
                this.Controls.Add(report);
            }
        }
예제 #10
0
        public override void OnControlLoad(object sender, EventArgs e)
        {
            Collection<KeyValuePair<string, object>> list = new Collection<KeyValuePair<string, object>>();
            list.Add(new KeyValuePair<string, object>("@wage_processing_id", this.Page.Request["WageProcessingId"]));

            using (WebReport report = new WebReport())
            {
                report.AddParameterToCollection(list);
                report.AddParameterToCollection(list);
                report.AutoInitialize = true;
                report.Path = "~/Modules/HRM/Reports/Source/HRM.Payroll.PaySlip.xml";

                this.Controls.Add(report);
            }
        }
예제 #11
0
        public override void OnControlLoad(object sender, EventArgs e)
        {
            Collection<KeyValuePair<string, object>> list = new Collection<KeyValuePair<string, object>>();
            list.Add(new KeyValuePair<string, object>("@TranCode", this.Page.Request["TranCode"]));

            using (WebReport report = new WebReport())
            {
                report.AddParameterToCollection(list);
                report.AddParameterToCollection(list);
                report.AutoInitialize = true;
                report.Path = "~/Modules/Inventory/Reports/Source/Inventory.Advice.xml";

                this.Controls.Add(report);
            }
        }
예제 #12
0
        public override void OnControlLoad(object sender, EventArgs e)
        {
            Collection<KeyValuePair<string, object>> list = new Collection<KeyValuePair<string, object>>();
            list.Add(new KeyValuePair<string, object>("@transaction_master_id", this.Page.Request["TranId"]));

            using (WebReport report = new WebReport())
            {
                report.AddParameterToCollection(list);
                report.AddParameterToCollection(list);
                report.RunningTotalText = Titles.RunningTotal;
                report.Path = "~/Modules/Finance/Reports/Source/Transactions.StockTransaction.xml";
                report.AutoInitialize = true;

                this.Controls.Add(report);
            }
        }
        protected void Page_Init(object sender, EventArgs e)
        {
            string validationId = this.Page.Request.QueryString["ValidationId"];

            if (string.IsNullOrWhiteSpace(validationId))
            {
                this.DisplayError(Warnings.AccessIsDenied);
                return;
            }

            this.quotation = Data.Public.ApproveQuotation.GetQuotation(validationId);

            if (this.quotation == null || this.quotation.TranId <= 0)
            {
                this.DisplayError(Warnings.AccessIsDenied);
                return;
            }

            if (this.quotation.Accepted)
            {
                this.DisplayError(string.Format(Labels.SalesQuotationAlreadyAccepted, this.quotation.AcceptedOn));
                return;
            }


            string catalog = this.quotation.Catalog;

            Collection<KeyValuePair<string, object>> list = new Collection<KeyValuePair<string, object>>();
            list.Add(new KeyValuePair<string, object>("@non_gl_stock_master_id", this.quotation.TranId));

            using (WebReport report = new WebReport())
            {
                report.Catalog = catalog;
                report.NoHeader = true;
                report.AddParameterToCollection(list);
                report.AddParameterToCollection(list);
                report.AutoInitialize = true;
                report.Path = "~/Modules/Sales/Reports/Source/Sales.Quotation.xml";

                this.Placeholder1.Controls.Add(report);
            }

            this.AcceptButton.Text = Titles.Accept;
            this.AcceptButton.Visible = true;
            this.AcceptButton.Enabled = this.IsValid();
        }
예제 #14
0
        public override void OnControlLoad(object sender, EventArgs e)
        {
            int officeId = AppUsers.GetCurrent().View.OfficeId.ToInt();

            Collection<KeyValuePair<string, object>> parameter1 = new Collection<KeyValuePair<string, object>>();
            parameter1.Add(new KeyValuePair<string, object>("@OfficeId", officeId.ToString(CultureInfo.InvariantCulture)));

            Collection<KeyValuePair<string, object>> parameter2 = new Collection<KeyValuePair<string, object>>();
            parameter2.Add(new KeyValuePair<string, object>("@OfficeId", officeId.ToString(CultureInfo.InvariantCulture)));

            using (WebReport report = new WebReport())
            {
                report.AddParameterToCollection(parameter1);
                report.AddParameterToCollection(parameter2);
                report.Path = "~/Modules/Finance/Reports/Source/Exchange.Rates.xml";
                report.AutoInitialize = true;

                this.Placeholder1.Controls.Add(report);
            }
        }
        public override void OnControlLoad(object sender, EventArgs e)
        {
            DateTime date = Conversion.TryCastDate(this.Page.Request["Date"]);
            decimal factor = Conversion.TryCastDecimal(this.Page.Request["Factor"]);

            int officeId = AppUsers.GetCurrentLogin().View.OfficeId.ToInt();

            Collection<KeyValuePair<string, object>> parameter1 = new Collection<KeyValuePair<string, object>>();
            parameter1.Add(new KeyValuePair<string, object>("@Date", date));
            parameter1.Add(new KeyValuePair<string, object>("@Factor", factor.ToString(CultureInfo.InvariantCulture)));
            parameter1.Add(new KeyValuePair<string, object>("@OfficeId", officeId.ToString(CultureInfo.InvariantCulture)));

            using (WebReport report = new WebReport())
            {
                report.AddParameterToCollection(parameter1);
                report.RunningTotalText = Titles.RunningTotal;
                report.Path = "~/Modules/Finance/Reports/Source/Transactions.RetainedEarnings.xml";
                report.AutoInitialize = true;

                this.Placeholder1.Controls.Add(report);
            }
        }