public ActionResult Index()
        {
            if (sessiondto.getName() == null)
            {
                return(RedirectToAction("Index", "Home"));
            }
            else if (sessiondto.getRole() != 3)
            {
                return(RedirectToAction("Index", "Home"));
            }
            else
            {
                int totalbuyersCount                 = new UserBL().getUserList().Where(x => x.Role == 0).Count();
                int totaluksuppliersCount            = new UserBL().getUserList().Where(x => x.Role == 1).Count();
                int totalinternationalsuppliersCount = new UserBL().getUserList().Where(x => x.Role == 2).Count();

                int totalactivebuyersCount                 = new UserBL().getUserList().Where(x => x.Role == 0 && x.Is_Authorize == 1).Count();
                int totalactiveuksuppliersCount            = new UserBL().getUserList().Where(x => x.Role == 1 && x.Is_Authorize == 1).Count();
                int totalactiveinternationalsuppliersCount = new UserBL().getUserList().Where(x => x.Role == 2 && x.Is_Authorize == 1).Count();


                ViewBag.totalbuyersCount                       = totalbuyersCount;
                ViewBag.totaluksuppliersCount                  = totaluksuppliersCount;
                ViewBag.totalinternationalsuppliersCount       = totalinternationalsuppliersCount;
                ViewBag.totalactivebuyersCount                 = totalactivebuyersCount;
                ViewBag.totalactiveuksuppliersCount            = totalactiveuksuppliersCount;
                ViewBag.totalactiveinternationalsuppliersCount = totalactiveinternationalsuppliersCount;

                return(View());
            }
        }
示例#2
0
 // GET: Admin
 public ActionResult Index(string err = "")
 {
     if (sessionDTO.getName() != null)
     {
         return(RedirectToAction("Dashboard", "Admin"));
     }
     else
     {
         ViewBag.err = err;
         return(View());
     }
 }
 public ActionResult GetStarted()
 {
     if (sessiondto.getName() == null)
     {
         return(View());
     }
     else
     {
         return(RedirectToAction("Index", "Home"));
     }
 }
示例#4
0
 public ActionResult BuyerSignUpVideo(string mail, string Message)
 {
     if (sessiondto.getName() == null)
     {
         ViewBag.Message = Message;
         ViewBag.mail    = mail;
         return(View());
     }
     else
     {
         return(RedirectToAction("Index", "Home"));
     }
 }
 public ActionResult Index()
 {
     if (sessiondto.getName() == null)
     {
         return(RedirectToAction("Index", "Home"));
     }
     else
     {
         ViewBag.name = sessiondto.getName();
         return(View());
     }
 }