Пример #1
0
        public static bool CanhBaoDenGioKhachHen(CuocGoiKhachHen CuocGoiKhachHen)
        {
            // lay thoi gian cua may chu
            DateTime timeServer = DieuHanhTaxi.GetTimeServer();
            // so sanh co thoi gian bao truoc chu
            int SoPhut = ((TimeSpan)(CuocGoiKhachHen.ThoiDiemBatDau - timeServer)).Minutes;

            if (SoPhut <= CuocGoiKhachHen.BaoTruocSoPhut)
            {
                return(true);
            }
            return(false);
        }
Пример #2
0
        public static CuocGoiKhachHen GetKhachHen(long ID_DieuHanh)
        {
            CuocGoiKhachHen objKhachHen = new CuocGoiKhachHen();
            DataTable       dt          = new DataTable();

            dt = new Data.CuocGoiKhachHen().GetCuocGoiKhachHens(ID_DieuHanh);
            if ((dt != null) && (dt.Rows.Count > 0))
            {
                DataRow dr = dt.Rows[0];
                objKhachHen.ID_DieuHanh    = (long)dr["ID_T_TaxiOperation"];
                objKhachHen.ThoiDiemBatDau = (DateTime)dr["ThoiDiemBatDau"];
                objKhachHen.BaoTruocSoPhut = (int)dr["BaoTruocSoPhut"];
                objKhachHen.IsDaGiaiQuyet  = dr["IsDaGiaiQuyet"].ToString() == "1";
                objKhachHen.GhiChu         = dr ["GhiChu"].ToString();
            }
            return(objKhachHen);
        }