Beispiel #1
0
 private void grvChoGiaiQuyet_EventActionStep(Taxi.Controls.Base.Controls.Grids.Extends.RealTimeStep obj)
 {
     grvCuocKhachLineKhac.ActionStep(obj);
     if (obj == Taxi.Controls.Base.Controls.Grids.Extends.RealTimeStep.Step_1)
     {
         if (!PingApp.IsBusy)
         {
             PingApp.RunWorkerAsync();
         }
         if (IsDaGiaiQuyet)
         {
             grdDaGiaiQuyet.DataSource = CuocGoi.DIENTHOAI_LayCuocGoiDaGiaiQuyet(RealTimeEnvironment.LineVung, SoDong);
             IsDaGiaiQuyet             = false;
         }
     }
     else if (obj == Taxi.Controls.Base.Controls.Grids.Extends.RealTimeStep.Step_3)
     {
         if (Config_Common.DienThoai_DieuApp_ChuyenDam == 0 || Config_Common.DienThoai_DieuApp_ChuyenDam == 3)
         {
             // nếu  Cuốc điều app  và 1'30 ko có xe nhận thì thì tự đông chuyển sang cuốc điều đàm.
             foreach (var item in grvChoGiaiQuyet.ListData.Where(p => p.G5_Type == Enum_G5_Type.DieuApp && string.IsNullOrEmpty(p.XeNhan) && p.G5_SendDate != null).ToList())
             {
                 if ((RealTimeEnvironment.TimeServer - item.G5_SendDate.Value).TotalSeconds > Config_Common.DienThoai_DieuApp_ThoiGianChuyenDam)
                 {
                     CuocGoi.G5_DIENTHOAI_UpdateBookTimeout(item.BookId);
                 }
             }
         }
     }
 }