Beispiel #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            Cust_Authenication cust_Authenication = db.Cust_Authenication.Find(id);

            db.Cust_Authenication.Remove(cust_Authenication);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Cust_Id,Cust_Password")] Cust_Authenication cust_Authenication)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cust_Authenication).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(cust_Authenication));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "Cust_Id,Cust_Password")] Cust_Authenication cust_Authenication)
        {
            if (ModelState.IsValid)
            {
                db.Cust_Authenication.Add(cust_Authenication);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(cust_Authenication));
        }
Beispiel #4
0
        // GET: Cust_Authenication/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Cust_Authenication cust_Authenication = db.Cust_Authenication.Find(id);

            if (cust_Authenication == null)
            {
                return(HttpNotFound());
            }
            return(View(cust_Authenication));
        }
Beispiel #5
0
 public ActionResult Validate_post()
 {
     if (ModelState.IsValid)
     {
         Cust_Authenication cust = new Cust_Authenication();
         TryUpdateModel(cust);
         if (cust.Cust_Id == null || cust.Cust_Password == null)
         {
             return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
         }
         cust = db.Cust_Authenication.ToList().Find(temp => (temp.Cust_Id == cust.Cust_Id && temp.Cust_Password == cust.Cust_Password));
         if (cust == null)
         {
             return(HttpNotFound());
         }
         else
         {
             return(RedirectToAction("Details", new { id = cust.Cust_Id }));
         }
     }
     return(View("Validate"));
 }