private IList<BmInfo> GetResourceCode(IQueryable<Resource> queryable)
 {
     IList<BmInfo> bm = new List<BmInfo>();
     foreach (Resource temp in queryable.ToList())
     {
         BmInfo bmInfo = new BmInfo();
         bmInfo.Code = temp.ResourceID.ToString();
         bmInfo.Name = temp.ResourcName;
         bmInfo.FCode = temp.F_ResourceID.ToString();
         bm.Add(bmInfo);
     }
     return bm;
 }
Beispiel #2
0
 public ActionResult UserRoleFp()
 {
     ViewData["UserID"] = Request.Params["UserID"];
     IList<Role> list;
     if (!(Session["UserInfo"] as UserInfo).LoginID.Equals("admin"))
     {
         list = iRoleRepository.SearchFor(r => !r.Role_Code.ToString().Equals("52B88AA9-61AF-4507-9382-A8534F824493")).ToList();
     }
     else
     {
         list = iRoleRepository.GetAll().ToList();
     }
     IList<BmInfo> bmlist = new List<BmInfo>();
     foreach (var role in list)
     {
         BmInfo bm = new BmInfo();
         bm.Name = role.Role_Name;
         bm.Code = role.Role_Code.ToString();
         bmlist.Add(bm);
     }
     ViewData["Roles"] = bmlist;
     return View();
 }
Beispiel #3
0
 private IList<BmInfo> GetBmInfoByBookList(IList<BookInfo> list)
 {
     IList<BmInfo> bm = new List<BmInfo>();
     foreach(BookInfo temp in list)
     {
         BmInfo bminfo = new BmInfo();
         bminfo.Code = temp.book_id.ToString();
         bminfo.Name = temp.name;
         bm.Add(bminfo);
     }
     UtilCodeInfo.bookList = bm;
     return bm;
 }