예제 #1
0
        /// <summary>
        /// Gửi sms thông báo xe đón và có view car
        /// </summary>
        /// <param name="receiveNumber"></param>
        /// <param name="driverName"></param>
        /// <param name="phoneNumber"></param>
        /// <param name="privateCode"></param>
        /// <param name="vehiclePlate"></param>
        /// <returns></returns>
        public static bool Vina_SendSms_VinaTaxi_ViewCar(string receiveNumber, string privateCode, float custLat, float custLng, System.Guid bookID, float estimateTime)
        {
            string driverName  = "";
            string driverPhone = "";

            string vehiclePlate = CommonBL.ConvertSangBienSo(privateCode).Trim();

            if (CommonBL.DictDriver != null && CommonBL.DictDriver.ContainsKey(privateCode))
            {
                driverName  = UnicodeStrings.UnicodeFormat_V2(CommonBL.DictDriver[privateCode].TenNhanVien);
                driverPhone = CommonBL.DictDriver[privateCode].DiDong;
            }
            return(ServiceSMSVina.TryGet(t => t.SendSms_VinaTaxi_ViewCar(ConvertPhoneNumber(receiveNumber), driverName, driverPhone, privateCode, vehiclePlate, custLat, custLng, bookID, estimateTime)).Value);
        }
 /// <summary>
 /// Gửi sms khi xe đến điểm gặp khách trong điều xe đường dài! (VD: Ba Sao)
 /// </summary>
 public static bool SendSMS_ReceiveCatchedUser(Guid bookId, string mobile, string privateCode, int money, LoaiCuocKhach loaiCuoc, int giaPhuTroi, int quangduong, TcpOPDirection dir,
                                               string param6 = "", string param7 = "", string param8 = "", string param9 = "", string param10 = "")
 {
     try
     {
         string driverName = "";
         if (CommonBL.DictDriver != null && CommonBL.DictDriver.ContainsKey(privateCode))
         {
             driverName = UnicodeStrings.UnicodeFormat_V2(CommonBL.DictDriver[privateCode].TenNhanVien);
         }
         TcpOPBookTripType tripType = TcpOPBookTripType.Normal;
         if (loaiCuoc == LoaiCuocKhach.ChoKhachDuongDai)
         {
             tripType = TcpOPBookTripType.Long;
         }
         else if (loaiCuoc == LoaiCuocKhach.ChoKhachSanBay)
         {
             tripType = TcpOPBookTripType.Airport;
             #region BaSao : Xe nội thành chở khách đi sân bay mới nhắn tin
             if (license.IsTaxiBaSao)
             {
                 int soXe = 0;
                 if (int.TryParse(privateCode, out soXe)) //Nhiều xe cũng ko gửi sms
                 {
                     if (soXe >= 1000)                    //Xe sân bay của Ba Sao là xe lớn hơn 1000
                     {
                         return(true);
                     }
                 }
             }
             #endregion
         }
         if (Config_Common.SMS_CuocDuongDai_LaiXe)
         {
             return(Client.TryGet(p => p.SendSMS_ReceiveCatchedUser_V2(bookId, mobile, privateCode, driverName, CommonBL.ConvertSangBienSo(privateCode), money, tripType, giaPhuTroi, quangduong, dir, param6, param7, param8, param9, param10)).Value);
         }
         else
         {
             return(Client.TryGet(p => p.SendSMS_ReceiveCatchedUser(bookId, mobile, privateCode, money, tripType, giaPhuTroi, quangduong, dir, param6, param7, param8, param9, param10)).Value);
         }
     }
     catch (Exception ex)
     {
         LogError.WriteLogError("SendSMS_ReceiveCatchedUser", ex);
         return(false);
     }
 }