Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString["id"] == null)
                {
                    Response.Redirect("ProductList.aspx");
                }
                var id      = Convert.ToInt32(Request.QueryString["id"]);
                var product = ProductBll.GetProductById(id);
                tbxPrice.Text            = product.Price.ToString();
                tbxProductDesc.Text      = product.ProductDesc;
                tbxProductNO.Text        = product.ProductNo;
                tbxProductName.Text      = product.ProductName;
                imgProductImage.ImageUrl = product.ProductImage;
                WebControlUtil.BindDropDownList(ddlProductTypes, YeProductTypes, "ProductTypeName", "ProductTypeID");
                WebControlUtil.BindDropDownList(ddlUnits, ProductBll.GetUnits().ToList(), "UnitName", "UnitID");
                ddlProductTypes.SelectedValue = product.ProductTypeID.ToString();
                ddlUnits.SelectedValue        = product.UnitId.ToString();
            }
            var ltl = this.Master.FindControl("ltlSiteMapPath") as Literal;

            ltl.Text = WebUtil.CreateBreadcrumbs(new List <Tuple <string, string> >()
            {
                new Tuple <string, string>("YellEat 后台管理系统", ""),
                new Tuple <string, string>("餐馆管理首页", ""),
                new Tuple <string, string>("菜单管理", ""),
                new Tuple <string, string>("修改菜单", "")
            });
        }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Form.Enctype = "multipart/form-data";
     if (!IsPostBack)
     {
         WebControlUtil.BindDropDownList(ddlProductTypes, YeProductTypes, "ProductTypeName", "ProductTypeID");
         WebControlUtil.BindDropDownList(ddlUnits, ProductBll.GetUnits().ToList(), "UnitName", "UnitID");
     }
 }
Example #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         CheckPower(AdminPower.分配权限管理);
         WebControlUtil.BindDropDownList(ddl, AdministratorBll.GetAdministrators().ToArray(), "Account", "AdministratorID");
         ddl.SelectedValue = YeAdministratorId.ToString();
         BindData(YeAdministratorId);
     }
 }