Exemplo n.º 1
0
        public void TestDeleteHaveUploadedLocalTempData()
        {
            var iDbSrv = new DtService36(_dataSource, _dataBaseName, _userId, _pwd);

            iDbSrv.RigisterBakupDataTable(GetConStr(), "[BMS36].[dbo].[BI_Data_Summary]",
                                          "[BMS36].[dbo].[Remote_BI_Data_Summary]");
            for (var i = 0; i < 2; i++)
            {
                var sn    = $"TEST000{i}";
                var entry = new List <KeyValuePair <string, string> >
                {
                    new KeyValuePair <string, string>("Station", Environment.MachineName),
                    new KeyValuePair <string, string>("SN", sn),
                    new KeyValuePair <string, string>("Plan", "A"),
                    new KeyValuePair <string, string>("Board", "A"),
                    new KeyValuePair <string, string>("Floor", "1"),
                    new KeyValuePair <string, string>("Seat", "1"),
                    new KeyValuePair <string, string>("Create_Time", "1"),
                    new KeyValuePair <string, string>("Load_Time", "1"),
                    new KeyValuePair <string, string>("Cost", "1"),
                    new KeyValuePair <string, string>("Result", "1"),
                    new KeyValuePair <string, string>("Comment", "1"),
                    new KeyValuePair <string, string>("Data_Set_ID", "1")
                };
                var id = iDbSrv.ApplyDataSetId(sn);
                iDbSrv.InsertData(id, "START", entry);
                iDbSrv.InsertData(id, "END", entry);
            }

            iDbSrv.BakupData();
            iDbSrv.DeleteLocalHaveUploadedTempData("[BMS36].[dbo].[BI_Data_Summary]");
        }
Exemplo n.º 2
0
        private BoardUnit GetBoardUnit()
        {
            ILog        log        = MockIlog();
            DtService36 db         = new DtService36(@"Data Source=shg-l80005754\SQLEXPRESS;Initial Catalog=BMS36;Persist Security Info=True;User ID=sa;Password=cml@shg629;Pooling=False");
            FetchPlans  fetchplans = FetchPlans.Inst("");

            fetchplans.FetchPlansList(db);
            Dictionary <string, string> ports = new Dictionary <string, string>();

            ports["OvenPort"] = "COM1";
            ports["Floor1"]   = "COM1";
            ports["Floor2"]   = "COM2";
            ports["Floor3"]   = "COM3";
            ports["Floor4"]   = "COM4";
            ports["Floor5"]   = "COM5";
            ports["Floor6"]   = "COM6";
            ports["Floor7"]   = "COM7";
            ports["Floor8"]   = "COM8";
            ports["Floor9"]   = "COM9";
            ports["Floor10"]  = "COM10";
            BoardFactory factroy = new BoardFactory(log, fetchplans, ports);
            SystemParams param   = new SystemParams();
            BoardUnit    unit    = new BoardUnit(log, db, param);

            return(unit);
        }
Exemplo n.º 3
0
        public void Test_CreateDatabase()
        {
            IDataService iDbSrv = new DtService36(this._dataSource, this._dataBaseName, this._userId, this._pwd);
            string       msg;
            bool         res = iDbSrv.CreateDataBase(_dataSource, _userId, _pwd, "BMS361.sql", out msg);

            Assert.AreEqual(res, true);
        }
Exemplo n.º 4
0
        public void Test_UpdateMapScheme()
        {
            IDataService iDbSrv = new DtService36(this._dataSource, this._dataBaseName, this._userId, this._pwd);

            iDbSrv.UpdateMapScheme("1", "{1}");
        }
Exemplo n.º 5
0
        public void Test_DeleteMapScheme()
        {
            IDataService iDbSrv = new DtService36(this._dataSource, this._dataBaseName, this._userId, this._pwd);

            iDbSrv.DeleteMapScheme("2");
        }
Exemplo n.º 6
0
 public void Test_InsertMapScheme()
 {
     IDataService iDbSrv = new DtService36(this._dataSource, this._dataBaseName, this._userId, this._pwd);
     //iDbSrv.InsertMapScheme("2","{}");
     //iDbSrv.InsertMapScheme("3", "{}");
 }
Exemplo n.º 7
0
        public void Test_GetMapScheme()
        {
            IDataService iDbSrv = new DtService36(this._dataSource, this._dataBaseName, this._userId, this._pwd);

            iDbSrv.GetMapScheme("VBMS_POS_MAP");
        }
Exemplo n.º 8
0
        public void Test_GetMapSchemeName()
        {
            IDataService iDbSrv = new DtService36(this._dataSource, this._dataBaseName, this._userId, this._pwd);

            string[] res = iDbSrv.GetMapSchemsName();
        }
Exemplo n.º 9
0
        public void Test_CreateDataService()
        {
            IDataService iDbSrv = new DtService36(this._dataSource, this._dataBaseName, this._userId, this._pwd);

            Assert.AreNotEqual(iDbSrv, null);
        }