Exemple #1
0
        public static List <District> GetAllDistrict()
        {
            List <District> lstDistrict = new List <District>();
            DataTable       dt          = new Taxi.Data.CheckCoDuongDai.CheckCoDuongDai().GetDistrict().Tables[0];

            if (dt.Rows.Count > 0)
            {
                lstDistrict.Add(new District());
                foreach (DataRow dr in dt.Rows)
                {
                    lstDistrict.Add(GetDistrictByDataRow(dr));
                }
            }
            dt.Dispose();
            dt = null;

            return(lstDistrict);
        }
Exemple #2
0
        public static List <Province> GetAllProvince()
        {
            List <Province> lstProvince = new List <Province>();
            DataTable       dt          = new Taxi.Data.CheckCoDuongDai.CheckCoDuongDai().GetProvince().Tables[0];

            if (dt.Rows.Count > 0)
            {
                lstProvince.Add(new Province());
                foreach (DataRow dr in dt.Rows)
                {
                    lstProvince.Add(GetProvinceByDataRow(dr));
                }
            }
            dt.Dispose();
            dt = null;

            return(lstProvince);
        }
Exemple #3
0
        public static List <Commune> GetAllCommune()
        {
            List <Commune> lstCommune = new List <Commune>();
            DataTable      dt         = new Taxi.Data.CheckCoDuongDai.CheckCoDuongDai().GetCommune().Tables[0];

            lstCommune.Add(new Commune());
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    lstCommune.Add(GetCommuneByDataRow(dr));
                }
            }

            dt.Dispose();
            dt = null;

            return(lstCommune);
        }