using System; using System.Collections.Generic; using System.Linq; using System.Web; using AIAHTML5.ADMIN.API.Entity; namespace AIAHTML5.ADMIN.API.Models { public class CountryModel { public int Id { get; set; } public string CountryName { get; set; } public string CountryCode { get; set; } public static List GetCountries(AIADatabaseV5Entities dbContext) { List CountryList = new List(); CountryModel CountryModelObj = new CountryModel(); try { var result = dbContext.usp_EC_GetCountryList().ToList(); if (result.Count > 0) { foreach (var item in result) { CountryModelObj = new CountryModel(); CountryModelObj.Id = item.Id; CountryModelObj.CountryName = item.CountryName; CountryList.Add(CountryModelObj); } } } catch (Exception ex) { } return CountryList; } } public class StateModel { public int Id { get; set; } public string StateName { get; set; } public string StateCode { get; set; } public static List GetUsStates(AIADatabaseV5Entities dbContext) { List StateList = new List(); StateModel StateModelObj = new StateModel(); try { var result = dbContext.usp_EC_GetStateList().ToList(); if (result.Count > 0) { foreach (var item in result) { StateModelObj = new StateModel(); StateModelObj.Id = item.Id; StateModelObj.StateName = item.StateName; StateList.Add(StateModelObj); } } } catch (Exception ex) { } return StateList; } } public class SecurityQuestionModel { public int Id { get; set; } public string Title { get; set; } public static List GetSecurityQuestions(AIADatabaseV5Entities dbContext) { List SecurityQuestionList = new List(); SecurityQuestionModel SecurityQuestionObj = new SecurityQuestionModel(); try { var result = dbContext.usp_EC_GetSecurityQuestionList().ToList(); if (result.Count > 0) { foreach (var item in result) { SecurityQuestionObj = new SecurityQuestionModel(); SecurityQuestionObj.Id = item.Id; SecurityQuestionObj.Title = item.Title; SecurityQuestionList.Add(SecurityQuestionObj); } } } catch (Exception ex) { } return SecurityQuestionList; } } }