Beispiel #1
0
        public IList<Resource> GetResourceList(UserInfo strUserRole)
        {

            IList<Resource> list =  this.GetResourceCode(strUserRole);
           
           return BuidTree(list, Guid.Empty.ToString());
        }
Beispiel #2
0
 private IList<Resource> GetResourceCode(UserInfo userInfo)
 {
     if (userInfo.UserRole.Count > 0)
     {
         var s = from li in userInfo.UserRole select li.RID;
        IList<Guid> sb=iResourceRoleDao.SearchFor(r => s.Contains(r.RlID)).Select(r => r.ReID).ToList();
         IList<Resource> reResult =
             iResourceDao.SearchFor(
                 m =>
                     sb.Contains(m.ResourceID)&&m.ReType.Equals("0")).ToList();
         return reResult;
     }
     return null;
 }
Beispiel #3
0
 public ActionResult Create(UserInfo customer)
 {
     ReturnObj returnObj = new ReturnObj();
     customer.UserID = Guid.NewGuid();
     customer.Password = MD5Helper.ToString(customer.Password);
     if (iUserManager.Save(customer) > 0)
     {
         returnObj.State = 1;
         returnObj.Msg = "保存成功!";
     }
     else
     {
         returnObj.State = -1;
         returnObj.Msg = "保存失败!";
     }
     return Json(returnObj, JsonRequestBehavior.AllowGet);
 }
Beispiel #4
0
 public ActionResult Edit(UserInfo user)
 {
     iUserManager.Update(user);
     return RedirectToAction("Index");
 }