Пример #1
0
        // GET: Admin/Member
        public ActionResult BrowseMemberAll()
        {
            List <MemberViewModel> members = new List <MemberViewModel>();

            foreach (var ms in (MemberDB.GetAll()).ToList())
            {
                MemberViewModel member = new MemberViewModel()
                {
                    MemberID      = ms.MemberID,
                    MAccount      = ms.MAccount,
                    Birthday      = ms.Birthday,
                    RegionAddress = db.Region.Where(x => x.RegionID == ms.RegionID).Select(x => x.City.CityName + x.RegionName).First() + ms.Address,
                    Phone         = ms.Phone,
                    Email         = ms.Email
                };
                members.Add(member);
            }
            return(IL.InterceptionLogin(View(members), Session["AdminID"]));
        }
Пример #2
0
        // GET: Admin/Goods
        public ActionResult BrowseGoodsAll()
        {
            List <GoodsViewModel> gvmList = new List <GoodsViewModel>();

            foreach (var gs in (GoodsDB.GetAll()).ToList())
            {
                GoodsViewModel gvm = new GoodsViewModel()
                {
                    CaseID        = gs.CaseID,
                    CaseTitle     = gs.Cases.CaseTitle,
                    MemberName    = gs.Cases.Member.LastName + gs.Cases.Member.FirstName,
                    StartDateTime = gs.Cases.StartDateTime,
                    EndDateTime   = gs.Cases.EndDateTime,
                    GdsCount      = gs.GdsCount,
                    StatusName    = gs.Cases.CaseStatus.StatusName
                };
                gvmList.Add(gvm);
            }
            return(IL.InterceptionLogin(View(gvmList), Session["AdminID"]));
        }
Пример #3
0
 // GET: Admin/Admin
 public ActionResult BrowseAdminAll()
 {
     //var test = Session["AdminID"];
     return(IL.InterceptionLogin(View(AdminDB.GetAll()), Session["AdminID"]));
 }
Пример #4
0
 // GET: Admin/AdminLog
 public ActionResult BrowseAdminLogAll()
 {
     return(IL.InterceptionLogin(View(logDB.GetAll()), Session["AdminID"]));
 }