Exemple #1
0
        private List <CommonModel> TransfromParliamentsData(DataTable dataTable)
        {
            List <CommonModel> parliamentList = new List <CommonModel>();

            foreach (var item in dataTable.AsEnumerable())
            {
                CommonModel model = new CommonModel();
                model.ParliamentID   = Convert.ToInt64(item["ID"]);
                model.ParliamentName = Convert.ToString(item["Name"]);
                parliamentList.Add(model);
            }

            return(parliamentList);
        }
Exemple #2
0
        private List <CommonModel> TransfromCitiesData(DataTable dataTable)
        {
            List <CommonModel> cityList = new List <CommonModel>();

            foreach (var item in dataTable.AsEnumerable())
            {
                CommonModel model = new CommonModel();
                model.CityID   = Convert.ToInt64(item["ID"]);
                model.CityName = Convert.ToString(item["Name"]);
                cityList.Add(model);
            }

            return(cityList);
        }
Exemple #3
0
        private List <CommonModel> TransfromStateData(DataTable dataTable)
        {
            List <CommonModel> stateList = new List <CommonModel>();

            foreach (var item in dataTable.AsEnumerable())
            {
                CommonModel model = new CommonModel();
                model.StateID   = Convert.ToInt64(item["ID"]);
                model.StateName = Convert.ToString(item["Name"]);
                stateList.Add(model);
            }

            return(stateList);
        }
Exemple #4
0
        private List <CommonModel> TransfromLegislativesData(DataTable dataTable)
        {
            List <CommonModel> legislativeList = new List <CommonModel>();

            foreach (var item in dataTable.AsEnumerable())
            {
                CommonModel model = new CommonModel();
                model.LegislativeID   = Convert.ToInt64(item["ID"]);
                model.LegislativeName = Convert.ToString(item["Name"]);
                legislativeList.Add(model);
            }

            return(legislativeList);
        }