private string KiemTraXeNhanDaNhanCuoc(long IDCuocKhach, string strXeNhan)
        {
            if (strXeNhan.Length <= 0)
            {
                return(strXeNhan);
            }
            DieuHanhTaxi objDHTaxi             = new DieuHanhTaxi();
            string       strDSXeNhanDaNhanDiem = "";

            string[] arrTaxi      = strXeNhan.Split(".".ToCharArray());
            string   SQLCondition = " AND  (len(XeNhan)>0) AND (ID <> " + IDCuocKhach.ToString() + " ) ";

            List <DieuHanhTaxi> lstDienThoai = objDHTaxi.GetAllOf_DienThoai(SQLCondition);

            if (lstDienThoai != null && lstDienThoai.Count > 0)
            {
                for (int i = 0; i < arrTaxi.Length; i++)
                {
                    if (KiemTraXeCoTrongCuocKhachHienTai(lstDienThoai, arrTaxi[i]))
                    {
                        strDSXeNhanDaNhanDiem += arrTaxi[i].ToString() + ".";
                    }
                }
            }
            return(strDSXeNhanDaNhanDiem);
        }
        /// <summary>
        /// load all cacs cuoc goi chua ket thuc (tat ca khong phai cua minh nua)
        /// </summary>

        private void LoadAllCuocGoiHienTai(long IDCurrent)
        {
            try
            {
                DieuHanhTaxi objDHTaxi    = new DieuHanhTaxi();
                string       SQLCondition = " ORDER BY ThoiDiemGoi DESC";
                lstDienThoai = objDHTaxi.GetAllOf_DienThoai(SQLCondition);

                foreach (DieuHanhTaxi objDHTX in lstDienThoai)
                {
                    if (objDHTX.ID_DieuHanh != IDCurrent)
                    {
                        mListOfCalls.Add(objDHTX);
                    }
                }

                gridListCalls.DataMember = "ListDienThoai";
                gridListCalls.SetDataBinding(mListOfCalls, "ListDienThoai");
            }
            catch (Exception ex)
            {
            }
        }
 /// <summary>
 /// tim dia chi cua cuoc goi gan day nhat
 /// -- uu tien tim trong cuoc goi hien tai
 /// -- tim theo cuoc goi da ket thuc trong ngay
 /// </summary>
 /// <returns></returns>
 private string GetDiaChiCuaCuocGoiGanNhatTrongNgay(string PhoneNumber)
 {
     try
     {
         string strDiaChi = "";
         List <DieuHanhTaxi> lstDienThoai = new List <DieuHanhTaxi>();
         //Lay danh sach cac cuoc goi con hoat dong (chua ket thuc)
         DieuHanhTaxi objDHTaxi    = new DieuHanhTaxi();
         string       SQLCondition = " ORDER BY ThoiDiemGoi DESC";
         lstDienThoai = objDHTaxi.GetAllOf_DienThoai(SQLCondition);
         if (lstDienThoai != null)
         {
             if (lstDienThoai.Count > 0)
             {
                 foreach (DieuHanhTaxi objDHTX in lstDienThoai)
                 {
                     if (objDHTX.PhoneNumber != null)
                     {
                         if (objDHTX.PhoneNumber.Contains(PhoneNumber))
                         {
                             strDiaChi = objDHTX.DiaChiDonKhach;
                             break;
                         }
                     }
                 }
             }
         }
         lstDienThoai.Clear();
         lstDienThoai = null;
         // lay trong da ket thuc trong ngay
         return(strDiaChi);
     }
     catch (Exception ex)
     {
         return(string.Empty);
     }
 }