/// <summary> /// Gửi lệnh tạo cuốc cho các xe trong danh sách xe nhận /// </summary> /// <param name="cuocGoi">The cuoc goi.</param> /// <returns></returns> /// <Modified> /// Name Date Comments /// LuanBH 8/3/2015 created /// </Modified> public static bool SendInitTrip(CuocGoi cuocGoi) { if (HasSendMobile(cuocGoi.KhongDungMobileService.Value)) { var privateCodes = ProcessFastTaxi.GetVehiclePlatesFromPrivateCode(cuocGoi.XeNhan, "."); if (string.IsNullOrEmpty(privateCodes)) { return(false); } if (privateCodes.IndexOf("..") > -1 || privateCodes.StartsWith(".")) { return(false); } CuocGoi.EnVangVIP_GuiTinChoLaiXe(cuocGoi.IDCuocGoi); if (Global.HasInternet == 1) { return(Service_Common.EnvangVip.TryGet(p => p.SendInitTrip(cuocGoi.IDCuocGoi.ToString(), cuocGoi.DiaChiDonKhach, cuocGoi.DiaChiDonKhach , Convert.ToSingle(cuocGoi.GPS_ViDo), Convert.ToSingle(cuocGoi.GPS_KinhDo), cuocGoi.DiaChiTraKhach, cuocGoi.DiaChiTraKhach, 0, 0, cuocGoi.GhiChuDienThoai , Convert.ToByte(cuocGoi.SoLuong), Convert.ToByte(cuocGoi.KieuCuocGoi), Convert.ToByte(cuocGoi.KieuKhachHangGoiDen), cuocGoi.PhoneNumber , privateCodes.Split(".".ToCharArray()), false, string.Empty, 0)).Success); } else { string message = string.Format("Moi nhan cuoc don o: {0}", cuocGoi.DiaChiDonKhach); return(SendSMSMessage(cuocGoi, message)); } } return(false); }