public void UpdateGroup(WebRequestGroup group) { if (group != null) { _requestBinUnitOfWork.WebRequestGroup.Update(group); _requestBinUnitOfWork.Commit(); } }
public ActionResult DeleteRequestBin(WebRequestGroup webRequestGroup) { _infrastructreDataContext.InitializeRequestBinUnitOfWork(unitOfWork => { ViewBag.ActiveMenuItem = "NewRequestBin"; IRequestBinService webRequestService = new RequestBinService(unitOfWork); webRequestService.DeleteGroup(webRequestGroup); }); return(RedirectToAction("NewRequestBin")); }
public ActionResult ResetGroup(WebRequestGroup webRequestGroup) { _infrastructreDataContext.InitializeRequestBinUnitOfWork(unitOfWork => { ViewBag.ActiveMenuItem = "NewRequestBin"; IRequestBinService webRequestService = new RequestBinService(unitOfWork); var group = webRequestService.GetGroup(webRequestGroup.GroupUniqueId); if (group != null) { webRequestService.DeleteGroupRequests(group.Id); } }); return(RedirectToAction("Index")); }
public void DeleteGroup(WebRequestGroup webRequestGroup) { if (webRequestGroup != null) { var requests = GetGroupRequests(webRequestGroup.Id); foreach (var request in requests) { if (request != null) { _requestBinUnitOfWork.WebRequest.Remove(request); } } _requestBinUnitOfWork.WebRequestGroup.Remove(webRequestGroup); _requestBinUnitOfWork.Commit(); } }
public ActionResult RequestsGroup(WebRequestGroup webRequestGroup) { ViewBag.ActiveMenuItem = "navRequestBinList"; return(View(webRequestGroup)); }
public ActionResult ModifyGroup(WebRequestGroup webRequestGroup) { ViewBag.ActiveMenuItem = "navRequestBinCreate"; return(View(webRequestGroup)); }
public void RemoveGroup(WebRequestGroup group) { _requestBinUnitOfWork.WebRequestGroup.Remove(group); _requestBinUnitOfWork.Commit(); }