private static string EditUser() { string strreturn; Guid newsID = NetSchool.Common.Library.GetPostBack.GetPostBackGuid("id", Guid.Empty); string strNickname = NetSchool.Common.Library.GetPostBack.GetPostBackStr("nickname"); string strIdcard = NetSchool.Common.Library.GetPostBack.GetPostBackStr("idcard"); string strCompany = NetSchool.Common.Library.GetPostBack.GetPostBackStr("company"); string strRoles = NetSchool.Common.Library.GetPostBack.GetPostBackStr("roles"); string strGender = NetSchool.Common.Library.GetPostBack.GetPostBackStr("gender"); NetSchool.Model.EduUser eduUserInfo = BLL.EduUser.GetModel(newsID); eduUserInfo.NickName = strNickname; eduUserInfo.Idcard = strIdcard; eduUserInfo.Roles = strRoles; eduUserInfo.Gender = strGender; eduUserInfo.Company = strCompany; if (NetSchool.BLL.EduUser.Update(eduUserInfo)) { strreturn = JsonConvert.SerializeObject(new { state = "success", msg = "OK" }, new Newtonsoft.Json.Converters.IsoDateTimeConverter() { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" }); } else { strreturn = JsonConvert.SerializeObject(new { state = "error", msg = "更新失败" }, new Newtonsoft.Json.Converters.IsoDateTimeConverter() { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" }); } return(strreturn); }
public ActionResult UserShow(Guid id) { NetSchool.Model.EduUser EduUserInfo = NetSchool.BLL.EduUser.GetModel(ID: id); NetSchool.BLL.EduUser.Update(EduUserInfo); return(View(EduUserInfo)); }
private static string GetInfo() { string strreturn; Guid eduUserId = NetSchool.Common.Library.GetPostBack.GetPostBackGuid("id", Guid.Empty); if (eduUserId != Guid.Empty) { NetSchool.Model.EduUser eduUserInfo = NetSchool.BLL.EduUser.GetModel(ID: eduUserId); NetSchool.BLL.EduUser.Update(eduUserInfo); strreturn = JsonConvert.SerializeObject(new { state = "success", msg = "OK", userInfo = eduUserInfo }, new Newtonsoft.Json.Converters.IsoDateTimeConverter() { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" }); } else { strreturn = JsonConvert.SerializeObject(new { state = "error", msg = "获取ID失败" }, new Newtonsoft.Json.Converters.IsoDateTimeConverter() { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" }); } return(strreturn); }
public static bool Add(NetSchool.Model.EduUser model) { return(dal.Add(model)); }
public static bool Update(NetSchool.Model.EduUser model) { return(dal.Update(model)); }