Пример #1
0
        //
        // GET: /ServiceCheckLists/Delete/5

        public ActionResult Delete(Guid sclId)
        {
            using (var db = new SCMSEntities())
            {
                var sc = new ServiceCheckList()
                {
                    Id = sclId
                };
                db.ServiceCheckLists.Attach(sc);
                ((IObjectContextAdapter)db).ObjectContext.ObjectStateManager.ChangeObjectState(sc, System.Data.EntityState.Deleted);
                db.SaveChanges();
            }
            SessionData.CurrentSession.CheckListCategoryList = null;
            SessionData.CurrentSession.ServiceCheckListList  = null;
            return(ListView());
        }
Пример #2
0
 public ActionResult SaveServiceCList(ServiceCheckList model)
 {
     UserSession.CurrentSession.ServiceItems = model.ServiceCList;
     return(LoadNewGarageInfo(model.FleetId, model.gInfoId == Guid.Empty ? null : model.gInfoId, model.ServiceCategoryId));
 }