Exemple #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();
         }
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (ProductId == null)
     {
         Response.Write("请提供有效的ProductId");
     }
     CurrentProduct = bllPro.GetById(ProductId);
 }
Exemple #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();
            }

        }
    }
Exemple #4
0
 public void Save(DJ_Product product)
 {
     DalDJProduc.Save(product);
 }