1 PublicActionResult Index (reserveinforequest request)2 {3 4list<string> minelist= This. Accountservice.getpermminelist ( This. Cookiecontext.userid);5 6 varresult = This. Reserveservice.getreservelist (request);7 8List<reserveinfo> Items =NewList<reserveinfo>();9 Ten foreach(Reserveinfo Reserveinchresult) One { A if(minelist[0] ==Reserve.minecode) - { - Items.Add (reserve); the - } - } -Pagedlist<reserveinfo> pagedlist =NewPagedlist<reserveinfo> (Items,1,Ten); + - //Result=result. Where (M = minelist.contains (M.minecode)); + AReserveinforequest newrequest =Newreserveinforequest (); at varMinenamelist = This. Reserveservice.getreservelist (newrequest); - //define Viewbag.minename -dictionary<int, string> dictionaryname =Newdictionary<int,string>(); - inti =0; -List<string> minenamelist =NewList<string>(); - foreach(Reserveinfo Yearcheckinchminenamelist) in { - if(!minenamelist.contains (yearcheck.minename)) to { + Minenamelist.add (yearcheck.minename); - Dictionaryname.add (i, yearcheck.minename); thei++; * } $ }Panax Notoginseng This. Viewbag.minename =NewSelectList (Dictionaryname,"","value"); - the //define Viewbag.year +dictionary<int, string> dictionaryyear =Newdictionary<int,string>(); A intj =0; theList<string> yearlist =NewList<string>(); + foreach(Reserveinfo Reserveinchminenamelist) - { $ if(!Yearlist.contains (Reserve. Year)) $ { - Yearlist.add (Reserve. year); - Dictionaryyear.add (J, reserve.) year); theJ + +; - }Wuyi } the This. Viewbag.year =NewSelectList (Dictionaryyear,"","value"); - Wu returnView (pagedlist); -}
C # Mining Enterprise User control layer from the current logged-in user's code to use this as a judging condition loop to find code corresponding data