Beispiel #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            Gen_Mst_Teams gen_Mst_Teams = db.Gen_Mst_Teams.FirstOrDefault(m => m.TeamCode == id);

            db.Gen_Mst_Teams.Remove(gen_Mst_Teams);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "TeamCode,TeamDescription,Comments,CreatedBy,CreatedDate,")] Gen_Mst_Teams gen_Mst_Teams)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gen_Mst_Teams).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CreatedBy  = new SelectList(db.Rights_MST_UserMaster, "UserId", "Name", gen_Mst_Teams.CreatedBy);
     ViewBag.ModifiedBy = new SelectList(db.Rights_MST_UserMaster, "UserId", "Name", gen_Mst_Teams.ModifiedBy);
     return(View(gen_Mst_Teams));
 }
Beispiel #3
0
        // GET: Teams/Details/5
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Gen_Mst_Teams gen_Mst_Teams = db.Gen_Mst_Teams.FirstOrDefault(m => m.TeamCode == id);

            if (gen_Mst_Teams == null)
            {
                return(HttpNotFound());
            }
            return(View(gen_Mst_Teams));
        }
Beispiel #4
0
        // GET: Teams/Edit/5
        public ActionResult Edit(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Gen_Mst_Teams gen_Mst_Teams = db.Gen_Mst_Teams.FirstOrDefault(m => m.TeamCode == id);

            if (gen_Mst_Teams == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CreatedBy  = new SelectList(db.Rights_MST_UserMaster, "UserId", "Name", gen_Mst_Teams.CreatedBy);
            ViewBag.ModifiedBy = new SelectList(db.Rights_MST_UserMaster, "UserId", "Name", gen_Mst_Teams.ModifiedBy);
            return(View(gen_Mst_Teams));
        }