Ejemplo n.º 1
0
        public ActionResult LessonsLearnedPreApprovalReviewDeletePartial(int Id)
        {
            IIrmaServiceDataModel serviceSystem = IrmaServiceSystem.GetServiceModel(IrmaConstants.IrmaPobModels.Approval);
            var approver = (ApprovalModel)serviceSystem.GetItem(string.Format("Id={0}", Id), "Id");

            if (approver != null)
            {
                serviceSystem.Delete(approver);
                var lessonLearnedModel = (LessonLearnedModel)Session["LessonLearnedModel"];
                lessonLearnedModel.Approvals.RemoveAll(o => o.Id == approver.Id);
            }
            return(LessonsLearnedPreApprovalReviewPartial());
        }
Ejemplo n.º 2
0
        public ActionResult RigAdminIsolationLockDelete(LockModel model)
        {
            RigAdminManageModel manageRigModel = (RigAdminManageModel)Session["manageRigModel"];

            if (ModelState.IsValid)
            {
                IIrmaServiceDataModel dataModel = IrmaServiceSystem.GetServiceModel(IrmaConstants.IrmaPobModels.IsolationLock);
                LockModel             entity    = dataModel.GetItem(string.Format("id={0}", model.id), "id");
                if (entity != null)
                {
                    bool bResult = dataModel.Delete(entity);
                }
            }

            return(PartialView("RigAdminIsolationLockPartial", manageRigModel.IsolationLocks));
        }