//添加会员详情 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)); } }
//修改会员信息 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)); } }
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)); }
public int MembersMessageUpdate(MembersMessageModel model) { return(_idal.MembersMessageUpdate(model)); }
//添加会员详情 public int MembersMessageAdd(MembersMessageModel model) { return(_idal.MembersMessageAdd(model)); }