Example #1
0
        void printBSD(MyObject m, int PrintBoxNum, string msg)
        {
            //return;
            DataSet ds = GetDataSetWithSQLString(string.Format(sqlhelp.PrintBSD, m.dgv.Rows[0].Cells["IdentityDocumentsId"].Value.ToString(),
                                                                    OrBitUserId,
                                                                    pcName, PrintBoxNum));
            md.SetUIControlValue(richTextBox1, m.ed, msg, true);
            if (ds == null)
                return;
            if (ds.Tables[ds.Tables.Count - 1].Rows[0]["Return Value"].ToString() == "-1")
            {
                md.SetUIControlValue(richTextBox1, m.ed, ds.Tables[ds.Tables.Count - 1].Rows[0]["@I_ReturnMessage"].ToString(), false);
            }
            else
            {

                string FTPid = ds.Tables[0].Rows[0][0].ToString();
                string FtpDirectory = ds.Tables[0].Rows[0][1].ToString();
                ds.Tables.RemoveAt(0);
                ds.Tables.Remove(ds.Tables[ds.Tables.Count - 1]);
                if (pMRZ.DownloadFtp(m.ed.Filepath, FTPid + m.i, FTP.ftpDIR + "/" + FtpDirectory + "/" + FTPid, FTP.ftpip, FTP.ftpUNM, FTP.ftpPWD) == -2)
                    md.SetUIControlValue(richTextBox1, m.ed, "标签文件下载失败", true);
                else
                {
                    md.SetUIControlValue(richTextBox1, m.ed, pMRZ.printStimulsoftReports(FTPid + m.i, ds, false), true);
                    m.ed.BoxNum += PrintBoxNum;
                }

            }
        }
Example #2
0
        void T_Tic_StatCreateBSD(object sender, EventArgs e)
        {
            t.Stop();
            if (_EDlotsn2 != null)
            {
                List<MyObject> lmobj = new List<MyObject>();
                lmobj.Add(new MyObject());
                lmobj.Add(new MyObject());
                lmobj[0].dgv = dgvLotSN2;
                lmobj[0].ed = _EDlotsn2;
                lmobj[0].i = 1;
                lmobj[1].dgv = DGVLotSN1;
                lmobj[1].ed = _EDlotsn1;
                lmobj[0].i = 2;
                // StartThread(lmobj);
                th = new Thread(new ParameterizedThreadStart(StartThread));
                th.Start(lmobj);

            }
            else
            {
                MyObject mobj = new MyObject();
                mobj.ed = _EDlotsn1;
                mobj.dgv = DGVLotSN1;
                mobj.i = 0;
                List<MyObject> lmbj = new List<MyObject>();
                lmbj.Add(mobj);
                // StartThread(lmbj);
                th = new Thread(new ParameterizedThreadStart(StartThread));
                th.Start(lmbj);
            }
        }