Exemple #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);
                 }
             }
         }
     }
 }
Exemple #2
0
 private void mnuItemChuyenCuocGoi_Click(object sender, EventArgs e)
 {
     if (RealTimeEnvironment.IsLogin)
     {
         var row = grvDaGiaiQuyet.GetFocusedRow() as CuocGoi;
         if (row != null)
         {
             if (MessageBox.Show(string.Format("Bạn có muốn chuyển cuộc gọi: {0} không ?", row.DiaChiDonKhach), "Thông báo",
                                 MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
             {
                 CuocGoi.DIENTHOAI_UpdateCGKetThuc2ChuaGiaiQuyet(row.IDCuocGoi);
                 grdDaGiaiQuyet.DataSource = CuocGoi.DIENTHOAI_LayCuocGoiDaGiaiQuyet(RealTimeEnvironment.LineVung, SoDong);
                 IsDaGiaiQuyet             = false;
             }
         }
     }
 }