Exemplo n.º 1
0
 public ActionResult Edit(Staff_Info staff_info)
 {
     if (ModelState.IsValid)
     {
         db.Entry(staff_info).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(staff_info);
 }
Exemplo n.º 2
0
        public ActionResult Create(Staff_Info staff_info)
        {
            if (ModelState.IsValid)
            {
                staff_info.account_info_id = null;
                staff_info.active_flag = true;
                db.Staff_Info.Add(staff_info);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(staff_info);
        }