Exemple #1
0
        public List <CheckCoDuongDai> GetDSCuocDuongDaiSanBayMoiThayDoi(DateTime TGLayDuLieuTruoc)
        {
            List <CheckCoDuongDai> lstCheckCoDuongDai = new List <CheckCoDuongDai>();

            using (DataSet ds = new Taxi.Data.CheckCoDuongDai.CheckCoDuongDai().GetDSCuocDuongDaiSanBayMoiThayDoi(TGLayDuLieuTruoc))
            {
                DataTable dt = ds.Tables[0];
                try
                {
                    if (dt != null)
                    {
                        if (dt.Rows.Count <= 0)
                        {
                            return(null);
                        }
                        else
                        {
                            foreach (DataRow row in dt.Rows)
                            {
                                lstCheckCoDuongDai.Add(GetDSCheckCoDuongDai(row));
                            }
                        }
                    }
                    return(lstCheckCoDuongDai);
                }
                catch (Exception ex)
                {
                    return(null);
                }
            }
        }
Exemple #2
0
        public List <CheckCoDuongDai> GetDSCuocDuongDaiSanBay_Gara(string soHieuXe, int thoiGian, int gara)
        {
            List <CheckCoDuongDai> lstCheckCoDuongDai = new List <CheckCoDuongDai>();

            using (DataSet ds = new Taxi.Data.CheckCoDuongDai.CheckCoDuongDai().GetDSCuocDuongDaiSanBay_Gara(soHieuXe, thoiGian, gara))
            {
                DataTable dt = ds.Tables[0];
                try
                {
                    if (dt != null)
                    {
                        if (dt.Rows.Count <= 0)
                        {
                            return(null);
                        }
                        else
                        {
                            foreach (DataRow row in dt.Rows)
                            {
                                lstCheckCoDuongDai.Add(GetDSCheckCoDuongDai(row));
                            }
                        }
                    }
                    return(lstCheckCoDuongDai);
                }
                catch (Exception ex)
                {
                    return(null);
                }
            }
        }
Exemple #3
0
        public List <CheckCoDuongDai> GetDSCuocDuongDaiSanBay_TG()
        {
            List <CheckCoDuongDai> lstCheckCoDuongDai = new List <CheckCoDuongDai>();
            DataSet   ds = new Taxi.Data.CheckCoDuongDai.CheckCoDuongDai().GetDSCuocDuongDaiSanBay_TG();
            DataTable dt = ds.Tables[0];

            try
            {
                if (dt != null)
                {
                    if (dt.Rows.Count <= 0)
                    {
                        return(null);
                    }
                    else
                    {
                        foreach (DataRow row in dt.Rows)
                        {
                            lstCheckCoDuongDai.Add(GetDSCheckCoDuongDai(row));
                        }
                    }
                }
                return(lstCheckCoDuongDai);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Exemple #4
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 #5
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 #6
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);
        }