Beispiel #1
0
        public ActionResult EditCancelled(case_cancelled_type case_Cancelled_Type)
        {
            if (ModelState.IsValid)
            {
                case_Cancelled_Type.cct_modified_by = loggedInUser.Id;
                case_Cancelled_Type.cct_modified_on = DateTime.Now;
                _casCancelledTypeService.Edit(case_Cancelled_Type);

                return(ShowSuccessMessageOnly("Case Cancelled Type Successfully Updated", case_Cancelled_Type));
            }
            return(GetErrorResult(case_Cancelled_Type));
        }
Beispiel #2
0
        public ActionResult CreateCancelled(case_cancelled_type case_Cancelled_Type)
        {
            ModelState.Remove("cct_key");
            if (ModelState.IsValid)
            {
                case_Cancelled_Type.cct_created_by = loggedInUser.Id;
                case_Cancelled_Type.cct_created_on = DateTime.Now;
                _casCancelledTypeService.Create(case_Cancelled_Type);

                return(ShowSuccessMessageOnly("Case Cancelled Type Successfully Added", case_Cancelled_Type));
            }
            return(GetErrorResult(case_Cancelled_Type));
        }
Beispiel #3
0
 public bool Delete(case_cancelled_type entity)
 {
     try
     {
         _unitOfWork.CaseCancelledRepository.Delete(entity.cct_key);
         _unitOfWork.Save();
         _unitOfWork.Commit();
         return(true);
     }
     catch (Exception e)
     {
         return(false);
     }
 }
Beispiel #4
0
 public void Edit(case_cancelled_type entity)
 {
     _unitOfWork.CaseCancelledRepository.Update(entity);
     _unitOfWork.Save();
     _unitOfWork.Commit();
 }
Beispiel #5
0
 public void Create(case_cancelled_type entity)
 {
     _unitOfWork.CaseCancelledRepository.Insert(entity);
     _unitOfWork.Save();
     _unitOfWork.Commit();
 }