예제 #1
0
 public bool UpdateFriendExtensionImg(FriendExtensionInfo review)
 {
     DbCommand sqlStringCommand = this.database.GetSqlStringCommand("UPDATE Hishop_FriendExtension set  ExensionImg=@ExensionImg WHERE ExtensionId = @ExtensionId  ");
     this.database.AddInParameter(sqlStringCommand, "ExensionImg", DbType.String, review.ExensionImg);
     this.database.AddInParameter(sqlStringCommand, "ExtensionId", DbType.Int64, review.ExtensionId);
     return (this.database.ExecuteNonQuery(sqlStringCommand) > 0);
 }
예제 #2
0
 public bool InsertFriendExtension(FriendExtensionInfo review)
 {
     DbCommand sqlStringCommand = this.database.GetSqlStringCommand("INSERT INTO Hishop_FriendExtension (ExensiontRemark, ExensionImg) VALUES(@ExensiontRemark, @ExensionImg)");
     this.database.AddInParameter(sqlStringCommand, "ExensiontRemark", DbType.String, review.ExensiontRemark);
     this.database.AddInParameter(sqlStringCommand, "ExensionImg", DbType.String, review.ExensionImg);
     return (this.database.ExecuteNonQuery(sqlStringCommand) > 0);
 }
예제 #3
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     FriendExtensionInfo query = new FriendExtensionInfo {
         ExensionImg = this.hidpic.Value,
         ExensiontRemark = this.txtName.Text.Trim(),
         ExtensionId = int.Parse(base.Request.QueryString["ExtensionId"])
     };
     if (ProductCommentHelper.UpdateFriendExtension(query))
     {
         this.ShowMsg("修改成功", true);
         if (!string.IsNullOrEmpty(this.hidpicdel.Value))
         {
             foreach (string str in this.hidpicdel.Value.Split(new char[] { '|' }))
             {
                 string path = str;
                 path = base.Server.MapPath(path);
                 if (File.Exists(path))
                 {
                     File.Delete(path);
                 }
             }
         }
         this.hidpicdel.Value = "";
     }
     else
     {
         this.ShowMsg("修改失败", false);
     }
 }
예제 #4
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     FriendExtensionInfo query = new FriendExtensionInfo {
         ExensionImg = this.hidpic.Value,
         ExensiontRemark = this.txtName.Text.Trim()
     };
     if (ProductCommentHelper.InsertFriendExtension(query))
     {
         this.ShowMsg("保存成功", true);
         this.hidpic.Value = "";
         this.txtName.Text = "";
     }
     else
     {
         this.ShowMsg("保存失败", false);
     }
 }
예제 #5
0
 public static bool UpdateFriendExtensionImg(FriendExtensionInfo Query)
 {
     return new FriendExtensionDao().UpdateFriendExtensionImg(Query);
 }
예제 #6
0
 public static bool InsertFriendExtension(FriendExtensionInfo Query)
 {
     return new FriendExtensionDao().InsertFriendExtension(Query);
 }