예제 #1
0
        private CuocGoi GetAddress(string phoneNumber)
        {
            CuocGoi objCuocGoiMoi = new CuocGoi();

            DanhBaEx objDanhBaEx = G_GlobalContacts.GetGlobalContacsInfo(phoneNumber);

            if (objDanhBaEx != null && string.IsNullOrEmpty(objDanhBaEx.Address))
            {
                objCuocGoiMoi.KieuKhachHangGoiDen = objDanhBaEx.KieuKHGoiDen;
                objCuocGoiMoi.DiaChiDonKhach      = objDanhBaEx.Address;
                objCuocGoiMoi.DiaChiTraKhach      = objDanhBaEx.Address_Destination;
                objCuocGoiMoi.Vung            = objDanhBaEx.Vung;
                objCuocGoiMoi.MaDoiTac        = objDanhBaEx.MaDoiTac;
                objCuocGoiMoi.LoaiXe          = objDanhBaEx.LoaiXe;
                objCuocGoiMoi.GPS_KinhDo      = objDanhBaEx.GPS_KinhDo;
                objCuocGoiMoi.GPS_ViDo        = objDanhBaEx.GPS_ViDo;
                objCuocGoiMoi.GhiChuDienThoai = objDanhBaEx.GhiChuTiepNhan;
            }
            else
            {
                objCuocGoiMoi.CuocGoiLaiIDs = "0";
                objCuocGoiMoi.SoLanGoi      = 0;
                objCuocGoiMoi.Vung          = 0;
            }

            return(objCuocGoiMoi);
        }
        private CuocGoi GetAddress(string phoneNumber)
        {
            CuocGoi objCuocGoiMoi = new CuocGoi();

            try
            {
                objCuocGoiMoi.PhoneNumber = phoneNumber;
                objCuocGoiMoi.ThoiDiemGoi = DateTime.Now;
                DanhBaEx objDanhBaEx = G_GlobalContacts.GetGlobalContacsInfo(phoneNumber);
                if (objDanhBaEx != null && !string.IsNullOrEmpty(objDanhBaEx.Address))
                {
                    objCuocGoiMoi.KieuKhachHangGoiDen = objDanhBaEx.KieuKHGoiDen;
                    objCuocGoiMoi.DiaChiDonKhach      = objDanhBaEx.Address;
                    objCuocGoiMoi.DiaChiTraKhach      = objDanhBaEx.Address_Destination;
                    objCuocGoiMoi.Vung            = objDanhBaEx.Vung;
                    objCuocGoiMoi.MaDoiTac        = objDanhBaEx.MaDoiTac;
                    objCuocGoiMoi.LoaiXe          = objDanhBaEx.LoaiXe;
                    objCuocGoiMoi.GPS_KinhDo      = objDanhBaEx.GPS_KinhDo;
                    objCuocGoiMoi.GPS_ViDo        = objDanhBaEx.GPS_ViDo;
                    objCuocGoiMoi.GhiChuDienThoai = objDanhBaEx.GhiChuTiepNhan;
                    objCuocGoiMoi.CuocGoiLaiIDs   = objDanhBaEx.IdCuocGoi.ToString();
                    objCuocGoiMoi.SoLanGoi        = objDanhBaEx.SoLanGoi + 1;
                    objCuocGoiMoi.LenhDienThoai   = objDanhBaEx.LenhTiepNhan;
                }
                else
                {
                    objCuocGoiMoi.KieuKhachHangGoiDen = KieuKhachHangGoiDen.KhachHangBinhThuong;
                    objCuocGoiMoi.DiaChiDonKhach      = "";
                    objCuocGoiMoi.DiaChiTraKhach      = "";
                    objCuocGoiMoi.MaDoiTac            = "";
                    objCuocGoiMoi.LoaiXe          = "";
                    objCuocGoiMoi.GPS_KinhDo      = 0;
                    objCuocGoiMoi.GPS_ViDo        = 0;
                    objCuocGoiMoi.GhiChuDienThoai = "";
                    objCuocGoiMoi.LenhDienThoai   = "";
                    objCuocGoiMoi.CuocGoiLaiIDs   = "0";
                    objCuocGoiMoi.SoLanGoi        = 0;
                    objCuocGoiMoi.Vung            = 0;
                }
                objCuocGoiMoi.Line = Line;
            }
            catch (Exception ex)
            {
                LogError.WriteLogError("CallCapture_OpenSpaceSiemens GetAddress:", ex);
            }
            return(objCuocGoiMoi);
        }