예제 #1
0
파일: TopicManager.cs 프로젝트: ue96/ue96
        public static void AddTopicReplyBySysUser(TopicReplyInfo reply, AppEnum.TopicStatus ts)
        {
            TopicReplyDac.InsertTopicReply(reply);

            TopicDac.ChangeTopicStstus(reply.TopicSysNo, AppEnum.TopicStatus.Replyed);
        }
예제 #2
0
파일: TopicReplyDac.cs 프로젝트: ue96/ue96
        protected static TopicReplyInfo Map(DataRow row)
        {
            TopicReplyInfo info = new TopicReplyInfo();

            info.SysNo = Convert.ToInt32(row["SysNo"]);
            info.TopicSysNo = Convert.ToInt32(row["TopicSysNo"]);
            info.ReplyContent = row["ReplyContent"].ToString();
            info.Status = (AppEnum.TopicReplyStatus)Convert.ToInt32(row["Status"]);
            info.CreateUserType = (AppEnum.CreateUserType)Convert.ToInt32(row["CreateUserType"]);
            info.CreateUserSysNo = Convert.ToInt32(row["CreateUserSysNo"]);
            info.CreateDate = Convert.ToDateTime(row["CreateDate"]);
            if (row["LastEditUserSysNo"] != DBNull.Value)
                info.LastEditUserSysNo = Convert.ToInt32(row["LastEditUserSysNo"]);
            else
                info.LastEditUserSysNo = 0;
            info.LastEditDate = Convert.ToDateTime(row["LastEditDate"]);
            info.CreateUserName = row["CustomerName"].ToString();
            info.LastEditUserName = row["UpdateUserName"].ToString();
            if (row["CustomerRank"] != DBNull.Value)
                info.CustomerRank = Convert.ToInt32(row["CustomerRank"]);
            if (row["CustomerID"] != DBNull.Value)
                info.CustomerID = row["CustomerID"].ToString();
            if (row["CustomerName"] != DBNull.Value)
                info.CustomerName = row["CustomerName"].ToString();
            return info;
        }
예제 #3
0
파일: TopicManager.cs 프로젝트: ue96/ue96
 public static void AddTopicReply(TopicReplyInfo reply)
 {
     TopicReplyDac.InsertTopicReply(reply);
     TopicDac.UpdateProductRemarkCountAndScoreByTopicSysNo(reply.TopicSysNo);
 }
예제 #4
0
파일: TopicReplyDac.cs 프로젝트: ue96/ue96
        public static int InsertTopicReply(TopicReplyInfo info)
        {
            SqlParameter[] parms = new SqlParameter[]
            {
                new SqlParameter("@TopicSysNo", SqlDbType.Int),
                new SqlParameter("@ReplyContent", SqlDbType.NVarChar),
                new SqlParameter("@CreateUserType", SqlDbType.Int),
                new SqlParameter("@CreateUserSysNo", SqlDbType.Int),
            };

            parms[0].Value = info.TopicSysNo;
            parms[1].Value = info.ReplyContent;
            parms[2].Value = (int)info.CreateUserType;
            parms[3].Value = info.CreateUserSysNo;

            SqlCommand cmd = new SqlCommand(SQL_INSERT_TOPICREPLY);
            cmd.Parameters.AddRange(parms);
            cmd.CommandTimeout = 180;
            object obj = SqlHelper.ExecuteScalar(cmd);

            return Convert.ToInt32(obj);
        }