public ActionResult PatientPrescription()
        {
            List <Prescription> prescriptions = new List <Prescription>();

            prescriptions = PharmacyDAL.GetAll();
            return(View(prescriptions));
        }
 public ActionResult Login(string username, string password)
 {
     if (PharmacyDAL.ValidateUser(username, password))
     {
         TempData["username"] = username;
         return(RedirectToAction("Index"));
     }
     else
     {
         ModelState.AddModelError("", "Invalid Username OR Password");
         return(View());
     }
 }
        public ActionResult Create_Post()
        {    // Retrieve form data using form collection
            Pharmacy pharmacy = new Pharmacy();

            TryUpdateModel(pharmacy);
            if (ModelState.IsValid)
            {
                if (PharmacyDAL.Insert(pharmacy))
                {
                    return(RedirectToAction("Login"));
                }
                else
                {
                    ModelState.AddModelError("", "Username already exists");
                    return(View());
                }
            }
            else
            {
                return(View());
            }
        }