コード例 #1
0
        // GET: Admin
        public ActionResult getCenters()
        {
            beautyCenterViewModel BeautyCenter = new beautyCenterViewModel();

            BeautyCenter.centerList = context.BeautyCenters.Where(c => c.IsDeleted == false).ToList();
            return(View(BeautyCenter));
        }
コード例 #2
0
        public ActionResult filterCenter(int centerFilter)
        {
            List <BeautyCenter>   centers    = new List <BeautyCenter>();
            beautyCenterViewModel centerList = new beautyCenterViewModel();

            if (centerFilter == 0)
            {
                centers = context.BeautyCenters.Where(c => c.IsDeleted == false).ToList();
            }
            else if (centerFilter == 1)
            {
                centers = context.BeautyCenters.Where(c => c.IsDeleted == false && c.IsApproved == true).ToList();
            }
            else
            {
                centers = context.BeautyCenters.Where(c => c.IsDeleted == false && c.IsApproved == false).ToList();
            }
            centerList.centerList = centers;
            return(PartialView("_IsApproviedCenters", centerList));
        }