Exemple #1
0
        //添加会员详情
        public int MembersMessageAdd(MembersMessageModel model)
        {
            string sql = $"insert into MembersMessage values('{model.MembersID}','{model.MembersMessageURL}','{model.MembersMessageName}','{model.MembersMessageSign}')";

            using (SqlConnection connection = new SqlConnection(conStr))
            {
                return(connection.Execute(sql));
            }
        }
Exemple #2
0
        //修改会员信息
        public int MembersMessageUpdate(MembersMessageModel model)
        {
            string sql = $"update MembersMessage set  ='{model.MembersMessageURL}', ='{model.MembersMessageName}', ='{model.MembersMessageSign}'";

            using (SqlConnection connection = new SqlConnection(conStr))
            {
                return(connection.Execute(sql));
            }
        }
Exemple #3
0
        public int MembersMessageUpdate(string ff = "")
        {
            MembersMessageModel model = JsonConvert.DeserializeObject <MembersMessageModel>(ff);
            var file = Request.Form.Files;

            foreach (var item in file)
            {
                if (item.Length > 0)
                {
                    var wort     = _iwebh.ContentRootPath;
                    var filename = Path.Combine(wort, "wwwroot/img/", item.FileName);
                    model.MembersMessageURL = "/img/" + item.FileName;
                    using (var s = new FileStream(filename, FileMode.Create))
                    {
                        item.CopyTo(s);
                    }
                }
            }
            return(_ibll.MembersMessageUpdate(model));
        }
Exemple #4
0
 public int MembersMessageUpdate(MembersMessageModel model)
 {
     return(_idal.MembersMessageUpdate(model));
 }
Exemple #5
0
 //添加会员详情
 public int MembersMessageAdd(MembersMessageModel model)
 {
     return(_idal.MembersMessageAdd(model));
 }