// Total meetings
        public long totalMeetingsHeld()
        {
            var totalMeetings = (from m in SessionProxy.Query <Meeting>()
                                 select m).Count();

            return(totalMeetings);
        }
        // Total Loan Repayment
        public double findTotalLoanRepayment()
        {
            var replayments = (from m in SessionProxy.Query <Meeting>()
                               select m).Sum(x => (double)x.SumOfLoanRepayments);

            return(replayments);
        }
Ejemplo n.º 3
0
        public List <VslaRegion> findAllRegions()
        {
            var allRegions = (from r in SessionProxy.Query <VslaRegion>()
                              select r).ToList();

            return(allRegions);
        }
        // Total loans
        public double findTotalLoans()
        {
            var loans = (from m in SessionProxy.Query <Meeting>()
                         select m).Sum(x => (double)x.SumOfLoanIssues);

            return(loans);
        }
        public List <UserPermissions> allUserPermissions()
        {
            var permissions = (from p in SessionProxy.Query <UserPermissions>()
                               select p).ToList();

            return(permissions);
        }
        public List <GroupSupport> findAllGroupSupport()
        {
            var groupSupport = (from gs in SessionProxy.Query <GroupSupport>()
                                select gs).ToList();

            return(groupSupport);
        }
Ejemplo n.º 7
0
        // Get all registered system users
        public List <Users> findAllUsers()
        {
            var users = (from u in SessionProxy.Query <Users>()
                         select u).ToList();

            return(users);
        }
        // All Technical Trainers
        public List <TechnicalTrainer> findAllTechnicalTrainers()
        {
            var trainers = (from t in SessionProxy.Query <TechnicalTrainer>()
                            select t).ToList();

            return(trainers);
        }
        // Get all Vslas
        public List <Vsla> findAllVslas()
        {
            var vslas = (from v in SessionProxy.Query <Vsla>()
                         select v).ToList();

            return(vslas);
        }
        // Total Savings
        public double findTotalSavings()
        {
            var savings = (from m in SessionProxy.Query <Meeting>()
                           select m).Sum(x => (double)x.SumOfSavings);

            return(savings);
        }
        // Count the number of VSLAs
        public long countVslas()
        {
            var vslas = (from v in SessionProxy.Query <Vsla>()
                         select v).Count();

            return(vslas);
        }
        // Find vsla by name
        public List <Vsla> FindVslaByName(string vslaName)
        {
            var vsla = (from v in SessionProxy.Query <Vsla>()
                        where v.VslaName.Contains(vslaName.ToLower())
                        select v).ToList();

            return(vsla);
        }
        public Vsla FindVslaById(int vslaId)
        {
            var vsla = (from v in SessionProxy.Query <Vsla>()
                        where v.VslaId == vslaId
                        select v).FirstOrDefault();

            return(vsla);
        }
        public Vsla FindVslaByCode(string vslaCode)
        {
            var vsla = (from v in SessionProxy.Query <Vsla>()
                        where v.VslaCode.ToUpper() == vslaCode.ToUpper()
                        select v).FirstOrDefault();

            return(vsla);
        }
        public List <Attendance> FindMeetingAttendances(int meetingId)
        {
            var attendances = (from m in SessionProxy.Query <Attendance>()
                               where m.Meeting.MeetingId == meetingId
                               select m).ToList();

            return(attendances);
        }
Ejemplo n.º 16
0
        public LoanRepayment FindLoanRepaymentByIdEx(int meetingId, int repaymentIdEx)
        {
            var loanRepayment = (from m in SessionProxy.Query <LoanRepayment>()
                                 where m.RepaymentIdEx == repaymentIdEx && m.Meeting.MeetingId == meetingId
                                 select m).FirstOrDefault();

            return(loanRepayment);
        }
Ejemplo n.º 17
0
        // Count the number of female members
        public long countFemaleMembers()
        {
            var femaleMembers = (from m in SessionProxy.Query <Member>()
                                 where m.Gender == "Female"
                                 select m).Count();

            return(femaleMembers);
        }
        public VslaCycle FindVslaCycleByIdEx(int vslaId, int cycleIdEx)
        {
            var cycle = (from c in SessionProxy.Query <VslaCycle>()
                         where c.CycleIdEx == cycleIdEx && c.Vsla.VslaId == vslaId
                         select c).FirstOrDefault();

            return(cycle);
        }
        // get the maximum share quantity and share price for each group in a given cycle
        public VslaCycle vslaCycleDetails(int vslaId, int cycleId)
        {
            var details = (from c in SessionProxy.Query <VslaCycle>()
                           where c.CycleId == cycleId && c.Vsla.VslaId == vslaId
                           select c).FirstOrDefault();

            return(details);
        }
        public VslaCycle FindVslaCycleByIdEx(string vslaCode, int cycleIdEx)
        {
            var cycle = (from c in SessionProxy.Query <VslaCycle>()
                         where c.CycleIdEx == cycleIdEx && c.Vsla.VslaCode.ToUpper() == vslaCode.ToUpper()
                         select c).FirstOrDefault();

            return(cycle);
        }
Ejemplo n.º 21
0
        public LoanRepayment findMemberMeetingRepayment(int meetingId, int memberId)
        {
            var repayment = (from r in SessionProxy.Query <LoanRepayment>()
                             where r.Meeting.MeetingId == meetingId && r.Member.MemberId == memberId
                             select r).FirstOrDefault();

            return(repayment);
        }
Ejemplo n.º 22
0
        public List <LoanRepayment> FindMeetingLoanRepayments(int meetingId)
        {
            var loanRepayments = (from m in SessionProxy.Query <LoanRepayment>()
                                  where m.Meeting.MeetingId == meetingId
                                  select m).ToList();

            return(loanRepayments);
        }
Ejemplo n.º 23
0
        public Member FindMemberById(int memberId)
        {
            var member = (from m in SessionProxy.Query <Member>()
                          where m.MemberId == memberId
                          select m).FirstOrDefault();

            return(member);
        }
Ejemplo n.º 24
0
        // /find the total number of members attached to a particular group
        public int totalGroupMembers(int vslaId)
        {
            int total = (from m in SessionProxy.Query <Member>()
                         where m.Vsla.VslaId == vslaId
                         select m).Count();

            return(total);
        }
Ejemplo n.º 25
0
        //Find a Member by the Id as is on the Phone
        public Member FindMemberByIdEx(int vslaId, int memberIdEx)
        {
            var member = (from m in SessionProxy.Query <Member>()
                          where m.MemberIdEx == memberIdEx && m.Vsla.VslaId == vslaId
                          select m).FirstOrDefault();

            return(member);
        }
        // Total members absent
        public long totalMembersAbsent()
        {
            var absent = (from a in SessionProxy.Query <Attendance>()
                          where a.IsPresent == false
                          select a).Count();

            return(absent);
        }
Ejemplo n.º 27
0
        // Find all members attached to a given VSLA
        public List <Member> findAllMembersByVslaId(int vslaId)
        {
            var members = (from m in SessionProxy.Query <Member>()
                           where m.Vsla.VslaId == vslaId
                           select m).ToList();

            return(members);
        }
Ejemplo n.º 28
0
        // Get a  information for a particular
        public List <Users> findParticularUser(int userLevel, string userName)
        {
            var user = (from u in SessionProxy.Query <Users>()
                        where u.UserLevel == userLevel && u.Username == userName
                        select u).ToList();

            return(user);
        }
Ejemplo n.º 29
0
        // Find user by Id
        public Users findUserById(int id)
        {
            var userx = (from u in SessionProxy.Query <Users>()
                         where u.Id == id
                         select u).FirstOrDefault();

            return(userx);
        }
        public Attendance FindAttendanceByIdEx(int meetingId, int attendanceIdEx)
        {
            var attendance = (from m in SessionProxy.Query <Attendance>()
                              where m.AttendanceIdEx == attendanceIdEx && m.Meeting.MeetingId == meetingId
                              select m).FirstOrDefault();

            return(attendance);
        }