コード例 #1
0
 public ActionResult DeleteConfirmed(long id)
 {
     if (Session["Email"] != null)
     {
         Check_174797_Project check_174797_Project = db.Check_174797_Project.Find(id);
         db.Check_174797_Project.Remove(check_174797_Project);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     else
     {
         return(RedirectToAction("LogIn", "Registration"));
     }
 }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "Check_ID,Account_no,phoneno,address")] Check_174797_Project check_174797_Project)
 {
     if (Session["Email"] != null)
     {
         if (ModelState.IsValid)
         {
             db.Entry(check_174797_Project).State = EntityState.Modified;
             db.SaveChanges();
             return(RedirectToAction("Index"));
         }
         ViewBag.Account_no = new SelectList(db.Account_Master_174797_Project, "Account_No", "Account_Type", check_174797_Project.Account_no);
         return(View(check_174797_Project));
     }
     else
     {
         return(RedirectToAction("LogIn", "Registration"));
     }
 }
コード例 #3
0
 public ActionResult Details(long?id)
 {
     if (Session["Email"] != null)
     {
         if (id == null)
         {
             return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
         }
         Check_174797_Project check_174797_Project = db.Check_174797_Project.Find(id);
         if (check_174797_Project == null)
         {
             return(HttpNotFound());
         }
         return(View(check_174797_Project));
     }
     else
     {
         return(RedirectToAction("LogIn", "Registration"));
     }
 }
コード例 #4
0
 public ActionResult Edit(long?id)
 {
     if (Session["Email"] != null)
     {
         if (id == null)
         {
             return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
         }
         Check_174797_Project check_174797_Project = db.Check_174797_Project.Find(id);
         if (check_174797_Project == null)
         {
             return(HttpNotFound());
         }
         ViewBag.Account_no = new SelectList(db.Account_Master_174797_Project, "Account_No", "Account_Type", check_174797_Project.Account_no);
         return(View(check_174797_Project));
     }
     else
     {
         return(RedirectToAction("LogIn", "Registration"));
     }
 }