public GroupDetailModel AddGroups(GroupDetailModel groups, out Header header) { GroupDetailModel groupDetailModel = new GroupDetailModel(); try { header = GlobalHelper.ConstructHeader(Messages.GroupAddSucces); groupDetailModel = this.unitOfWork.GroupDetailRepository.AddGroups(groups); if (groupDetailModel == null) { header = GlobalHelper.ConstructHeader(Messages.GroupAlready); } return(groupDetailModel); } catch (Exception ex) { logger.Error(ex.StackTrace.ToString()); if (ex.Message.Contains("Adding Group Failed")) { header = GlobalHelper.ConstructHeader(ex, Messages.GroupAddFailed); } else { header = GlobalHelper.ConstructHeader(ex, Messages.Exception); } return(groupDetailModel); } }
public EventsSummaryDetails GetEventsSummaryListByUserId(int userId, out Header header) { try { header = GlobalHelper.ConstructHeader(); var events = this.unitOfWork.EventsRepository.GetEventsSummaryListByUserId(userId); return(events); } catch (Exception ex) { header = GlobalHelper.ConstructHeader(ex, Messages.ExceptionLoad); logger.Error(ex.StackTrace.ToString()); return(null); } }
public List <GroupDetailModel> GetGroupsById(int userId, int groupId, out Header header) { try { header = GlobalHelper.ConstructHeader(); var groups = this.unitOfWork.GroupDetailRepository.GetGroupsById(userId, groupId); return(groups); } catch (Exception ex) { header = GlobalHelper.ConstructHeader(ex, Messages.ExceptionLoad); logger.Error(ex.StackTrace.ToString()); return(null); } }
public ICollection <PlanEventModel> GetEventsSummaryList(int userId, int summaryId, out Header header) { try { header = GlobalHelper.ConstructHeader(); var events = this.unitOfWork.EventsRepository.GetEventsSummaryList(userId, summaryId); return(events); } catch (Exception ex) { header = GlobalHelper.ConstructHeader(ex, Messages.ExceptionLoad); logger.Error(ex.StackTrace.ToString()); return(null); } }
public GroupDetailModel DeactiveGroup(GroupDetailModel groups, out Header header) { GroupDetailModel groupDetailModel = new GroupDetailModel(); try { header = GlobalHelper.ConstructHeader(); groupDetailModel = this.unitOfWork.GroupDetailRepository.DeactiveGroup(groups); return(groupDetailModel); } catch (Exception ex) { header = GlobalHelper.ConstructHeader(ex, Messages.DeleteData); logger.Error(ex.StackTrace.ToString()); return(groupDetailModel); } }
public PlanEventModel ImportEventsAttendance(PlanEventModel model, out Header header) { PlanEventModel planEventModel = new PlanEventModel(); try { header = GlobalHelper.ConstructHeader(); planEventModel = this.unitOfWork.EventsRepository.ImportEventsAttendance(model); return(planEventModel); } catch (Exception ex) { header = GlobalHelper.ConstructHeader(ex, Messages.Exception); logger.Error(ex.StackTrace.ToString()); return(planEventModel); } }
public WelcomeEventsModel WelcomeEventsModel(int userId, out Header header) { WelcomeEventsModel model = new WelcomeEventsModel(); try { header = GlobalHelper.ConstructHeader(); model = this.unitOfWork.EventsRepository.WelcomeEventsModel(userId); return(model); } catch (Exception ex) { header = GlobalHelper.ConstructHeader(ex, Messages.ExceptionLoad); logger.Error(ex.StackTrace.ToString()); model = null; return(model); } }
public GroupDetailModel ImportGroupAttendance(GroupDetailModel lstgroups, out Header header) { try { header = GlobalHelper.ConstructHeader(Messages.GroupAddSucces); lstgroups = this.unitOfWork.GroupDetailRepository.ImportGroupAttendance(lstgroups); if (lstgroups == null) { header = GlobalHelper.ConstructHeader(Messages.Failed); } return(lstgroups); } catch (Exception ex) { logger.Error(ex.StackTrace.ToString()); header = GlobalHelper.ConstructHeader(ex, Messages.Exception); return(lstgroups); } }
public GroupDetailModel EditGroups(GroupDetailModel groups, out Header header) { GroupDetailModel groupDetailModel = new GroupDetailModel(); try { header = GlobalHelper.ConstructHeader(Messages.AddUserUpdatedMessage); groupDetailModel = this.unitOfWork.GroupDetailRepository.EditGroups(groups); if (groupDetailModel == null) { header = GlobalHelper.ConstructHeader(Messages.GroupAlready); } return(groupDetailModel); } catch (Exception ex) { header = GlobalHelper.ConstructHeader(ex, Messages.Exception); logger.Error(ex.StackTrace.ToString()); return(groupDetailModel); } }