public IActionResult DoLogin(string Password, string EmailAddress)
        {
            LoginModel loginMdl = new LoginModel(EmailAddress, Password);

            loginMdl = DatabaseController.Login(loginMdl, this.HttpContext);

            if (loginMdl.UserId <= 0)
            {
                return(View("Login", loginMdl));
            }
            else
            {
                return(RedirectToAction("HomePage", "Page"));
            }
        }
        //This action does the authentication for registered users that are about to make a purchase
        public IActionResult DoAuthentication(string fld_emailaddress, string fld_password)
        {
            LoginModel loginMdl = new LoginModel(fld_emailaddress, fld_password);

            loginMdl = DatabaseController.Login(loginMdl, this.HttpContext);



            ViewBag.Message = loginMdl.Message;

            if (loginMdl.UserId <= 0)
            {
                return(View("PaymentAuthentication", this.HttpContext.Session.GetString("ORD")));
            }
            else
            {
                this.HttpContext.Session.SetString("OrderMail", loginMdl.EmailAddress);

                tbl_userdata user = MollShopContext.FindUserById(loginMdl.UserId);
                return(RedirectToAction("OrderSpecification", user));
            }
        }
 public void AddToDbShoppingCart(int fld_offeredserviceid, int fld_userid)
 {
     DatabaseController.AddtoShoppingCart(fld_offeredserviceid, fld_userid);
 }