Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack)
     {
         return;
     }
     try
     {
         if (Request["id"] is null)
         {
             Jieshu = BLL.Product.GetJs(2)[0];
         }
         else
         {
             var s  = Request["id"];
             var js = BLL.Product.GetJs(int.Parse(s));
             if (js.Count < 0)
             {
                 Response.Redirect("error.html");
             }
             else
             {
                 Jieshu = js[0];
             }
         }
     }
     catch (Exception)
     {
         Response.Redirect("error.html");
     }
 }
Exemplo n.º 2
0
 public int Edit(jieshu js) { return jsm.Edit(js); }
Exemplo n.º 3
0
 public int Add(jieshu js)
 {
     return jsm.Add(js);
 }
Exemplo n.º 4
0
 public int Edit(jieshu js)
 {
     string sql = "update jieshu set Name=@Name,Title=@Title,Contact=@Contact,Image=@Image,Link=@Link where Id=@Id "; return(SqlHelper <jieshu> .ExecuteNonQuery(sql, js));
 }
Exemplo n.º 5
0
        public int Add(jieshu js)
        {
            string sql = "insert into jieshu(Id,Name,Title,Contact,Image,Link) values(@Id,@Name,@Title,@Contact,@Image,@Link)";

            return(SqlHelper <jieshu> .ExecuteNonQuery(sql, js));
        }