public BaseOutput DeleteGroup(Int64 id, out tbl_Group itemOut) { BaseOutput baseOutput; itemOut = null; try { tbl_Group group = operation.DeleteGroup(id, 0); itemOut = group; return(baseOutput = new BaseOutput(true, BOResultTypes.Success.GetHashCode(), BOBaseOutputResponse.SuccessResponse, "")); } catch (Exception ex) { return(baseOutput = new BaseOutput(false, BOResultTypes.Danger.GetHashCode(), BOBaseOutputResponse.DangerResponse, ex.Message)); } }
public ActionResult Delete(int id) { try { CRUDOperation dataOperations = new CRUDOperation(); var UserProfile = (UserProfileSessionData)this.Session["UserProfile"]; if (UserProfile != null) { dataOperations.DeleteGroup(id, UserProfile.UserId); } return(RedirectToAction("Index")); } catch (Exception ex) { return(View("Error", new HandleErrorInfo(ex, "Error", "Error"))); } }