Exemplo n.º 1
0
        // GET: Admin
        public ActionResult ShowUser()
        {
            List <User> user = BussinessManger.Getalluserdata();

            this.ViewData["user"] = user;
            return(View());
        }
Exemplo n.º 2
0
        // GET: Route
        public ActionResult Index(string source, string destination)
        {
            List <Routes>      routes = BussinessManger.GetallRoute(source, destination);
            List <Petrol_Pump> petrol = BussinessManger.GetallPetrol(source, destination);
            List <Hotel>       hotel  = BussinessManger.Getallhotel(source, destination);

            this.ViewData["hotel"]  = hotel;
            this.ViewData["petrol"] = petrol;
            return(View(routes));
        }
Exemplo n.º 3
0
        public ActionResult Index(string username, string upassword)
        {
            User c = new User
            {
                username = username,
                password = upassword,
            };
            bool status = BussinessManger.Login(c);

            if (status)
            {
                return(RedirectToAction("welcome", "user"));
            }


            return(View());
        }
Exemplo n.º 4
0
        public ActionResult login(string email, string pass)
        {
            Admin c = new Admin
            {
                email    = email,
                password = pass,
            };
            bool status = BussinessManger.AdminLogin(c);

            if (status)
            {
                return(RedirectToAction("ShowUser", "admin"));
            }


            return(View());
        }
Exemplo n.º 5
0
        public ActionResult Register_Post(string name, string email, string pass, string contactno, string address, string pincode)
        {
            User c = new User
            {
                username  = name,
                email     = email,
                password  = pass,
                contactno = contactno,
                address   = address,
                pincode   = pincode
            };
            bool status = BussinessManger.regUser(c);

            if (status)
            {
                return(RedirectToAction("index", "user"));
            }


            return(View());
        }
Exemplo n.º 6
0
        public ActionResult register_admin(string name, string email, string pass, string contactno, string address, string pincode)
        {
            Admin ca = new Admin
            {
                username  = name,
                email     = email,
                password  = pass,
                contactno = contactno,
                address   = address,
                pincode   = pincode
            };
            bool status = BussinessManger.regAdmin(ca);

            if (status)
            {
                return(RedirectToAction("ShowUser", "admin"));
            }


            return(View());
        }
Exemplo n.º 7
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 protected bool EntityExisted(Expression <Func <TEntity, bool> > filter)
 {
     return(BussinessManger.Count(filter) != 0);
 }