public ActionResult GenerateReport(int selectedGroup, int selectedtype, int selectedstatus) { List <ChatGroup> grouplist = new List <ChatGroup>(); if (selectedGroup == 0) { if (selectedstatus == 0) { grouplist = new ChatGroup().GetAllChatGroups(); } else if (selectedstatus == 1) { grouplist = new ChatGroup().GetActiveChatGroups(); } else { grouplist = new ChatGroup().GetInActiveChatGroups(); } return(performActionForReportType(selectedtype, grouplist)); } else { List <ChatGroupParticipant> chatgroupparticipants; ChatGroup chatgroup = _context.ChatGroups.Find(selectedGroup); if (selectedstatus == 0) { chatgroupparticipants = chatgroup.GetAssociatedChatGroupParticipants(); } else if (selectedstatus == 1) { chatgroupparticipants = chatgroup.GetAssociatedActiveChatGroupParticipants(); } else { chatgroupparticipants = chatgroup.GetAssociatedInActiveChatGroupParticipants(); } return(performActionForReportTypeForGroupUser(selectedtype, chatgroupparticipants)); } }