Ejemplo n.º 1
0
 public void DeleteGroup(Guid id)
 {
     if (id != null)
     {
         var gr = _groupRepository.GetGroupById(id);
         if (gr != null)
         {
             _groupRepository.DeleteGroup(gr);
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public string Get(Routes.CMSDeleteGroup request)
 {
     try
     {
         IGroup cms      = Helper.GetGrain <IGroup>(0);
         string response = cms.DeleteGroup(request.userName, request.token, request.groupObjectId).Result;
         return(response);
     }
     catch
     {
         return(Helper.AbnormalError);
     }
 }
Ejemplo n.º 3
0
        public HttpResponseMessage Delete(int id)
        {
            try
            {
                _group.DeleteGroup(id);
                var response = new HttpResponseMessage()
                {
                    StatusCode = HttpStatusCode.OK
                };

                return(response);
            }
            catch (Exception)
            {
                var response = new HttpResponseMessage()
                {
                    StatusCode = HttpStatusCode.InternalServerError
                };
                return(response);
            }
        }
Ejemplo n.º 4
0
 public ActionResult <Group> Delete(int id)
 {
     return(Ok(groupRepository.DeleteGroup(id)));
 }
 public IActionResult DeleteGroup(int id)
 {
     _group.DeleteGroup(id);
     return(RedirectToAction("GroupList"));
 }