/// <summary> /// 删除会员、教师 /// </summary> /// <param name="user"></param> /// <returns></returns> public JsonResult DeleteUser(string userid) { bool bl = new KaoAKao.Business.UserBusiness().DeleteUser(userid, OperateIP, CurrentManager.Number); JsonDictionary.Add("Status", bl); return new JsonResult() { Data = JsonDictionary, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; }
/// <summary> /// 编辑教师 /// </summary> /// <param name="user"></param> /// <returns></returns> public JsonResult EditUsers(string user) { JavaScriptSerializer serializer = new JavaScriptSerializer(); KaoAKao.Entity.UserEntity model = serializer.Deserialize<KaoAKao.Entity.UserEntity>(user); bool bl = false; if (UserBusiness.IsExistUserName(model.UserID, model.MobileTele)) { JsonDictionary.Add("ID", string.Empty); JsonDictionary.Add("Err", "手机号码已存在!"); } else if (UserBusiness.IsExistUserName(model.UserID, model.Email)) { JsonDictionary.Add("ID", string.Empty); JsonDictionary.Add("Err", "邮箱已存在!"); } else { bl = new KaoAKao.Business.UserBusiness().EditTeacher(model.UserID, "", model.Name, model.MobileTele, model.Email, model.PhotoPath, model.KeyWords, model.Description, OperateIP, CurrentManager.Number); } JsonDictionary.Add("Status", bl); return new JsonResult() { Data = JsonDictionary, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; }
/// <summary> /// 保存等级 /// </summary> /// <param name="user"></param> /// <returns></returns> public JsonResult SaveUserLevel(string userLevel) { JavaScriptSerializer serializer = new JavaScriptSerializer(); KaoAKao.Entity.UserLevelEntity model = serializer.Deserialize<KaoAKao.Entity.UserLevelEntity>(userLevel); bool bl = new KaoAKao.Business.UserBusiness().EditUserLevel(model.ID, model.Name, model.ImgPath, model.Discount.Value, model.Description, OperateIP, CurrentManager.Number); JsonDictionary.Add("Status", bl); return new JsonResult() { Data = JsonDictionary, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; }