Beispiel #1
0
        public int Save(Jnwf.Model.tb_MaterialEntity material, Jnwf.Model.tb_MaterialContentEntity content, Jnwf.Model.tb_CustomReplyEntity model)
        {
            int result = 0;

            //IList<tb_CustomReplyEntity> Obj = new List<tb_CustomReplyEntity>();
            SqlParameter[] _param =
            {
                new SqlParameter("@UserID",         SqlDbType.VarChar),
                new SqlParameter("@WeiXinCode",     SqlDbType.VarChar),
                new SqlParameter("@TypeID",         SqlDbType.Int),

                new SqlParameter("@Title",          SqlDbType.VarChar),
                new SqlParameter("@Author",         SqlDbType.VarChar),
                new SqlParameter("@Description",    SqlDbType.VarChar),
                new SqlParameter("@ImageUrl",       SqlDbType.VarChar),
                new SqlParameter("@TextContent",    SqlDbType.VarChar),
                new SqlParameter("@Url",            SqlDbType.VarChar),
                new SqlParameter("@OrderBy",        SqlDbType.Int),

                new SqlParameter("@Keyword",        SqlDbType.VarChar),
                new SqlParameter("@MatchingTypeID", SqlDbType.Int),
                new SqlParameter("@ReplyTypeID",    SqlDbType.Int)
            };
            _param[0].Value = material.UserID;
            _param[1].Value = material.WeiXinCode;
            _param[2].Value = material.TypeID;

            _param[3].Value = content.Title;
            _param[4].Value = content.Author;
            _param[5].Value = content.Description;
            _param[6].Value = content.ImageUrl;
            _param[7].Value = content.TextContent;
            _param[8].Value = content.Url;
            _param[9].Value = content.OrderBy;

            _param[10].Value = model.Keyword;
            _param[11].Value = model.MatchingTypeID;
            _param[12].Value = model.ReplyTypeID;

            string sqlStr = "dbo.pro_AddCustomReply";

            using (SqlDataReader dr = SqlHelper.ExecuteReader(WebConfig.weixinRW, CommandType.StoredProcedure, sqlStr, _param))
            {
                while (dr.Read())
                {
                    int i = 0;
                    int.TryParse(dr[0].ToString(), out i);
                    result = i;
                }
            }
            return(result);
        }
Beispiel #2
0
 public int Save(Jnwf.Model.tb_MaterialEntity material, Jnwf.Model.tb_MaterialContentEntity content)
 {
     return(tb_Materialdal.Save(material, content));
 }
Beispiel #3
0
 //public IList<Jnwf.Model.tb_MaterialEntity> LoadMulti(string userid, string weixincode)
 //{
 //    IList<tb_MaterialEntity> tb_MaterialContentList = new List<tb_MaterialEntity>();
 //    tb_MaterialContentList = tb_Materialdal.LoadMulti(userid, weixincode);
 //    return tb_MaterialContentList;
 //}
 public int Save(Jnwf.Model.tb_MaterialEntity material, Jnwf.Model.tb_MaterialContentEntity content, Jnwf.Model.tb_CustomReplyEntity model)
 {
     return(tb_Materialdal.Save(material, content, model));
 }
Beispiel #4
0
 public int Update(Jnwf.Model.tb_MaterialEntity material, Jnwf.Model.tb_MaterialContentEntity content, int id)
 {
     return(tb_Toolbardal.Update(material, content, id));
 }