Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     string strParam = Request["rid"];
     string strParamProduct = Request["pid"];
     Guid routeId;
     Guid productId;
     if (!Guid.TryParse(strParamProduct, out productId))
     {
         ErrHandler.Redirect(ErrType.ParamIllegal);
     }
     if (Guid.TryParse(strParam, out routeId))
     {
         CurrentRoute = bllRoute.GetById(routeId);
         CurrentProduct = bllProduct.GetById(productId);
     }
     else
     {
         IsNew = true;
     }
     if (!IsPostBack)
     {
         if (!IsNew)
         {
             LoadForm();
         }
     }
 }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (ProductId == null)
     {
         Response.Write("请提供有效的ProductId");
     }
     CurrentProduct = bllPro.GetById(ProductId);
 }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string paramstr = Request["productId"];
        if (!Guid.TryParse(paramstr, out ProductId))
        {
            IsNew = true;
            Product = new DJ_Product();

        }
        else
        {
            Product = bllProduct.GetById(ProductId);
        }

        if (!IsPostBack)
        {
            if (!IsNew)
            {
                LoadForm();
            }

        }
    }
Пример #4
0
 public void Save(DJ_Product product)
 {
     DalDJProduc.Save(product);
 }