コード例 #1
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);
            }
        }
コード例 #2
0
ファイル: FriendExtensionDao.cs プロジェクト: tyriankid/WFX
        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);
        }
コード例 #3
0
ファイル: FriendExtensionDao.cs プロジェクト: tyriankid/WFX
        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);
        }
コード例 #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));
 }