Beispiel #1
0
 public void Delete(PES.GPS.Entity.WebSMS.EAlarmInfo entity)
 {
     using (IRepository repository = SessionManager.CreateRepository(typeof(EAlarmInfo)))
     {
         repository.Delete(entity);
     }
 }
 public void Delete(PES.GPS.Entity.Track.EVehicleRunningState entity)
 {
     using (IRepository repository = SessionManager.CreateRepository(typeof(EVehicleRunningState)))
     {
         repository.Delete(entity);
     }
 }
Beispiel #3
0
        private static void Main(string[] args)
        {
            Game fifa = new FIFA();
            Game pes  = new PES();

            Gamer player1 = new Player1();
            Gamer player2 = new Player2()
            {
                Id            = 1,
                FirstName     = "Abdullah",
                LastName      = "NUROĞLU",
                DateOfBirth   = new DateTime(1996, 1, 6),
                NationalityNo = "15183075370",
                UserName      = "******",
                Level         = 99
            };

            GamerManager gamerManager = new GamerManager(new GamerCheckManager());
            bool         isValid      = gamerManager.Add(player2);

            Campaign campaign = new Campaign()
            {
                Id      = 1,
                Name    = "free",
                Details = "teke it for free"
            };

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.AddCampaign(campaign);
            campaignManager.UpdateCampaign(campaign, "everything for free");
        }
        public void Set(PES.GPS.GpsEntityBase.GPSDataEntity data)
        {
            try
            {
                if (data != null)
                {
                    //GpsDataCachedEntity entity = new GpsDataCachedEntity();
                    //string k = data.GPSCode + keyprefix;

                    //byte[] bytes= entity.WriteBuffer(data);
                    //iCacheProvider.Add(k, data);

                    //修改:涂江
                    //缓存改为Hashtable
                    iCacheProvider.Add(data.GPSCode, data);

                    Logger.Trace(string.Format("[CacheCurrentInfoMgr.Set(GPSDataEntity data)] 保存gps数据到缓存;[GPSCode:{0}] [Latitude:{1}] [Longitude:{2}] [Mileage:{3}] [StarkMileage:{4}]", data.GPSCode, data.Latitude, data.Longitude, data.Mileage, data.StarkMileage));
                }
                else
                {
                    Logger.Trace("[CacheCurrentInfoMgr.Set(GPSDataEntity data)] data 为空");
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex, null);
                Logger.Trace(string.Format("[CacheCurrentInfoMgr.Set(GPSDataEntity data)] 保存gps数据到缓存异常;{0}", ex.StackTrace));
                //iCacheProvider = CacheProviderFactory.Default.CreateCacheProvider();
                //Logger.Trace("[LIXUN] 重新初始化MemCached代理..."); 
            }
        }
Beispiel #5
0
 public void Set(PES.GPS.GpsEntityBase.GPSDataEntity data)
 {
     if (data != null)
     {
         List<GPSDataEntity> gs = new List<GPSDataEntity>();
         gs.Add(data);
         Set(gs);
     }
 }
Beispiel #6
0
 public void Set(PES.GPS.GpsEntityBase.GPSDataEntity data)
 {
     if (data != null)
     {
         if(IsUseCurrentInfoCached)
             cache.Set(data);
         db.Set(data);
     }
 }
Beispiel #7
0
 public void Set(PES.GPS.GpsEntityBase.GPSDataEntity data)
 {
     if (data != null)
     {
         cache.Set(data);
         List<PES.GPS.GpsEntityBase.GPSDataEntity> dataList = new List<GPSDataEntity>()
         {
             data
         };
         FetchData.GetInstance().UpdateDynamicData(dataList);
     }
 }
Beispiel #8
0
        /// <summary>
        /// Called by 'AgregatePayload()' as soon as a frame has been completed.
        /// Adds a GenericMediaFrame to the WaitingFrames queue if possible.
        /// </summary>
        private void DecodeFrame(int PES_PID, MemoryStream StreamData, double MinimumTime)
        {
            if (StreamData == null || StreamData.Length <= 9)
            {
                return;                                                           // no useful data.
            }
            byte[] payload = StreamData.ToArray();
            PES    pes     = new PES(payload);

            long new_timestamp     = pes.PTS;
            long minimum_timestamp = (long)(MinimumTime * 90000.0);

            while (new_timestamp < minimum_timestamp)         // fix for 32-bit issues:
            {
                new_timestamp += 0xFFFFFFFFL;                 // compensate for overflow
            }

            // **** EVERYTHING ABOVE THIS LINE IS 90kHz CLOCK ****
            new_timestamp = MpegToNetTime(new_timestamp);
            // **** EVERYTHING BELOW THIS LINE IS 10MHz CLOCK ****

            long old_timestamp = Timestamps[PES_PID];

            if (new_timestamp > old_timestamp)
            {
                Timestamps[PES_PID] = new_timestamp;
            }
            if (old_timestamp < 0)
            {
                old_timestamp = new_timestamp;                                // prevent very long frames if clock is not zero-based.
            }
            GenericMediaFrame frame = new GenericMediaFrame();

            frame.FrameData             = pes.FrameData;
            frame.DataLength            = frame.FrameData.Length;
            frame.FramePresentationTime = Timestamps[PES_PID];
            frame.FrameDuration         = Timestamps[PES_PID] - old_timestamp;     // First frame duration = 0

            WaitingFrames[PES_PID].Enqueue(frame);

            // try to fix first frame:
            if (WaitingFrames[PES_PID].Count == 2)
            {
                var first = WaitingFrames[PES_PID].Peek();

                // if bad duration, guess that it'll be the same as the next.
                if (first.FrameDuration <= 1)
                {
                    first.FrameDuration = frame.FrameDuration;
                }
            }
        }
 public IList<EVehicleWriteOff> Search(SessionContext sessionContext,PES.Logistics.Entity.SearchCriteria criteria)
 {
     Query query = new Query(typeof(EVehicleWriteOff));
     query.Expression = criteria.Expression;
     using (IRepository repository = SessionManager.CreateRepository(sessionContext.TenantCode))
     {
         IList<EVehicleWriteOff> list = repository.List<EVehicleWriteOff>(query);
         criteria.RecordCount = list.Count;
     }
     criteria.PageIndex = (criteria.PageIndex - 1) * criteria.PageSize;
     query.Index = criteria.PageIndex;
     query.Count = criteria.PageSize;
     using (IRepository repository = SessionManager.CreateRepository(sessionContext.TenantCode))
     {
         return repository.List<EVehicleWriteOff>(query);
     }
 }
 public void Set(PES.GPS.GpsEntityBase.GPSDataEntity data)
 {
     try
     {
         if (data != null)
         {
             string k = Key(data.GPSCode);
             if (ht.ContainsKey(k))
                 ht[k] = data;
             else
                 ht.Add(k, data);
         }
     }
     catch (Exception ex)
     {
         Logger.Error(ex, null);
     }
 }
Beispiel #11
0
        public void Set(PES.GPS.GpsEntityBase.GPSDataEntity data)
        {
            try
            {
                if (data != null)
                {
                    GpsDataCachedEntity entity = new GpsDataCachedEntity();
                    string k = Key(data.GPSCode);

                    byte[] bytes= entity.WriteBuffer(data);
                    iCacheProvider.Add(k, bytes);
                    //Logger.Fatal("保存新实体到缓存");
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex, null);
                //iCacheProvider = CacheProviderFactory.Default.CreateCacheProvider();
                //Logger.Trace("[LIXUN] 重新初始化MemCached代理..."); 
            }
        }
Beispiel #12
0
        public byte[] WriteBuffer(PES.GPS.GpsEntityBase.GPSDataEntity GpsData)
        {
            byte[] bRet = new byte[33];

            int iLatitude = (int)(GpsData.Latitude * 500 * 3600);
            byte[] bLatitude = BitConverter.GetBytes(iLatitude);
            Array.Copy(bLatitude, 0, bRet, 0, 4);

            int iLongitude = (int)(GpsData.Longitude * 500 * 3600);
            byte[] bLongitude = BitConverter.GetBytes(iLongitude);
            Array.Copy(bLongitude, 0, bRet, 4, 4);

            //StarkMileage
            ulong iSMileage = (ulong)(GpsData.StarkMileage * 100);
            byte[] bSMileage = BitConverter.GetBytes(iSMileage);
            Array.Copy(bSMileage, 0, bRet, 8, 8);

            short sDirection = (short)GpsData.Direction;
            byte[] bDirection = BitConverter.GetBytes(sDirection);
            Array.Copy(bDirection, 0, bRet, 16, 2);

            byte bSpeed = (byte)GpsData.Speed;
            bRet[18] = bSpeed;

            byte[] bReportTime = DateTime2ByteArray(GpsData.ReportTime);
            Array.Copy(bReportTime, 0, bRet, 19, 6);

            byte[] bStartStopCarTime = DateTime2ByteArray(GpsData.StartStopCarTime);
            Array.Copy(bStartStopCarTime, 0, bRet, 25, 6);

            byte bStatus = Status2Byte(GpsData);
            bRet[31] = bStatus;

            bRet[32] = (byte)GpsData.PowerState;

            return bRet;
        }
Beispiel #13
0
        private RUserInfo CovnertToUserInfo(PES.Guanaco.Entity.Permission.EUser user)
        {
            RUserInfo info = new RUserInfo();
            info.UserCode = user.UserCode;
            info.UserName = user.UserName;
            info.Tenants = new List<TenantViewModel>();
            foreach (var o in user.TenantList)
            {
                TenantViewModel tenantViewModel = new TenantViewModel();
                tenantViewModel.TenantCode = o.TenantCode;
                tenantViewModel.TenantName = o.TenantDisplayName;
                info.Tenants.Add(tenantViewModel);
            }

            return info;
        }
Beispiel #14
0
 private VehicleViewModel ConvertToVehicleViewModal(PES.GPS.Entity.MobileQuery.EBaseVehicle entity)
 {
     VehicleViewModel model = new VehicleViewModel();
     model.VehicleCode = entity.Code;
     model.LicenceNumber = entity.LicenceNumber;
     return model;
 }
Beispiel #15
0
 /// <summary>
 /// 根据租户编号、车牌名称、模糊车辆返回车辆列表(只包含安装GPS的车辆)FOR YWT
 /// </summary>
 /// <param name="param"></param>
 /// <returns></returns>
 public AndroidData<List<VehicleViewModel>> GetInstallVehicleList(PES.GPS.GPSService.MobileQueryService.ViewModel.Android.Params.PVehicleCondtion param)
 {
     AndroidData<List<VehicleViewModel>> data = new AndroidData<List<VehicleViewModel>>();
     if (!param.CheckTicket())
     {
         data.Message = MessageByInvalidTicket;
         data.ResultCode = ResultCodeEnum.InvalidTicket;
     }
     else
     {
         try
         {
             AndroidInstallation business = new AndroidInstallation();
             IList<PES.Guanaco.Entity.Permission.EVehicle> vehicleList = business.GetInstallVehicleList(param.TenantCode, param.LicenseNumber);
             List<VehicleViewModel> vmList = new List<VehicleViewModel>();
             foreach (PES.Guanaco.Entity.Permission.EVehicle info in vehicleList)
             {
                 VehicleViewModel vm = new VehicleViewModel();
                 vm.LicenceNumber = info.LicenceNumber;
                 vm.VehicleCode = info.Code;
                 vmList.Add(vm);
             }
             data.ResultData = vmList;
             data.ResultCode = ResultCodeEnum.Success;
         }
         catch (Exception ex)
         {
             data.ResultCode = ResultCodeEnum.Fail;
             data.Message = ex.Message;
         }
     }
     return data;
 }
Beispiel #16
0
 /// <summary>
 /// 根据客户名称模糊查询客户返回客户列表 FOR YWT
 /// </summary>
 /// <param name="param"></param>
 /// <returns></returns>
 /// <summary>
 public AndroidData<List<TenantViewModel>> GetTenantList(PES.GPS.GPSService.MobileQueryService.ViewModel.Android.Params.PTenantCondition param)
 {
     AndroidData<List<TenantViewModel>> data = new AndroidData<List<TenantViewModel>>();
     if (!param.CheckTicket())
     {
         data.Message = MessageByInvalidTicket;
         data.ResultCode = ResultCodeEnum.InvalidTicket;
     }
     else
     {
         try
         {
             AndroidInstallation business = new AndroidInstallation();
             IList<PES.Guanaco.Entity.Tenant.ETenant> tenantList = business.GetTenantList(param.TenantName);
             List<TenantViewModel> vmList = new List<TenantViewModel>();
             foreach (PES.Guanaco.Entity.Tenant.ETenant info in tenantList)
             {
                 TenantViewModel vm = new TenantViewModel();
                 vm.TenantCode = info.TenantCode;
                 vm.TenantName = info.TenantName;
                 vmList.Add(vm);
             }
             data.ResultData = vmList;
             data.ResultCode = ResultCodeEnum.Success;
         }
         catch (Exception ex)
         {
             data.ResultCode = ResultCodeEnum.Fail;
             data.Message = ex.Message;
         }
     }
     return data;
 }
Beispiel #17
0
 /// <summary>
 /// 获取GPS型号列表、厂商名称 FOR YWT
 /// </summary>
 /// <param name="param"></param>
 /// <returns></returns>
 public AndroidData<List<GPSTypeViewModel>> GetGPSTypeList(PES.GPS.GPSService.MobileQueryService.ViewModel.Android.Params.PGPSType param)
 {
     AndroidData<List<GPSTypeViewModel>> data = new AndroidData<List<GPSTypeViewModel>>();
     if (!param.CheckTicket())
     {
         data.Message = MessageByInvalidTicket;
         data.ResultCode = ResultCodeEnum.InvalidTicket;
     }
     else
     {
         try
         {
             AndroidInstallation business = new AndroidInstallation();
             IList<EGPSType> gpsTypeList = business.GetGPSTypeList();
             List<GPSTypeViewModel> vmList = new List<GPSTypeViewModel>();
             foreach (EGPSType info in gpsTypeList)
             {
                 GPSTypeViewModel vm = new GPSTypeViewModel();
                 vm.RecordID = info.RecordID;
                 vm.Name = info.Name;
                 vm.ManufacturerName = info.GPSManufacturer.Name;
                 vm.PrefixCode = info.PrefixCode;
                 vmList.Add(vm);
             }
             data.ResultData = vmList;
             data.ResultCode = ResultCodeEnum.Success;
         }
         catch (Exception ex)
         {
             data.ResultCode = ResultCodeEnum.Fail;
             data.Message = ex.Message;
         }
     }
     return data;
 }
Beispiel #18
0
        public AndroidData<PES.GPS.GPSService.MobileQueryService.ViewModel.Android.Return.RResult> AbolishGPS(PES.GPS.GPSService.MobileQueryService.ViewModel.Android.Params.PAbolish param)
        {
            AndroidData<PES.GPS.GPSService.MobileQueryService.ViewModel.Android.Return.RResult> data = new AndroidData<PES.GPS.GPSService.MobileQueryService.ViewModel.Android.Return.RResult>();
            PES.GPS.GPSService.MobileQueryService.ViewModel.Android.Return.RResult info = new PES.GPS.GPSService.MobileQueryService.ViewModel.Android.Return.RResult();
            try
            {
                if (!param.CheckTicket())
                {
                    data.Message = MessageByInvalidTicket;
                    data.ResultCode = ResultCodeEnum.InvalidTicket;
                    return data;
                }
                IAndroidInstallation iAndroidInstallation = new AndroidInstallation();
                string msg = string.Empty;
                info.IsSuccess = iAndroidInstallation.AbolishVehicleInstallationInfo(param.RecordID.ToString(), param.AbolishReason, param.AbolishRemark, param.UserCode,ref msg);
                info.Message = msg;

                data.ResultData = info;
                data.ResultCode = ResultCodeEnum.Success;
            }
            catch (Exception ex)
            {
                data.ResultCode = ResultCodeEnum.Fail;
                data.Message = ex.Message;
                Logger.Error(ex);
            }
            return data;
        }
        /// <summary>
        /// Called by 'AgregatePayload()' as soon as a frame has been completed.
        /// Adds a GenericMediaFrame to the WaitingFrames queue if possible.
        /// </summary>
        private void DecodeFrame(int PES_PID, MemoryStream StreamData)
        {
            if (StreamData == null || StreamData.Length <= 9) return; // no useful data.

            byte[] payload = StreamData.ToArray();
            PES pes = new PES(payload);

            long old_timestamp = Timestamps[PES_PID];
            if (pes.PTS > old_timestamp) {
                Timestamps[PES_PID] = pes.PTS;
            }
            if (old_timestamp < 0) old_timestamp = pes.PTS; // prevent very long frames if clock is not zero-based.

            GenericMediaFrame frame = new GenericMediaFrame();
            frame.FrameData = pes.FrameData;
            frame.DataLength = frame.FrameData.Length;
            frame.FramePresentationTime = Timestamps[PES_PID];
            frame.FrameDuration = Timestamps[PES_PID] - old_timestamp; // First frame duration = 0

            // Convert from MPEG to .Net timing (to comply with GenericMediaFrame standard)
            frame.FramePresentationTime = (frame.FramePresentationTime * 1000L) / 9L;
            frame.FrameDuration = (frame.FrameDuration * 1000L) / 9L;

            WaitingFrames[PES_PID].Enqueue(frame);

            // try to fix first frame:
            if (WaitingFrames[PES_PID].Count == 2) {
                var first = WaitingFrames[PES_PID].Peek();
                if (first.FrameDuration <= 0) { // if bad duration, guess that it'll be the same as the next.
                    first.FrameDuration = frame.FrameDuration;
                }
            }
        }
Beispiel #20
0
 //只保存到MEMCACHED
 public void SetCache(PES.GPS.GpsEntityBase.GPSDataEntity data)
 {
     if (data != null)
     {
         cache.Set(data);
     }
 }
Beispiel #21
0
        private byte Status2Byte(PES.GPS.GpsEntityBase.GPSDataEntity GpsData)
        {
            byte bStatus = 0;

            StringBuilder sb1 = new StringBuilder();
            sb1.Append('0');

            if (GpsData.ACCState == 0)
                sb1.Append('0');
            else
                sb1.Append('1');

            if (GpsData.OilState == 0)
                sb1.Append('0');
            else
                sb1.Append('1');

            if (GpsData.PowerState == 0)
                sb1.Append('0');
            else
                sb1.Append('1');

            if (GpsData.DoorStatus == 0)
                sb1.Append('0');
            else
                sb1.Append('1');

            if (GpsData.CoolerStatus == 0)
                sb1.Append('0');
            else
                sb1.Append('1');

            if (GpsData.IsStartStopCarTime)
                sb1.Append('1');
            else
                sb1.Append('0');

            if (GpsData.IsSendLongIntervalMessage)
                sb1.Append('1');
            else
                sb1.Append('0');

            bStatus = Convert.ToByte(sb1.ToString(), 2);


            return bStatus;
        }
Beispiel #22
0
        public virtual IList<LocationInfo> InverseGeocoding(PES.MapService.Entity.LatLon[] latlons)
        {
            IList<LocationInfo> list;
            bool isIn = IsAllIn(latlons, out list);
            if (isIn)
            {
                return list;
            }
            string[] encodeLatLonArray = Encode(latlons);
            string encodeLatLonList = string.Empty;

            if (encodeLatLonArray == null || encodeLatLonArray.Length == 0)
            {
                return list;
            }

            encodeLatLonList = string.Join(",", encodeLatLonArray);
            string xml = MapSearchService.InverseBatchGeocoding(encodeLatLonList);
            list = DataResolver.GetGeocodingList(xml);
            for (int i = 0; i < latlons.Length; i++)
            {
                LocationInfo temp;
                if (InArea(latlons[i].Latitude, latlons[i].Longitude, out temp))
                    list[i] = temp;
            }

            return list;
        }
Beispiel #23
0
 private void SetEncodeLatLon(PES.MapService.MapSearchService.MapService mapService, IList<VVehicleSearchResult> ltResult)
 {
     try
     {
         IList<LatLon> ltLatLon = new List<LatLon>();
         foreach (VVehicleSearchResult result in ltResult)
         {
             ltLatLon.Add(new LatLon(result.Latitude, result.Longitude));
         }
         string[] arrLatLonEncode = mapService.Encode(ltLatLon.ToArray());
         for (int i = 0; i < ltResult.Count; i++)
         {
             ltResult[i].EncodeLatLon = arrLatLonEncode[i];
         }
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
     }
 }
Beispiel #24
0
 public virtual string[] Encode(PES.MapService.Entity.LatLon[] latlons)
 {
     string xml = MapSearchService.Encode(latlons);
     return DataResolver.GetEncodeArray(xml);
 }
Beispiel #25
0
        public DEJPSY_RESP DejPsiSeznam(Session sesna, int EXT_APP_KOD, GET_PES_PARAMS inParams)
        {
            DEJPSY_RESP Resp = new DEJPSY_RESP();

            sesna.DropIdentityMap();

            try
            {
                #region kontrola vyberovych parametru
                if (((inParams.PES_ZNAMKA == null) &&
                     string.IsNullOrWhiteSpace(inParams.PES_JMENO) &&
                     (inParams.PES_PLEMENO_KOD == null) &&
                     string.IsNullOrWhiteSpace(inParams.POPLATNIK_PRIJMENI) &&
                     string.IsNullOrWhiteSpace(inParams.POPLATNIK_FIRMA) &&
                     string.IsNullOrWhiteSpace(inParams.POPLATNIK_ULICE) &&
                     (inParams.POPLATNIK_CP == null) &&
                     string.IsNullOrWhiteSpace(inParams.PES_TETOVANI) &&
                     string.IsNullOrWhiteSpace(inParams.PES_CIP) &&
                     string.IsNullOrWhiteSpace(inParams.PES_ZNAMKA_CIP)
                     )
                    )
                {
                    { throw new Exception("výběrová podmínka není zadána"); }
                }


                #endregion kontrola vyberovych parametru

                #region kontrola prava na poplatek
                if (EXT_APP_KOD == null)
                {
                    throw new Exception("kód externí aplikace není zadán");
                }
                P_EXTAPP EA = sesna.GetObjectByKey <P_EXTAPP>(EXT_APP_KOD);
                if (EA == null)
                {
                    throw new Exception("chybný kód externí aplikace");
                }


                int popl = Convert.ToInt16(sesna.ExecuteScalar(string.Format("SELECT KONF_POPLATEK FROM PES_KONFIG")));

                KONTROLA_POPLATKU kp = new KONTROLA_POPLATKU(sesna, EXT_APP_KOD);
                if (!kp.EAexist())
                {
                    throw new Exception("chybný kód externí aplikace");
                }
                if (!kp.existPravoNadPoplatkem(popl))
                {
                    throw new Exception("Ext. aplikace nemá oprávnění k typu pohledávky.");
                }
                #endregion kontrola prava na poplatek

                #region kontrola prava nad predpisy, platce,
                PravoNadPoplatkem pnp = null;
                try
                {
                    pnp = new PravoNadPoplatkem(sesna);
                }
                catch (Exception)
                {
                    throw new Exception("kontrola přístp. práv uživatele nad daty Příjmové agendy skončila chybou");
                }


                if (!pnp.PravoExist(popl, PravoNadPoplatkem.PrtabTable.PRPL, PravoNadPoplatkem.SQLPerm.SELECT))
                {
                    throw new Exception("PoplWS - nedostatečná oprávnění pro čtení předpisů.");
                }
                if (!pnp.PravoExist(popl, PravoNadPoplatkem.PrtabTable.RGP, PravoNadPoplatkem.SQLPerm.SELECT))
                {
                    throw new Exception("PoplWS - nedostatečná oprávnění pro čtení plátců.");
                }

                #endregion kontrola prava nad predpisy

                #region SQL select
                DBVal         dbv  = new DBVal(sesna);
                IDBValFactory idbv = dbv.CreateDBV();

                DateTime rDate = DateTime.Now;

                StringBuilder cmd = new StringBuilder();
                cmd.Append("select ");
                cmd.Append("  (select sum(PRPL_PREDPIS + PRPL_SANKCE - PRPL_SPAROVANO) from P_PRPL b ");
                cmd.Append("          where b.PRPL_ICO = a.RGP_ICO ");
                cmd.Append("            and b.PRPL_POPLATEK = a.RGP_POPLATEK ");
                cmd.Append("            and b.PRPL_PREDPIS + b.PRPL_SANKCE > 0  ");
                cmd.Append("            and b.PRPL_SPLATNO < " + idbv.getParamText("DNESEK"));
                cmd.Append("            and b.PRPL_RECORD in (' ','P')) DLUH, ");
                cmd.Append(" PES_MAJITEL_ICO, PES_ID, PES_CIS_PRIZNANI, PES_JMENO, PES_POPIS,");
                cmd.Append(" PES_ZNAMKA, PES_CIP, PES_NAROZEN, PES_DRZEN_OD, PES_POPL_OD, PES_POPL_DO,");
                cmd.Append(" PES_SLEVA_OD, PES_SLEVA_DO, PES_ZMENA_OD, PES_OCKOVAN, PES_UCEL, PES_SAZPOPL_SAZBA,");
                cmd.Append(" PES_POHLAVI, PES_OSVOBOZEN, PES_DRZEN_DO, PES_MAJITEL_PERIODA, PES_POZNAMKA, PES_TET,");
                cmd.Append(" PES_CIP2, PES_ZNAMKA_VYD, PES_BARVA, PES_SLEVAC_OD, PES_SLEVAC_DO, PES_SLEVAC_KC,");
                cmd.Append(" PES_UQ_ID,");
                cmd.Append(" C_PES_PLEMENO_NAZEV, C_PES_BARVA_NAZEV, ");
                cmd.Append(" ADR_ICO, ADR_TYP, ADR_NAZEV1, ADR_NAZEV2, ADR_ICZUJ, ADR_ICZUJ_NAZEV,");
                cmd.Append(" ADR_KODCOB, ADR_KODCOB_NAZEV, ADR_KODUL, ADR_KODUL_NAZEV, ADR_CIS_DOMU, ADR_CIS_OR,");
                cmd.Append(" ADR_ZNAK_CO, ADR_PSC, ADR_KNAZEV1, ADR_KNAZEV2, ADR_KICZUJ, ADR_KICZUJ_NAZEV,");
                cmd.Append(" ADR_KKODCOB, ADR_KKODCOB_NAZEV, ADR_KKODUL, ADR_KKODUL_NAZEV, ADR_KCIS_DOMU, ADR_KCIS_OR,");
                cmd.Append(" ADR_KZNAK_CO, ADR_KPSC, ADR_SIPO, ADR_ZMENAROB,");
                cmd.Append(" ADR_JMENO, ADR_KJMENO, ADR_PRIJMENI, ADR_KPRIJMENI, ADR_TITUL_PRED, ADR_KTITUL_PRED,");
                cmd.Append(" ADR_TITUL_ZA, ADR_KTITUL_ZA, ADR_ADRPOPL, ADR_ICO_OPROS, ADR_OPROS_ROZH, ADR_DATNAR,");
                cmd.Append(" ADR_ZMENAROB_ZPRAC, ADR_POSTA, ADR_kPOSTA, ADR_TELEFON, ADR_EMAIL, ADR_PLATCEDPH,");
                cmd.Append(" ADR_DIC, ADR_ISIR, ADR_IDDS, ADR_PAS, ADR_STAT, ADR_ID,");
                cmd.Append(" ADR_DADRESA, ADR_EA");
                cmd.Append("  from P_RGP a, P_ADRESA_ROBRHS, PES_MAJITEL, PES_PES ");
                cmd.Append("     LEFT OUTER JOIN C_PES_PLEMENO on (PES_PLEMENO = C_PES_PLEMENO_KOD) ");
                cmd.Append("     LEFT OUTER JOIN C_PES_BARVA on (PES_BARVA = C_PES_BARVA_KOD) ");
                cmd.Append(" where RGP_ICO = PES_MAJITEL_ICO ");
                cmd.Append("   and PES_MAJITEL_ICO = ADR_ICO  ");
                cmd.Append("   and MAJITEL_AKTIVNI = 'A' ");
                cmd.Append("   and PES_MAJITEL_ICO = MAJITEL_ICO ");
                cmd.Append("   and PES_MAJITEL_PERIODA = MAJITEL_PERIODA ");


                cmd.Append("   and PES_POPL_OD <= " + idbv.getParamText("DNESEK"));
                cmd.Append("   and (PES_POPL_DO is null or PES_POPL_DO >= " + idbv.getParamText("DNESEK") + ")");
                cmd.Append("   and RGP_POPLATEK = " + idbv.getParamText("POPL"));
                #endregion SQL select

                List <string> pNames = new List <string>();
                pNames.Add("DNESEK");
                pNames.Add("POPL");

                List <object> pValues = new List <object>();
                pValues.Add(rDate.Date); //DNESEK
                pValues.Add(popl);       //POPL

                #region odstraneni wildcarts [%, _]
                if (!string.IsNullOrWhiteSpace(inParams.PES_JMENO))
                {
                    inParams.PES_JMENO = inParams.PES_JMENO.Replace("%", string.Empty);
                    inParams.PES_JMENO = inParams.PES_JMENO.Replace("_", string.Empty);
                }
                if (!string.IsNullOrWhiteSpace(inParams.POPLATNIK_PRIJMENI))
                {
                    inParams.POPLATNIK_PRIJMENI = inParams.POPLATNIK_PRIJMENI.Replace("%", string.Empty);
                    inParams.POPLATNIK_PRIJMENI = inParams.POPLATNIK_PRIJMENI.Replace("_", string.Empty);
                }
                if (!string.IsNullOrWhiteSpace(inParams.POPLATNIK_FIRMA))
                {
                    inParams.POPLATNIK_FIRMA = inParams.POPLATNIK_FIRMA.Replace("%", string.Empty);
                    inParams.POPLATNIK_FIRMA = inParams.POPLATNIK_FIRMA.Replace("_", string.Empty);
                }
                if (!string.IsNullOrWhiteSpace(inParams.POPLATNIK_ULICE))
                {
                    inParams.POPLATNIK_ULICE = inParams.POPLATNIK_ULICE.Replace("%", string.Empty);
                    inParams.POPLATNIK_ULICE = inParams.POPLATNIK_ULICE.Replace("_", string.Empty);
                }
                #endregion odstraneni wildcarts

                #region where podminky
                if (inParams.PES_ZNAMKA != null)
                {
                    cmd.Append(" and PES_ZNAMKA = " + inParams.PES_ZNAMKA.ToString());
                }
                if (!string.IsNullOrWhiteSpace(inParams.PES_JMENO))
                {
                    if (inParams.PES_JMENO.Any(c => char.IsLower(c)))
                    {
                        if (inParams.PES_JMENO.Length >= 5)
                        {
                            cmd.Append(" and PES_JMENO like '" + inParams.PES_JMENO + "%'");
                        }
                        else
                        {
                            cmd.Append(" and PES_JMENO = '" + inParams.PES_JMENO + "'");
                        }
                    }
                    else
                    {
                        if (inParams.PES_JMENO.Length >= 5)
                        {
                            cmd.Append(" and UPPER(PES_JMENO) like '" + inParams.PES_JMENO + "%'");
                        }
                        else
                        {
                            cmd.Append(" and UPPER(PES_JMENO) = '" + inParams.PES_JMENO + "'");
                        }
                    }
                }

                if (inParams.PES_PLEMENO_KOD != null)
                {
                    cmd.Append(" and PES_PLEMENO = " + inParams.PES_PLEMENO_KOD.ToString());
                }

                if (!string.IsNullOrWhiteSpace(inParams.POPLATNIK_PRIJMENI))
                {
                    if (inParams.POPLATNIK_PRIJMENI.Any(c => char.IsLower(c)))
                    {
                        if (inParams.POPLATNIK_PRIJMENI.Length >= 5)
                        {
                            cmd.Append(" and ADR_PRIJMENI like '" + inParams.POPLATNIK_PRIJMENI + "%'");
                        }
                        else
                        {
                            cmd.Append(" and ADR_PRIJMENI = '" + inParams.POPLATNIK_PRIJMENI + "'");
                        }
                    }
                    else
                    {
                        if (inParams.POPLATNIK_PRIJMENI.Length >= 5)
                        {
                            cmd.Append(" and UPPER(ADR_PRIJMENI) like '" + inParams.POPLATNIK_PRIJMENI + "%'");
                        }
                        else
                        {
                            cmd.Append(" and UPPER(ADR_PRIJMENI) = '" + inParams.POPLATNIK_PRIJMENI + "'");
                        }
                    }
                }
                if (!string.IsNullOrWhiteSpace(inParams.POPLATNIK_FIRMA))
                {
                    if (inParams.POPLATNIK_FIRMA.Any(c => char.IsLower(c)))
                    {
                        if (inParams.POPLATNIK_FIRMA.Length >= 5)
                        {
                            cmd.Append(" and ADR_NAZEV1 like '" + inParams.POPLATNIK_FIRMA + "%'");
                        }
                        else
                        {
                            cmd.Append(" and ADR_NAZEV1 = '" + inParams.POPLATNIK_FIRMA + "'");
                        }
                    }
                    else
                    {
                        if (inParams.POPLATNIK_FIRMA.Length >= 5)
                        {
                            cmd.Append(" and UPPER(ADR_NAZEV1) like '" + inParams.POPLATNIK_FIRMA + "%'");
                        }
                        else
                        {
                            cmd.Append(" and UPPER(ADR_NAZEV1) = '" + inParams.POPLATNIK_FIRMA + "'");
                        }
                    }
                }

                if (!string.IsNullOrWhiteSpace(inParams.POPLATNIK_ULICE))
                {
                    if (inParams.POPLATNIK_ULICE.Any(c => char.IsLower(c)))
                    {
                        if (inParams.POPLATNIK_ULICE.Length >= 5)
                        {
                            cmd.Append(" and ADR_KODUL_NAZEV like '" + inParams.POPLATNIK_ULICE + "%'");
                        }
                        else
                        {
                            cmd.Append(" and ADR_KODUL_NAZEV = '" + inParams.POPLATNIK_ULICE + "'");
                        }
                    }
                    else
                    {
                        if (inParams.POPLATNIK_ULICE.Length >= 5)
                        {
                            cmd.Append(" and UPPER(ADR_KODUL_NAZEV) like '" + inParams.POPLATNIK_ULICE + "%'");
                        }
                        else
                        {
                            cmd.Append(" and UPPER(ADR_KODUL_NAZEV) = '" + inParams.POPLATNIK_ULICE + "'");
                        }
                    }
                }

                if (inParams.POPLATNIK_CP != null)
                {
                    cmd.Append(" and ADR_CIS_DOMU = " + inParams.POPLATNIK_CP.ToString());
                }

                if (!string.IsNullOrWhiteSpace(inParams.PES_ZNAMKA_CIP))
                {
                    cmd.Append(" and PES_CIP = '" + inParams.PES_ZNAMKA_CIP + "'");
                }

                if (!string.IsNullOrWhiteSpace(inParams.PES_TETOVANI))
                {
                    cmd.Append(" and PES_TET = '" + inParams.PES_TETOVANI + "'");
                }

                if (!string.IsNullOrWhiteSpace(inParams.PES_CIP))
                {
                    cmd.Append(" and PES_CIP2 = '" + inParams.PES_CIP + "'");
                }

                #endregion SQL podminky

                SelectedData resultSet = sesna.ExecuteQueryWithMetadata(cmd.ToString(), pNames.ToArray(), pValues.ToArray());


                string     ico = string.Empty;
                PES        pes;
                PLATCE_PSA psiPlatce = null;
                if (resultSet.ResultSet[1].Rows.Count() > 0)
                {
                    Resp.PLATCI = new List <PLATCE_PSA>();
                }

                foreach (var row in resultSet.ResultSet[1].Rows)
                {
                    if (ico != row.ValByName(resultSet, "ADR_ICO").ToString())
                    {
                        psiPlatce       = new PLATCE_PSA();
                        psiPlatce.OSOBA = new OSOBA();
                        row.copyToObject <OSOBA>(resultSet, psiPlatce.OSOBA);
                        row.copyToObject <KONTAKTNI_ADRESA>(resultSet, psiPlatce.OSOBA.KONTAKTNI_ADRESA);
                        object dluh = row.ValByName(resultSet, "DLUH") ?? (object)0;
                        psiPlatce.DLUH = Convert.ToDecimal(dluh) != 0;
                        Resp.PLATCI.Add(psiPlatce);

                        ico           = row.ValByName(resultSet, "ADR_ICO").ToString();
                        psiPlatce.PSI = new List <PES>();
                    }

                    pes = new PES();
                    row.copyToObject <PES>(resultSet, pes);

                    pes.PLEMENO = (string)row.ValByName(resultSet, "C_PES_PLEMENO_NAZEV");
                    pes.BARVA   = (string)row.ValByName(resultSet, "C_PES_BARVA_NAZEV");
                    psiPlatce.PSI.Add(pes);
                }

                Resp.result = Result.OK;
                if ((psiPlatce != null) && (psiPlatce.PSI.Count() > 0))
                {
                    Resp.status = Status.EXISTS;
                }
                else
                {
                    Resp.status = Status.NOTEXISTS;
                }

                return(Resp);
            }
            catch (Exception exc)
            {
                Resp.result = Result.ERROR;
                Resp.status = Status.ERROR; //0.27



                if (exc.InnerException == null)
                {
                    Resp.ERRORMESS = exc.Message;
                }
                else
                {
                    Resp.ERRORMESS = exc.InnerException.Message;
                }

                /*
                 * throw new Exception(String.Format("chyba \n {0}", exc.InnerException.Message));
                 */
                return(Resp);
            }
        }
 public override void Handle(EGPSCurrentInfo current, PES.GPSGateway.AlarmBusiness.Interface.AlarmHandleContext context)
 {
     throw new NotImplementedException();
 }
        /// <summary>
        /// Called by 'AgregatePayload()' as soon as a frame has been completed.
        /// Adds a GenericMediaFrame to the WaitingFrames queue if possible.
        /// </summary>
        private void DecodeFrame(int PES_PID, MemoryStream StreamData, double MinimumTime)
        {
            if (StreamData == null || StreamData.Length <= 9) return; // no useful data.

            byte[] payload = StreamData.ToArray();
            PES pes = new PES(payload);

            long new_timestamp = pes.PTS;
            long minimum_timestamp = (long)(MinimumTime * 90000.0);
            while (new_timestamp < minimum_timestamp) {// fix for 32-bit issues:
                new_timestamp += 0xFFFFFFFFL; // compensate for overflow
            }

            // **** EVERYTHING ABOVE THIS LINE IS 90kHz CLOCK ****
            new_timestamp = MpegToNetTime(new_timestamp);
            // **** EVERYTHING BELOW THIS LINE IS 10MHz CLOCK ****

            long old_timestamp = Timestamps[PES_PID];
            if (new_timestamp > old_timestamp) {
                Timestamps[PES_PID] = new_timestamp;
            }
            if (old_timestamp < 0) old_timestamp = new_timestamp; // prevent very long frames if clock is not zero-based.

            GenericMediaFrame frame = new GenericMediaFrame();
            frame.FrameData = pes.FrameData;
            frame.DataLength = frame.FrameData.Length;
            frame.FramePresentationTime = Timestamps[PES_PID];
            frame.FrameDuration = Timestamps[PES_PID] - old_timestamp; // First frame duration = 0

            WaitingFrames[PES_PID].Enqueue(frame);

            // try to fix first frame:
            if (WaitingFrames[PES_PID].Count == 2) {
                var first = WaitingFrames[PES_PID].Peek();

                // if bad duration, guess that it'll be the same as the next.
                if (first.FrameDuration <= 1) {
                    first.FrameDuration = frame.FrameDuration;
                }
            }
        }
Beispiel #28
0
        /// <summary>
        /// Constructs an HL7 segment for the specified Segments enum object
        /// </summary>
        /// <param name="seg">The Segments enum object to construct for</param>
        public Segment(Segments seg)
        {
            switch (seg)
            {
            case Segments.ABS:
                ABS abs = new ABS();
                Name        = abs.Name;
                Description = abs.Description;
                Fields      = abs.Fields;
                break;

            case Segments.ACC:
                ACC acc = new ACC();
                Name        = acc.Name;
                Description = acc.Description;
                Fields      = acc.Fields;
                break;

            case Segments.ADD:
                ADD add = new ADD();
                Name        = add.Name;
                Description = add.Description;
                Fields      = add.Fields;
                break;

            case Segments.AFF:
                AFF aff = new AFF();
                Name        = aff.Name;
                Description = aff.Description;
                Fields      = aff.Fields;
                break;

            case Segments.AIG:
                AIG aig = new AIG();
                Name        = aig.Name;
                Description = aig.Description;
                Fields      = aig.Fields;
                break;

            case Segments.AIL:
                AIL ail = new AIL();
                Name        = ail.Name;
                Description = ail.Description;
                Fields      = ail.Fields;
                break;

            case Segments.AIP:
                AIP aip = new AIP();
                Name        = aip.Name;
                Description = aip.Description;
                Fields      = aip.Fields;
                break;

            case Segments.AIS:
                AIS ais = new AIS();
                Name        = ais.Name;
                Description = ais.Description;
                Fields      = ais.Fields;
                break;

            case Segments.AL1:
                AL1 al1 = new AL1();
                Name        = al1.Name;
                Description = al1.Description;
                Fields      = al1.Fields;
                break;

            case Segments.APR:
                APR apr = new APR();
                Name        = apr.Name;
                Description = apr.Description;
                Fields      = apr.Fields;
                break;

            case Segments.ARQ:
                ARQ arq = new ARQ();
                Name        = arq.Name;
                Description = arq.Description;
                Fields      = arq.Fields;
                break;

            case Segments.AUT:
                AUT aut = new AUT();
                Name        = aut.Name;
                Description = aut.Description;
                Fields      = aut.Fields;
                break;

            case Segments.BHS:
                BHS bhs = new BHS();
                Name        = bhs.Name;
                Description = bhs.Description;
                Fields      = bhs.Fields;
                break;

            case Segments.BLC:
                BLC blc = new BLC();
                Name        = blc.Name;
                Description = blc.Description;
                Fields      = blc.Fields;
                break;

            case Segments.BLG:
                BLG blg = new BLG();
                Name        = blg.Name;
                Description = blg.Description;
                Fields      = blg.Fields;
                break;

            case Segments.BPO:
                BPO bpo = new BPO();
                Name        = bpo.Name;
                Description = bpo.Description;
                Fields      = bpo.Fields;
                break;

            case Segments.BPX:
                BPX bpx = new BPX();
                Name        = bpx.Name;
                Description = bpx.Description;
                Fields      = bpx.Fields;
                break;

            case Segments.BTS:
                BTS bts = new BTS();
                Name        = bts.Name;
                Description = bts.Description;
                Fields      = bts.Fields;
                break;

            case Segments.BTX:
                BTX btx = new BTX();
                Name        = btx.Name;
                Description = btx.Description;
                Fields      = btx.Fields;
                break;

            case Segments.CDM:
                CDM cdm = new CDM();
                Name        = cdm.Name;
                Description = cdm.Description;
                Fields      = cdm.Fields;
                break;

            case Segments.CER:
                CER cer = new CER();
                Name        = cer.Name;
                Description = cer.Description;
                Fields      = cer.Fields;
                break;

            case Segments.CM0:
                CM0 cm0 = new CM0();
                Name        = cm0.Name;
                Description = cm0.Description;
                Fields      = cm0.Fields;
                break;

            case Segments.CM1:
                CM1 cm1 = new CM1();
                Name        = cm1.Name;
                Description = cm1.Description;
                Fields      = cm1.Fields;
                break;

            case Segments.CM2:
                CM2 cm2 = new CM2();
                Name        = cm2.Name;
                Description = cm2.Description;
                Fields      = cm2.Fields;
                break;

            case Segments.CNS:
                CNS cns = new CNS();
                Name        = cns.Name;
                Description = cns.Description;
                Fields      = cns.Fields;
                break;

            case Segments.CON:
                CON con = new CON();
                Name        = con.Name;
                Description = con.Description;
                Fields      = con.Fields;
                break;

            case Segments.CSP:
                CSP csp = new CSP();
                Name        = csp.Name;
                Description = csp.Description;
                Fields      = csp.Fields;
                break;

            case Segments.CSR:
                CSR csr = new CSR();
                Name        = csr.Name;
                Description = csr.Description;
                Fields      = csr.Fields;
                break;

            case Segments.CSS:
                CSS css = new CSS();
                Name        = css.Name;
                Description = css.Description;
                Fields      = css.Fields;
                break;

            case Segments.CTD:
                CTD ctd = new CTD();
                Name        = ctd.Name;
                Description = ctd.Description;
                Fields      = ctd.Fields;
                break;

            case Segments.CTI:
                CTI cti = new CTI();
                Name        = cti.Name;
                Description = cti.Description;
                Fields      = cti.Fields;
                break;

            case Segments.DB1:
                DB1 db1 = new DB1();
                Name        = db1.Name;
                Description = db1.Description;
                Fields      = db1.Fields;
                break;

            case Segments.DG1:
                DG1 dg1 = new DG1();
                Name        = dg1.Name;
                Description = dg1.Description;
                Fields      = dg1.Fields;
                break;

            case Segments.DRG:
                DRG drg = new DRG();
                Name        = drg.Name;
                Description = drg.Description;
                Fields      = drg.Fields;
                break;

            case Segments.DSC:
                DSC dsc = new DSC();
                Name        = dsc.Name;
                Description = dsc.Description;
                Fields      = dsc.Fields;
                break;

            case Segments.DSP:
                DSP dsp = new DSP();
                Name        = dsp.Name;
                Description = dsp.Description;
                Fields      = dsp.Fields;
                break;

            case Segments.ECD:
                ECD ecd = new ECD();
                Name        = ecd.Name;
                Description = ecd.Description;
                Fields      = ecd.Fields;
                break;

            case Segments.ECR:
                ECR ecr = new ECR();
                Name        = ecr.Name;
                Description = ecr.Description;
                Fields      = ecr.Fields;
                break;

            case Segments.EDU:
                EDU edu = new EDU();
                Name        = edu.Name;
                Description = edu.Description;
                Fields      = edu.Fields;
                break;

            case Segments.EQL:
                EQL eql = new EQL();
                Name        = eql.Name;
                Description = eql.Description;
                Fields      = eql.Fields;
                break;

            case Segments.EQP:
                EQP eqp = new EQP();
                Name        = eqp.Name;
                Description = eqp.Description;
                Fields      = eqp.Fields;
                break;

            case Segments.EQU:
                EQU equ = new EQU();
                Name        = equ.Name;
                Description = equ.Description;
                Fields      = equ.Fields;
                break;

            case Segments.ERQ:
                ERQ erq = new ERQ();
                Name        = erq.Name;
                Description = erq.Description;
                Fields      = erq.Fields;
                break;

            case Segments.ERR:
                ERR err = new ERR();
                Name        = err.Name;
                Description = err.Description;
                Fields      = err.Fields;
                break;

            case Segments.EVN:
                EVN evn = new EVN();
                Name        = evn.Name;
                Description = evn.Description;
                Fields      = evn.Fields;
                break;

            case Segments.FAC:
                FAC fac = new FAC();
                Name        = fac.Name;
                Description = fac.Description;
                Fields      = fac.Fields;
                break;

            case Segments.FHS:
                FHS fhs = new FHS();
                Name        = fhs.Name;
                Description = fhs.Description;
                Fields      = fhs.Fields;
                break;

            case Segments.FT1:
                FT1 ft1 = new FT1();
                Name        = ft1.Name;
                Description = ft1.Description;
                Fields      = ft1.Fields;
                break;

            case Segments.FTS:
                FTS fts = new FTS();
                Name        = fts.Name;
                Description = fts.Description;
                Fields      = fts.Fields;
                break;

            case Segments.GOL:
                GOL gol = new GOL();
                Name        = gol.Name;
                Description = gol.Description;
                Fields      = gol.Fields;
                break;

            case Segments.GP1:
                GP1 gp1 = new GP1();
                Name        = gp1.Name;
                Description = gp1.Description;
                Fields      = gp1.Fields;
                break;

            case Segments.GP2:
                GP2 gp2 = new GP2();
                Name        = gp2.Name;
                Description = gp2.Description;
                Fields      = gp2.Fields;
                break;

            case Segments.GT1:
                GT1 gt1 = new GT1();
                Name        = gt1.Name;
                Description = gt1.Description;
                Fields      = gt1.Fields;
                break;

            case Segments.IAM:
                IAM iam = new IAM();
                Name        = iam.Name;
                Description = iam.Description;
                Fields      = iam.Fields;
                break;

            case Segments.IIM:
                IIM iim = new IIM();
                Name        = iim.Name;
                Description = iim.Description;
                Fields      = iim.Fields;
                break;

            case Segments.IN1:
                IN1 in1 = new IN1();
                Name        = in1.Name;
                Description = in1.Description;
                Fields      = in1.Fields;
                break;

            case Segments.IN2:
                IN2 in2 = new IN2();
                Name        = in2.Name;
                Description = in2.Description;
                Fields      = in2.Fields;
                break;

            case Segments.IN3:
                IN3 in3 = new IN3();
                Name        = in3.Name;
                Description = in3.Description;
                Fields      = in3.Fields;
                break;

            case Segments.INV:
                INV inv = new INV();
                Name        = inv.Name;
                Description = inv.Description;
                Fields      = inv.Fields;
                break;

            case Segments.IPC:
                IPC ipc = new IPC();
                Name        = ipc.Name;
                Description = ipc.Description;
                Fields      = ipc.Fields;
                break;

            case Segments.ISD:
                ISD isd = new ISD();
                Name        = isd.Name;
                Description = isd.Description;
                Fields      = isd.Fields;
                break;

            case Segments.LAN:
                LAN lan = new LAN();
                Name        = lan.Name;
                Description = lan.Description;
                Fields      = lan.Fields;
                break;

            case Segments.LCC:
                LCC lcc = new LCC();
                Name        = lcc.Name;
                Description = lcc.Description;
                Fields      = lcc.Fields;
                break;

            case Segments.LCH:
                LCH lch = new LCH();
                Name        = lch.Name;
                Description = lch.Description;
                Fields      = lch.Fields;
                break;

            case Segments.LDP:
                LDP ldp = new LDP();
                Name        = ldp.Name;
                Description = ldp.Description;
                Fields      = ldp.Fields;
                break;

            case Segments.LOC:
                LOC loc = new LOC();
                Name        = loc.Name;
                Description = loc.Description;
                Fields      = loc.Fields;
                break;

            case Segments.LRL:
                LRL lrl = new LRL();
                Name        = lrl.Name;
                Description = lrl.Description;
                Fields      = lrl.Fields;
                break;

            case Segments.MFA:
                MFA mfa = new MFA();
                Name        = mfa.Name;
                Description = mfa.Description;
                Fields      = mfa.Fields;
                break;

            case Segments.MFE:
                MFE mfe = new MFE();
                Name        = mfe.Name;
                Description = mfe.Description;
                Fields      = mfe.Fields;
                break;

            case Segments.MFI:
                MFI mfi = new MFI();
                Name        = mfi.Name;
                Description = mfi.Description;
                Fields      = mfi.Fields;
                break;

            case Segments.MRG:
                MRG mrg = new MRG();
                Name        = mrg.Name;
                Description = mrg.Description;
                Fields      = mrg.Fields;
                break;

            case Segments.MSA:
                MSA msa = new MSA();
                Name        = msa.Name;
                Description = msa.Description;
                Fields      = msa.Fields;
                break;

            case Segments.MSH:
                MSH msh = new MSH();
                Name        = msh.Name;
                Description = msh.Description;
                Fields      = msh.Fields;
                break;

            case Segments.NCK:
                NCK nck = new NCK();
                Name        = nck.Name;
                Description = nck.Description;
                Fields      = nck.Fields;
                break;

            case Segments.NDS:
                NDS nds = new NDS();
                Name        = nds.Name;
                Description = nds.Description;
                Fields      = nds.Fields;
                break;

            case Segments.NK1:
                NK1 nk1 = new NK1();
                Name        = nk1.Name;
                Description = nk1.Description;
                Fields      = nk1.Fields;
                break;

            case Segments.NPU:
                NPU npu = new NPU();
                Name        = npu.Name;
                Description = npu.Description;
                Fields      = npu.Fields;
                break;

            case Segments.NSC:
                NSC nsc = new NSC();
                Name        = nsc.Name;
                Description = nsc.Description;
                Fields      = nsc.Fields;
                break;

            case Segments.NST:
                NST nst = new NST();
                Name        = nst.Name;
                Description = nst.Description;
                Fields      = nst.Fields;
                break;

            case Segments.NTE:
                NTE nte = new NTE();
                Name        = nte.Name;
                Description = nte.Description;
                Fields      = nte.Fields;
                break;

            case Segments.OBR:
                OBR obr = new OBR();
                Name        = obr.Name;
                Description = obr.Description;
                Fields      = obr.Fields;
                break;

            case Segments.OBX:
                OBX obx = new OBX();
                Name        = obx.Name;
                Description = obx.Description;
                Fields      = obx.Fields;
                break;

            case Segments.ODS:
                ODS ods = new ODS();
                Name        = ods.Name;
                Description = ods.Description;
                Fields      = ods.Fields;
                break;

            case Segments.ODT:
                ODT odt = new ODT();
                Name        = odt.Name;
                Description = odt.Description;
                Fields      = odt.Fields;
                break;

            case Segments.OM1:
                OM1 om1 = new OM1();
                Name        = om1.Name;
                Description = om1.Description;
                Fields      = om1.Fields;
                break;

            case Segments.OM2:
                OM2 om2 = new OM2();
                Name        = om2.Name;
                Description = om2.Description;
                Fields      = om2.Fields;
                break;

            case Segments.OM3:
                OM3 om3 = new OM3();
                Name        = om3.Name;
                Description = om3.Description;
                Fields      = om3.Fields;
                break;

            case Segments.OM4:
                OM4 om4 = new OM4();
                Name        = om4.Name;
                Description = om4.Description;
                Fields      = om4.Fields;
                break;

            case Segments.OM5:
                OM5 om5 = new OM5();
                Name        = om5.Name;
                Description = om5.Description;
                Fields      = om5.Fields;
                break;

            case Segments.OM6:
                OM6 om6 = new OM6();
                Name        = om6.Name;
                Description = om6.Description;
                Fields      = om6.Fields;
                break;

            case Segments.OM7:
                OM7 om7 = new OM7();
                Name        = om7.Name;
                Description = om7.Description;
                Fields      = om7.Fields;
                break;

            case Segments.ORC:
                ORC orc = new ORC();
                Name        = orc.Name;
                Description = orc.Description;
                Fields      = orc.Fields;
                break;

            case Segments.ORG:
                ORG org = new ORG();
                Name        = org.Name;
                Description = org.Description;
                Fields      = org.Fields;
                break;

            case Segments.OVR:
                OVR ovr = new OVR();
                Name        = ovr.Name;
                Description = ovr.Description;
                Fields      = ovr.Fields;
                break;

            case Segments.PCR:
                PCR pcr = new PCR();
                Name        = pcr.Name;
                Description = pcr.Description;
                Fields      = pcr.Fields;
                break;

            case Segments.PD1:
                PD1 pd1 = new PD1();
                Name        = pd1.Name;
                Description = pd1.Description;
                Fields      = pd1.Fields;
                break;

            case Segments.PDA:
                PDA pda = new PDA();
                Name        = pda.Name;
                Description = pda.Description;
                Fields      = pda.Fields;
                break;

            case Segments.PDC:
                PDC pdc = new PDC();
                Name        = pdc.Name;
                Description = pdc.Description;
                Fields      = pdc.Fields;
                break;

            case Segments.PEO:
                PEO peo = new PEO();
                Name        = peo.Name;
                Description = peo.Description;
                Fields      = peo.Fields;
                break;

            case Segments.PES:
                PES pes = new PES();
                Name        = pes.Name;
                Description = pes.Description;
                Fields      = pes.Fields;
                break;

            case Segments.PID:
                PID pid = new PID();
                Name        = pid.Name;
                Description = pid.Description;
                Fields      = pid.Fields;
                break;

            case Segments.PR1:
                PR1 pr1 = new PR1();
                Name        = pr1.Name;
                Description = pr1.Description;
                Fields      = pr1.Fields;
                break;

            case Segments.PRA:
                PRA pra = new PRA();
                Name        = pra.Name;
                Description = pra.Description;
                Fields      = pra.Fields;
                break;

            case Segments.PRB:
                PRB prb = new PRB();
                Name        = prb.Name;
                Description = prb.Description;
                Fields      = prb.Fields;
                break;

            case Segments.PRC:
                PRC prc = new PRC();
                Name        = prc.Name;
                Description = prc.Description;
                Fields      = prc.Fields;
                break;

            case Segments.PRD:
                PRD prd = new PRD();
                Name        = prd.Name;
                Description = prd.Description;
                Fields      = prd.Fields;
                break;

            case Segments.PSH:
                PSH psh = new PSH();
                Name        = psh.Name;
                Description = psh.Description;
                Fields      = psh.Fields;
                break;

            case Segments.PTH:
                PTH pth = new PTH();
                Name        = pth.Name;
                Description = pth.Description;
                Fields      = pth.Fields;
                break;

            case Segments.PV1:
                PV1 pv1 = new PV1();
                Name        = pv1.Name;
                Description = pv1.Description;
                Fields      = pv1.Fields;
                break;

            case Segments.PV2:
                PV2 pv2 = new PV2();
                Name        = pv2.Name;
                Description = pv2.Description;
                Fields      = pv2.Fields;
                break;

            case Segments.QAK:
                QAK qak = new QAK();
                Name        = qak.Name;
                Description = qak.Description;
                Fields      = qak.Fields;
                break;

            case Segments.QID:
                QID qid = new QID();
                Name        = qid.Name;
                Description = qid.Description;
                Fields      = qid.Fields;
                break;

            case Segments.QPD:
                QPD qpd = new QPD();
                Name        = qpd.Name;
                Description = qpd.Description;
                Fields      = qpd.Fields;
                break;

            case Segments.QRD:
                QRD qrd = new QRD();
                Name        = qrd.Name;
                Description = qrd.Description;
                Fields      = qrd.Fields;
                break;

            case Segments.QRF:
                QRF qrf = new QRF();
                Name        = qrf.Name;
                Description = qrf.Description;
                Fields      = qrf.Fields;
                break;

            case Segments.QRI:
                QRI qri = new QRI();
                Name        = qri.Name;
                Description = qri.Description;
                Fields      = qri.Fields;
                break;

            case Segments.RCP:
                RCP rcp = new RCP();
                Name        = rcp.Name;
                Description = rcp.Description;
                Fields      = rcp.Fields;
                break;

            case Segments.RDF:
                RDF rdf = new RDF();
                Name        = rdf.Name;
                Description = rdf.Description;
                Fields      = rdf.Fields;
                break;

            case Segments.RF1:
                RF1 rf1 = new RF1();
                Name        = rf1.Name;
                Description = rf1.Description;
                Fields      = rf1.Fields;
                break;

            case Segments.RGS:
                RGS rgs = new RGS();
                Name        = rgs.Name;
                Description = rgs.Description;
                Fields      = rgs.Fields;
                break;

            case Segments.RMI:
                RMI rmi = new RMI();
                Name        = rmi.Name;
                Description = rmi.Description;
                Fields      = rmi.Fields;
                break;

            case Segments.ROL:
                ROL rol = new ROL();
                Name        = rol.Name;
                Description = rol.Description;
                Fields      = rol.Fields;
                break;

            case Segments.RQ1:
                RQ1 rq1 = new RQ1();
                Name        = rq1.Name;
                Description = rq1.Description;
                Fields      = rq1.Fields;
                break;

            case Segments.RQD:
                RQD rqd = new RQD();
                Name        = rqd.Name;
                Description = rqd.Description;
                Fields      = rqd.Fields;
                break;

            case Segments.RXA:
                RXA rxa = new RXA();
                Name        = rxa.Name;
                Description = rxa.Description;
                Fields      = rxa.Fields;
                break;

            case Segments.RXC:
                RXC rxc = new RXC();
                Name        = rxc.Name;
                Description = rxc.Description;
                Fields      = rxc.Fields;
                break;

            case Segments.RXD:
                RXD rxd = new RXD();
                Name        = rxd.Name;
                Description = rxd.Description;
                Fields      = rxd.Fields;
                break;

            case Segments.RXE:
                RXE rxe = new RXE();
                Name        = rxe.Name;
                Description = rxe.Description;
                Fields      = rxe.Fields;
                break;

            case Segments.RXG:
                RXG rxg = new RXG();
                Name        = rxg.Name;
                Description = rxg.Description;
                Fields      = rxg.Fields;
                break;

            case Segments.RXO:
                RXO rxo = new RXO();
                Name        = rxo.Name;
                Description = rxo.Description;
                Fields      = rxo.Fields;
                break;

            case Segments.RXR:
                RXR rxr = new RXR();
                Name        = rxr.Name;
                Description = rxr.Description;
                Fields      = rxr.Fields;
                break;

            case Segments.SAC:
                SAC sac = new SAC();
                Name        = sac.Name;
                Description = sac.Description;
                Fields      = sac.Fields;
                break;

            case Segments.SCH:
                SCH sch = new SCH();
                Name        = sch.Name;
                Description = sch.Description;
                Fields      = sch.Fields;
                break;

            case Segments.SFT:
                SFT sft = new SFT();
                Name        = sft.Name;
                Description = sft.Description;
                Fields      = sft.Fields;
                break;

            case Segments.SID:
                SID sid = new SID();
                Name        = sid.Name;
                Description = sid.Description;
                Fields      = sid.Fields;
                break;

            case Segments.SPM:
                SPM spm = new SPM();
                Name        = spm.Name;
                Description = spm.Description;
                Fields      = spm.Fields;
                break;

            case Segments.SPR:
                SPR spr = new SPR();
                Name        = spr.Name;
                Description = spr.Description;
                Fields      = spr.Fields;
                break;

            case Segments.STF:
                STF stf = new STF();
                Name        = stf.Name;
                Description = stf.Description;
                Fields      = stf.Fields;
                break;

            case Segments.TCC:
                TCC tcc = new TCC();
                Name        = tcc.Name;
                Description = tcc.Description;
                Fields      = tcc.Fields;
                break;

            case Segments.TCD:
                TCD tcd = new TCD();
                Name        = tcd.Name;
                Description = tcd.Description;
                Fields      = tcd.Fields;
                break;

            case Segments.TQ1:
                TQ1 tq1 = new TQ1();
                Name        = tq1.Name;
                Description = tq1.Description;
                Fields      = tq1.Fields;
                break;

            case Segments.TQ2:
                TQ2 tq2 = new TQ2();
                Name        = tq2.Name;
                Description = tq2.Description;
                Fields      = tq2.Fields;
                break;

            case Segments.TXA:
                TXA txa = new TXA();
                Name        = txa.Name;
                Description = txa.Description;
                Fields      = txa.Fields;
                break;

            case Segments.UB1:
                UB1 ub1 = new UB1();
                Name        = ub1.Name;
                Description = ub1.Description;
                Fields      = ub1.Fields;
                break;

            case Segments.UB2:
                UB2 ub2 = new UB2();
                Name        = ub2.Name;
                Description = ub2.Description;
                Fields      = ub2.Fields;
                break;

            case Segments.URD:
                URD urd = new URD();
                Name        = urd.Name;
                Description = urd.Description;
                Fields      = urd.Fields;
                break;

            case Segments.URS:
                URS urs = new URS();
                Name        = urs.Name;
                Description = urs.Description;
                Fields      = urs.Fields;
                break;

            case Segments.VAR:
                VAR var = new VAR();
                Name        = var.Name;
                Description = var.Description;
                Fields      = var.Fields;
                break;

            case Segments.VTQ:
                VTQ vtq = new VTQ();
                Name        = vtq.Name;
                Description = vtq.Description;
                Fields      = vtq.Fields;
                break;
            }
        }
Beispiel #29
0
 public string[] Encode(PES.GPSExpressEdition.MapService.Entity.LatLon[] latlons)
 {
     string xml = MapSearchService.Encode(latlons);
     return DataResolver.GetEncodeArray(xml);
 }