示例#1
0
        internal static List <DMParentModel> GetDataForEmpVMSummary(List <ViewVisitEmp> visitList)
        {
            List <DMParentModel> dmList = new List <DMParentModel>();

            if (visitList.Count > 0)
            {
                foreach (var visitorid in visitList.Select(aa => aa.VisitorID).Distinct())
                {
                    DMParentModel dmObj = new DMParentModel();
                    dmObj.ID    = (int)visitList.Where(aa => aa.VisitorID == visitorid).First().VisitorID;
                    dmObj.Name  = visitList.Where(aa => aa.VisitorID == visitorid).First().VName;
                    dmObj.Count = visitList.Where(aa => aa.VisitorID == visitorid).Count();
                    dmList.Add(dmObj);
                }
            }
            return(dmList.OrderByDescending(aa => aa.Count).ToList());
        }
示例#2
0
        internal static List <DMParentModel> GetDataForEmpVMSummary(List <ViewVisitEmp> visitList, List <int> empIds)
        {
            List <DMParentModel> dmList = new List <DMParentModel>();

            foreach (var empid in empIds)
            {
                if (visitList.Where(aa => aa.EmployeeID == empid).Count() > 0)
                {
                    DMParentModel dmObj = new DMParentModel();
                    dmObj.ID    = (int)visitList.Where(aa => aa.EmployeeID == empid).First().EmployeeID;
                    dmObj.Name  = visitList.Where(aa => aa.EmployeeID == empid).First().FullName;
                    dmObj.Count = visitList.Where(aa => aa.EmployeeID == empid).Count();
                    dmList.Add(dmObj);
                }
            }
            return(dmList.OrderByDescending(aa => aa.Count).ToList());
        }
示例#3
0
        public static List <DMParentModel> GetDataForDeptVMSummary(List <ViewVisitEmp> visitList, List <short?> secIds)
        {
            List <DMParentModel> dmList = new List <DMParentModel>();

            foreach (var secid in secIds)
            {
                if (visitList.Where(aa => aa.SecID == secid).Count() > 0)
                {
                    DMParentModel dmObj = new DMParentModel();
                    dmObj.ID    = (int)secid;
                    dmObj.Name  = visitList.Where(aa => aa.SecID == secid).First().SectionName;
                    dmObj.Count = visitList.Where(aa => aa.SecID == secid).Count();
                    dmList.Add(dmObj);
                }
            }
            return(dmList.OrderByDescending(aa => aa.Count).ToList());
        }
示例#4
0
        internal static DMPieChartParentModel GetDataForPieChartDept(List <ViewAttData> AttList, DMPieChartParentModel vm, string GraphType)
        {
            List <DMParentModel> dmList = new List <DMParentModel>();

            foreach (var secId in AttList.Select(aa => aa.SecID).Distinct().ToList())
            {
                if (AttList.Where(aa => aa.SecID == secId).Count() > 0)
                {
                    DMParentModel dmObj = new DMParentModel();
                    dmObj.ID    = (int)secId;
                    dmObj.Name  = AttList.Where(aa => aa.SecID == secId).First().SectionName;
                    dmObj.Count = AttList.Where(aa => aa.SecID == secId).Count();
                    dmList.Add(dmObj);
                }
            }
            vm.ChildList = dmList.OrderByDescending(aa => aa.Count).ToList();
            return(vm);
        }