Example #1
0
        public ContactRecoveryModel FilterRecovery(string userIds, string levelIds, int statusMapId, int statusCareId, int day, int todayType, int employeeTypeId, int page, int rows)
        {
            int totalRecords;
            var branchId = UserContext.GetDefaultBranch();
            var listContact = ContactRepository.FilterRecovery(userIds, levelIds, statusMapId, statusCareId, day, branchId, (TodayType)todayType, (EmployeeType)employeeTypeId, page, rows, out totalRecords) ?? new List<ContactInfo>();

            var lstData = new List<ContactRecoveryInfo>();
            foreach (var info in listContact)
            {
                var objModel = CreateContactRecoveryInfo(info, (EmployeeType)employeeTypeId);
                lstData.Add(objModel);
            }
            var list = new ContactRecoveryModel
            {
                Page = page,
                Records = rows,
                Rows = lstData,
                UserData = totalRecords,
                Total = (totalRecords / rows) + 1,
            };
            return list;
        }
Example #2
0
        public ContactRecoveryModel FilterRecovered(string sourceTypes, string levels, string educationLevels, int statusMapId, int statusCareId, string schools, string majors, string duplicate, int branchId, int page, int rows)
        {
            int totalRecords;
            var listContact = ContactRepository.FilterRecovered(sourceTypes, levels, educationLevels, statusMapId, statusCareId, schools, majors, ConvertHelper.ToInt32(duplicate), branchId, page, rows, out totalRecords) ?? new List<ContactInfo>();
            var lstData = new List<ContactRecoveryInfo>();
            foreach (var info in listContact)
            {
                var objModel = CreateContactRecoveryInfo(info,EmployeeType.ManagerContact);
                lstData.Add(objModel);
            }

            var list = new ContactRecoveryModel
            {
                Rows = lstData,
                Total = (totalRecords / rows) + 1,
                UserData = totalRecords,
                Records = rows,
                Page = page,
            };
            return list;
        }