Esempio n. 1
0
        private void Application_Start(object sender, EventArgs e)
        {
            LogManager.IntializeLogger();
            WebJobManager.Register();
            UpdateManager.CheckForUpdates(this.Application);
            Routes.RegisterRoutes(RouteTable.Routes);

            GlobalLogin.CreateTable();
            SalesQuotationValidation.CreateTable();
            Repository.DownloadAndInstallReports();
        }
Esempio n. 2
0
        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();
        }
        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();
        }