示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack || string.IsNullOrEmpty(Request.QueryString["Id"]))
            {
                return;
            }

            Distributor d = ControllerManager.Distributor.GetById(Convert.ToInt32(Request.QueryString["Id"]));

            if (d != null && d.PriceList != null)
            {
                PublishList pl = ControllerManager.PublishList.GetCurrentList(d.PriceList.ID);
                if (pl != null)
                {
                    PriceMasterList1.PublishListID = pl.ID;
                }

                PriceMasterList1.DistributorID = d.ID;
                PriceMasterList1.DataBind();
            }
            else
            {
                PriceMasterList1.Visible = false;
                lblNoPriceList.Visible   = true;
            }
        }
示例#2
0
        protected void btnPublish_Click(object sender, EventArgs e)
        {
            if (!Page.IsValid)
            {
                return;
            }

            string      path = Server.MapPath("/img/") + "PdfHeader.GIF";
            PublishList pl   = ControllerManager.PriceList.Publish(PriceListID, Convert.ToDateTime(txtDate.Text), txtComercialConditions.Text, txtBodyMail.Text, path);

            if (pl != null)
            {
                Response.Redirect("/pricelists/items/published/?Id=" + PriceListID.ToString());
            }
        }
示例#3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack && !string.IsNullOrEmpty(Request.QueryString["Id"]))
            {
                CategoryView1.PriceListID = Convert.ToInt32(Request.QueryString["Id"]);

                PublishList pl = ControllerManager.PublishList.GetPublishedList(Convert.ToInt32(Request.QueryString["Id"]));
                if (pl != null)
                {
                    CategoryView1.PublishListID = pl.ID;
                }

                CategoryView1.UrlToNavigate = "/pricelists/items/published/";
                CategoryView1.DataBind();
            }
        }
示例#4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack && !string.IsNullOrEmpty(Request.QueryString["Id"]))
            {
                PublishList pl =
                    ControllerManager.PublishList.GetPublishedList(Convert.ToInt32(Request.QueryString["Id"]));

                if (pl != null)
                {
                    PriceMasterList1.PublishListID = pl.ID;
                }
                if (!string.IsNullOrEmpty(Request.QueryString["CatalogPageId"]))
                {
                    PriceMasterList1.CatalogPageID = Convert.ToInt32(Request.QueryString["CatalogPageId"]);
                }
                PriceMasterList1.DataBind();
            }
        }