Пример #1
0
        private void btn_Click(object sender, EventArgs e)
        {
            Button btn   = (Button)sender;
            int    index = Convert.ToInt32(btn.Tag) % 100; //任务清单 = 10   打印lot = 11

            int row    = Convert.ToInt32(btn.Tag) / 100;   //数组第几个元素
            int indexL = IndexList[row];

            if (indexL == -1)
            {
                indexL = 0;
            }
            MES_PD_SCRW_LIST model = Fjcclist[row].RwArr.MES_PD_SCRW_LIST[indexL];

            if (index == 11)
            {
                if (model.ISACTION == 0)
                {
                    ShowMeg(q(Msg_Type.titlewaitingfortl));//"投料还没完成请耐心等待"
                    return;
                }
                timer1.Stop();
                frmFJprint form = new frmFJprint(model);
                show(form);
                RefreshZn();
                //configUI(Sbhlist);
                timer1.Start();
                //configUI(Sbhlist);
                //this.Refresh();
            }
            else if (index == 10)
            {
                string      sbhh    = model.SBBH;
                string      sbh     = model.SBH;
                MES_PD_SCRW rwmodel = new MES_PD_SCRW();
                rwmodel.SBBH = sbhh;
                rwmodel.GC   = model.GC;//getGC("value");
                //model.GZZXBH = getUserInfo("gzzxvalue");
                rwmodel.ZPRQ = GetSystemDate(Date_Type.hour, -4, "yyyy-MM-dd");
                SELECT_MES_PD_SCRW res = ServicModel.PD_SCRW.SELECT(rwmodel, getToken());



                if (res.MES_RETURN.TYPE.Equals("S"))
                {
                    timer1.Stop();
                    frmSelectRWList_N form = new frmSelectRWList_N(res.MES_PD_SCRW_LIST, sbh);
                    show(form);
                    timer1.Start();
                }
                else
                {
                    //MessageBox.Show(res.MES_RETURN.MESSAGE, "消息框");
                    ShowMeg(res.MES_RETURN.MESSAGE);
                }
            }
        }
Пример #2
0
 private void ListdataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex != -1)
     {
         if (this.ListdataGridView.CurrentCell.OwningColumn.Name == "btn")
         {
             int index = ListdataGridView.CurrentRow.Index;
             if (DataArr[index].ISACTION == 2)
             {
                 frmFJprint form = new frmFJprint(DataArr[index]);
                 show(form);
             }
             else
             {
                 //ShowMeg("只有完成投料的才能进行多次打印");
                 ShowMeg(q(Msg_Type.msgtimesprintbxwctl));
             }
         }
     }
 }
Пример #3
0
        private void btn_Click(object sender, EventArgs e)
        {
            Button           btn   = (Button)sender;
            int              index = Convert.ToInt32(btn.Tag) % 10; //任务清单 = 1   打印lot = 2
            int              row   = Convert.ToInt32(btn.Tag) / 10; //数组第几个元素
            MES_PD_SCRW_LIST model = Fjcclist[row].RwArr.MES_PD_SCRW_LIST[IndexList[row]];

            if (index == 2)
            {
                if (model.ISACTION == 0)
                {
                    ShowMeg("投料还没完成请耐心等待");
                    return;
                }
                timer1.Stop();
                frmFJprint form = new frmFJprint(model);
                show(form);
                //configUI(Sbhlist);
                timer1.Start();
                //configUI(Sbhlist);
                //this.Refresh();
            }
            else if (index == 1)
            {
                string             sbhh = model.SBBH;
                string             sbh  = model.SBH;
                SELECT_MES_PD_SCRW res  = GetRWbySBBH(sbhh);
                if (res.MES_RETURN.TYPE.Equals("S"))
                {
                    timer1.Stop();
                    frmSelectRWList form = new frmSelectRWList(res.MES_PD_SCRW_LIST, sbh);
                    show(form);
                    timer1.Start();
                }
                else
                {
                    MessageBox.Show(res.MES_RETURN.MESSAGE, "消息框");
                }
            }
        }