예제 #1
0
 public BatchDataImport()
 {
     flag           = 0;
     m_proxyWater   = new CSQLWater();
     m_proxyRain    = new CSQLRain();
     m_proxyStation = new CSQLStation();
 }
예제 #2
0
        private IStationProxy m_proxyStation; //数据库接口对象
        //public Form2 f2;
        public Form1()
        {
            m_proxyStation = CDBDataMgr.Instance.GetStationProxy();
            InitializeComponent();

            //CEntityStation entity = new CEntityStation();
            //entity.StationID = "6018";
            //entity.GPRS = "60006018";
            //CPortDataMgr.Instance.SendHex(entity);
        }
예제 #3
0
 public CSoilStationMgrForm()
 {
     try
     {
         m_listImport       = new List <CEntitySoilStation>();
         m_proxyStation     = CDBDataMgr.Instance.GetStationProxy();
         m_proxySoilStation = CDBSoilDataMgr.Instance.GetSoilStationProxy();
         InitializeComponent();
         InitUI();
         InitDataSource();
         CreateMsgBinding();
     }
     catch (Exception e) { }
 }
예제 #4
0
        public CSoilStationMgrForm()
        {
            try
            {
                m_listImport       = new List <CEntitySoilStation>();
                m_proxyStation     = CDBDataMgr.Instance.GetStationProxy();
                m_proxySoilStation = CDBSoilDataMgr.Instance.GetSoilStationProxy();
                InitializeComponent();
                InitUI();
                InitDataSource();
                CreateMsgBinding();
            }
#pragma warning disable CS0168 // 声明了变量“e”,但从未使用过
            catch (Exception e) { }
#pragma warning restore CS0168 // 声明了变量“e”,但从未使用过
        }
예제 #5
0
        /// <summary>
        /// 构造方法 初始化成员变量
        /// </summary>
        public Channle2Data()
        {
            m_proxyStation      = new CSQLStation();
            m_proxySoliStation  = new CSQLSoilStation();
            m_listStations      = new List <CEntityStation>();
            m_listSoillStations = new List <CEntitySoilStation>();
            stationGprsMap      = new CDictionary <string, string>();
            stationGsmMap       = new CDictionary <string, string>();
            stationBeidouMap    = new CDictionary <string, string>();

            hexGprsMap   = new CDictionary <string, string>();
            hexGsmMap    = new CDictionary <string, string>();
            hexBeidouMap = new CDictionary <string, string>();

            dataProtocol = "";
            HexOrASCII   = "";
            //初始话站点信息没有更新
            isUpdated = false;

            //初始化站点map
            this.initStations();
        }
 /// <summary>
 /// 初始化数据源,连接数据库
 /// </summary>
 /// <param name="proxy"></param>
 public void InitDataSource(ISoilStationProxy proxy)
 {
     m_proxyStation     = CDBDataMgr.GetInstance().GetStationProxy();
     m_proxySoilStation = proxy;
     m_listSubCenter    = CDBDataMgr.GetInstance().GetAllSubCenter();
 }