public static int NewGroupId()
        {
            int id = XMLCommitteeGroupsReaderWriter.CommitteeGroupData().OrderByDescending(x => x.GroupId).Select(x => x.GroupId).FirstOrDefault();

            id = id + 1;
            return(id);
        }
        public static bool AddCommitteeMember(CommitteeMemberViewModel model)
        {
            int lastId = GetAllCommitteeMemberList().OrderByDescending(x => x.MemderId).Select(x => x.MemderId).FirstOrDefault();

            model.MemderId    = lastId + 1;
            model.MiddleName  = string.IsNullOrEmpty(model.MiddleName) == true ? " " : model.MiddleName;
            model.MemberGroup = XMLCommitteeGroupsReaderWriter.CommitteeGroupData().Where(x => x.GroupId == model.MemberGroupId).Select(x => x.GroupName).FirstOrDefault();
            return(XMLCommitteeMembersReader.AddCommitteeMember(model));
        }
 public static bool UpdateCommitteeMember(CommitteeMemberViewModel model)
 {
     model.MemberGroup = XMLCommitteeGroupsReaderWriter.CommitteeGroupData().Where(x => x.GroupId == model.MemberGroupId).Select(x => x.GroupName).FirstOrDefault();
     return(XMLCommitteeMembersReader.UpdateCommitteeMemberData(model));
 }
 public static bool DeleteCommitteeGroup(CommitteeGroupViewModel model)
 {
     return(XMLCommitteeGroupsReaderWriter.DeleteCommitteeGroupData(model));
 }
        public static CommitteeGroupViewModel DetailsCommitteeGroup(int groupId)
        {
            CommitteeGroupViewModel model = XMLCommitteeGroupsReaderWriter.CommitteeGroupData().Where(x => x.GroupId == groupId).FirstOrDefault();

            return(model);
        }
        public static List <CommitteeGroupViewModel> GetAllCommitteeGroupList()
        {
            List <CommitteeGroupViewModel> cgList = XMLCommitteeGroupsReaderWriter.CommitteeGroupData();

            return(cgList);
        }