Пример #1
0
        private void toolStripSearch_ButtonClick(object sender, EventArgs e)
        {
            SearchSerialBox box = new SearchSerialBox(SearchSerialBox.SEARCH_MODE.SERNUM);
            box.mskSearchKey.Text = this.find_sernum;
            if (box.ShowDialog() == DialogResult.OK)
            {
                #region keep spy_log (no need response)
                string json_data = "{\"users_name\":\"" + this.G.loged_in_user_name + "\",";
                json_data += "\"sernum\":\"" + box.mskSearchKey.Text.cleanString() + "\",";
                json_data += "\"compnam\":\"\"}";
                CRUDResult post = ApiActions.POST(PreferenceForm.API_MAIN_URL() + "spylog/create", json_data);
                #endregion keep spy_log (no need response)

                this.find_sernum = box.mskSearchKey.Text;
                this.find_type = FIND_TYPE.SERNUM;
                this.FormProcessing();
                BackgroundWorker workerSearch = new BackgroundWorker();
                workerSearch.DoWork += new DoWorkEventHandler(this.workerSearch_DoWork);
                workerSearch.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.workerSearch_Complete);
                workerSearch.RunWorkerAsync();
            }
        }
Пример #2
0
 private void searchOldSerialToolStripMenuItem_Click(object sender, EventArgs e)
 {
     SearchSerialBox box = new SearchSerialBox(SearchSerialBox.SEARCH_MODE.OLDNUM);
     box.mskSearchKey.Text = this.find_oldnum;
     if (box.ShowDialog() == DialogResult.OK)
     {
         this.find_oldnum = box.mskSearchKey.Text;
         this.find_type = FIND_TYPE.OLDNUM;
         this.FormProcessing();
         BackgroundWorker workerSearch = new BackgroundWorker();
         workerSearch.DoWork += new DoWorkEventHandler(this.workerSearch_DoWork);
         workerSearch.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.workerSearch_Complete);
         workerSearch.RunWorkerAsync();
     }
 }