Exemplo n.º 1
0
 /// <summary>
 /// 用户公司
 /// </summary>
 /// <returns></returns>
 public ActionResult UserCompany()
 {
     CheckIsHaveMPermission(55);
     var userCompany = _userService.GetUserCompanyByUserId(1);
     if (userCompany == null) { userCompany = new EUserCompany() { UserId = 1 }; }
     return View(userCompany);
 }
Exemplo n.º 2
0
 public void AddUserCompany(EUserCompany userCompany)
 {
     _rep.Add(userCompany);
 }
Exemplo n.º 3
0
 public ActionResult EditUserCompany(EUserCompany userCompany)
 {
     CheckIsHaveMBPermission(24);
     if (userCompany.Id == 0)
     {
         _userService.AddUserCompany(userCompany);
     }
     else
     {
         _userService.SaveUserCompany(userCompany);
     }
     return JsonResult(userCompany, "保存成功!");
 }
Exemplo n.º 4
0
 public void SaveUserCompany(EUserCompany userCompany)
 {
     _rep.Save(userCompany, p => p.Id == userCompany.Id);
 }