Esempio n. 1
0
 public void UpdateGroup(WebRequestGroup group)
 {
     if (group != null)
     {
         _requestBinUnitOfWork.WebRequestGroup.Update(group);
         _requestBinUnitOfWork.Commit();
     }
 }
Esempio n. 2
0
        public ActionResult DeleteRequestBin(WebRequestGroup webRequestGroup)
        {
            _infrastructreDataContext.InitializeRequestBinUnitOfWork(unitOfWork =>
            {
                ViewBag.ActiveMenuItem = "NewRequestBin";
                IRequestBinService webRequestService = new RequestBinService(unitOfWork);
                webRequestService.DeleteGroup(webRequestGroup);
            });

            return(RedirectToAction("NewRequestBin"));
        }
Esempio n. 3
0
        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"));
        }
Esempio n. 4
0
        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();
            }
        }
Esempio n. 5
0
 public ActionResult RequestsGroup(WebRequestGroup webRequestGroup)
 {
     ViewBag.ActiveMenuItem = "navRequestBinList";
     return(View(webRequestGroup));
 }
Esempio n. 6
0
 public ActionResult ModifyGroup(WebRequestGroup webRequestGroup)
 {
     ViewBag.ActiveMenuItem = "navRequestBinCreate";
     return(View(webRequestGroup));
 }
Esempio n. 7
0
 public void RemoveGroup(WebRequestGroup group)
 {
     _requestBinUnitOfWork.WebRequestGroup.Remove(group);
     _requestBinUnitOfWork.Commit();
 }