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

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.