Esempio n. 1
0
 private void print5in1label_Load(object sender, EventArgs e)
 {
     SetPortProperty();
     try
     {
         #region 添加应用程序
         if (this.ShowMP.gUserInfo.rolecaption == "系统开发员")
         {
             List <WebServices.tUserInfo.tFunctionList> lsfunls = new List <WebServices.tUserInfo.tFunctionList>();
             FrmBLL.publicfuntion.GetFromCtls(this, ref lsfunls);
             FrmBLL.publicfuntion.AddProgInfo(new WebServices.tUserInfo.tProgInfo()
             {
                 progid   = this.Name,
                 progname = this.Text,
                 progdesc = this.Text
             }, lsfunls);
         }
         #endregion
         if (!Directory.Exists(System.IO.Directory.GetCurrentDirectory() + @"\Print"))
         {
             Directory.CreateDirectory(System.IO.Directory.GetCurrentDirectory() + @"\Print");
         }
         labelfilepatch.Text = System.IO.Directory.GetCurrentDirectory() + "\\Print\\FEIXUN_LOT.lab";
         dpl          = new delegateopenlabel(eventopenlablefile);
         iasyncresult = dpl.BeginInvoke(labelfilepatch.Text, null, null);
         edt_Scan_Data.Select();
         dlQueryLocId = new delegateQueryLocId(QueryStorehouse);
         dlQueryLocId.BeginInvoke(null, null);
     }
     catch (Exception ex)
     {
         this.ShowMP.ShowPrgMsg(ex.Message, MainParent.MsgType.Error);
     }
 }
Esempio n. 2
0
        private void print5in1label_Load(object sender, EventArgs e)
        {
            try
            {
                if (!Directory.Exists(System.IO.Directory.GetCurrentDirectory() + @"\Print"))
                {
                    Directory.CreateDirectory(System.IO.Directory.GetCurrentDirectory() + @"\Print");
                }
                labelfilepatch.Text = System.IO.Directory.GetCurrentDirectory() + "\\Print\\FEIXUN_LOT.lab";
                dpl          = new delegateopenlabel(eventopenlablefile);
                iasyncresult = dpl.BeginInvoke(labelfilepatch.Text, null, null);
                edt_Scan_Data.Select();
                dlQueryLocId = new delegateQueryLocId(QueryStorehouse);
                dlQueryLocId.BeginInvoke(null, null);

                this.edt_pn.Text  = partnumber;
                this.edt_vc.Text  = vendercode;
                this.edt_qty.Text = qty;
                this.edt_vc.Items.Add(vendercode);
                this.lb_kpdesc.Text   = kpdesc;
                this.labshowvc.Text   = "[厂商名:] " + vendercode;
                this.labshowdesc.Text = "[厂商名:] " + vendername;
                flag            = false;
                lb_restqty.Text = qty;
            }
            catch (Exception ex)
            {
                this.ShowMP.ShowPrgMsg(ex.Message, MainParent.MsgType.Error);
            }
        }