Exemplo n.º 1
0
        public Station(hydlstation raw)
        {
            stationName = raw.CName;
            stationId   = Int32.Parse(raw.StationID);
            subCenter   = raw.SubCenter;
            switch (Int32.Parse(raw.CType))
            {
            case (int)StationTypes.rainStation: stationType = StationTypes.rainStation; break;

            case (int)StationTypes.waterStation: stationType = StationTypes.waterStation; break;

            case (int)StationTypes.hydroStation: stationType = StationTypes.hydroStation; break;

            default: stationType = StationTypes.unknownStation; break;
            }
        }
Exemplo n.º 2
0
        public HydroStation(hydlstation raw)
        {
            Maintain mt = new Maintain();

            StationID   = raw.StationID;
            SubCenterID = raw.SubCenterID;
            //SubCenterName = SubCenterService.GetSubcenterName(SubCenterID);
            SubCenterName = "";
            if (SubcenterInfoHelper.subCenterInfoList == null || SubcenterInfoHelper.subCenterInfoList.Count == 0)
            {
                SubcenterInfoHelper.getSubCenterInfoList();
            }
            if (SubcenterInfoHelper.subCenterInfoList != null && SubcenterInfoHelper.subCenterInfoList.Count > 0)
            {
                SubCenterName = SubcenterInfoHelper.subcenterInfoDic[SubCenterID];
            }
            if (SubCenterName.Length == 0)
            {
                SubCenterName = DAL.SubCenterService.GetSubcenterName(raw.SubCenterID);
            }
            if (SubCenterName.Length == 0)
            {
                SubCenterName = "未知分中心";
            }
            CName = raw.CName;

            switch (Int32.Parse(raw.CType))
            {
            case (int)StationTypes.rainStation: CType = StationTypes.rainStation; break;

            case (int)StationTypes.waterStation: CType = StationTypes.waterStation; break;

            case (int)StationTypes.hydroStation: CType = StationTypes.hydroStation; break;

            case (int)StationTypes.soilStation: CType = StationTypes.soilStation; break;

            case (int)StationTypes.gqStation: CType = StationTypes.gqStation; break;

            case (int)StationTypes.hdStation: CType = StationTypes.hdStation; break;

            case (int)StationTypes.hpStation: CType = StationTypes.hpStation; break;

            case (int)StationTypes.hzStation: CType = StationTypes.hzStation; break;

            default: CType = StationTypes.unknownStation; break;
            }

            WBase          = raw.WBase;
            WMax           = raw.WMax;
            WMin           = raw.WMin;
            WChange        = raw.WChange;
            RAccuracy      = raw.RAccuracy;
            RChange        = raw.RChange;
            Gsm            = raw.Gsm;
            Gprs           = raw.Gprs;
            BDStatellite   = raw.BDSatellite;
            BDmember       = raw.BDmember;
            VoltageMin     = raw.VoltageMin;
            maintran       = raw.maintran;
            subtran        = raw.subtran;
            dataprotocol   = raw.dataprotocol;
            watersensor    = raw.watersensor;
            rainsensor     = raw.rainsensor;
            reportinterval = raw.reportinterval;
        }