示例#1
0
        protected static CustomerTopicInfo Map(DataRow row)
        {
            CustomerTopicInfo info = new CustomerTopicInfo();

            info.SysNo             = Convert.ToInt32(row["SysNo"]);
            info.CustomerSysNo     = Convert.ToInt32(row["CustomerSysNo"]);
            info.TopicCount        = Convert.ToInt32(row["TopicCount"]);
            info.DigestCount       = Convert.ToInt32(row["DigestCount"]);
            info.ReplyCount        = Convert.ToInt32(row["ReplyCount"]);
            info.RemarkCount       = Convert.ToInt32(row["RemarkCount"]);
            info.LastEditUserSysNo = Convert.ToInt32(row["LastEditUserSysNo"]);
            info.LastEditDate      = Convert.ToDateTime(row["LastEditDate"]);
            return(info);
        }
示例#2
0
        public static int InsertCustomerTopicInfo(CustomerTopicInfo info)
        {
            SqlParameter[] parms = new SqlParameter[]
            {
                new SqlParameter("@CustomerSysNo", SqlDbType.Int),
            };

            parms[0].Value = info.CustomerSysNo;

            SqlCommand cmd = new SqlCommand(SQL_INSERT_CUSTOMERTOPICINFO);

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

            return(Convert.ToInt32(obj));
        }