Beispiel #1
0
 /// <summary>
 /// Khới động Process
 /// </summary>
 public override void Start()
 {
     try
     {
         using (var ctrlSA = new SAController(session))
         {
             ctrlSA.CreateUserSession(out session, "huyvq", "1");
         }
     }
     catch (Exception ex)
     {
     }
     try
     {
         InitializeProcess();
         ProcessThread = new Thread(Run);
         ProcessThread.Start();
     }
     catch (Exception ex)
     {
         WriteError(ex);
         new Thread(delegate()
         {
             Thread.Sleep(2000);
             SetProcessState(ProcessState.Stopped);
         }).Start();
     }
 }
Beispiel #2
0
        /// <summary>
        /// Nhân Process
        /// </summary>
        public void Run()
        {
            DataContainer container = null;
            List <string> value     = new List <string>();

            try
            {
                using (var ctrlSA = new SAController(session))
                {
                    ctrlSA.ExecuteProcedureFillDataset(out container, "sp_list_defribbon", value);
                }
            }
            catch (ThreadAbortException)
            {
            }
            finally
            {
                WriteInfo("Đã kết thúc đọc dữ liệu");
                SetProcessState(ProcessState.Stopped);
            }
        }