Example #1
0
 public Sonluk.UI.Model.MES.TM_GLService.MES_TM_GL_SELECT SELECT(Sonluk.UI.Model.MES.TM_GLService.MES_TM_GL model, string ptoken)
 {
     return(base.Channel.SELECT(model, ptoken));
 }
Example #2
0
        private void ConfigUI(string tm)
        {
            ClearUI();
            CancleTextboxzswllot();
            CancleTextboxzswlbsk();
            MES_TM_TMINFO_SELECT_BY_UPDATEROLE_IN model = new MES_TM_TMINFO_SELECT_BY_UPDATEROLE_IN();

            model.STAFFID = Convert.ToInt32(getUserInfo("staffid"));
            model.TM      = tm;
            SELECT_MES_TM_TMINFO_BYTM res = ServicModel.TM_TMINFO.SELECT_BY_UPDATEROLE(model, getToken());

            if (res.MES_RETURN.TYPE.Equals("S"))
            {
                if (res.MES_TM_TMINFO_LIST.Length == 1)
                {
                    MES_SY_TYPEMXLIST zfsdnode = new MES_SY_TYPEMXLIST();
                    zfsdnode.ID        = 0;
                    zfsdnode.MXNAME    = q(Msg_Type.titlechoice);//"==请选择==";
                    MES_TM_TMINFO_LIST = res.MES_TM_TMINFO_LIST[0];
                    string gc = MES_TM_TMINFO_LIST.GC;
                    //MES_TM_TMINFO_LIST.MOULD
                    cpztcomboBox.DataSource    = GetDictionaryMX(9, gc);
                    cpztcomboBox.DisplayMember = "MXNAME";
                    cpztcomboBox.ValueMember   = "ID";

                    List <MES_SY_TYPEMXLIST> dcxhlist = GetDictionaryMX(6, gc).ToList();
                    dcxhlist.Insert(0, zfsdnode);
                    dcxhcomboBox.DataSource    = dcxhlist;
                    dcxhcomboBox.DisplayMember = "MXNAME";
                    dcxhcomboBox.ValueMember   = "ID";
                    int bcID = 5;
                    if (res.MES_TM_TMINFO_LIST[0].WLLBNAME.Equals("正极粉"))
                    {
                        bcID = 12;
                    }
                    List <MES_SY_TYPEMXLIST> bclist = GetDictionaryMX(bcID, gc).ToList();
                    bclist.Insert(0, zfsdnode);
                    bccomboBox.DataSource    = bclist;
                    bccomboBox.DisplayMember = "MXNAME";
                    bccomboBox.ValueMember   = "ID";


                    //scbzcomboBox.DataSource = GetDictionaryMX(12);
                    //scbzcomboBox.DisplayMember = "MXNAME";
                    //scbzcomboBox.ValueMember = "ID";

                    List <MES_SY_TYPEMXLIST> dcdjlist = GetDictionaryMX(7, gc).ToList();
                    dcdjlist.Insert(0, zfsdnode);
                    dcdjcomboBox.DataSource    = dcdjlist;
                    dcdjcomboBox.DisplayMember = "MXNAME";
                    dcdjcomboBox.ValueMember   = "ID";

                    List <MES_SY_TYPEMXLIST> sbcdlist = GetDictionaryMX(15, gc).ToList();
                    sbcdlist.Insert(0, zfsdnode);
                    sbcdcomboBox.DataSource    = sbcdlist;
                    sbcdcomboBox.DisplayMember = "MXNAME";
                    sbcdcomboBox.ValueMember   = "ID";

                    List <MES_SY_TYPEMXLIST> zfsdlist = GetDictionaryMX(17, gc).ToList();
                    zfsdlist.Insert(0, zfsdnode);
                    zflbcomboBox.DataSource    = zfsdlist;
                    zflbcomboBox.DisplayMember = "MXNAME";
                    zflbcomboBox.ValueMember   = "ID";

                    List <MES_SY_TYPEMXLIST> hdgxlist = GetDictionaryMX(19, gc).ToList();
                    hdgxlist.Insert(0, zfsdnode);
                    hgxcomboBox.DisplayMember = "MXNAME";
                    hgxcomboBox.ValueMember   = "ID";
                    hgxcomboBox.DataSource    = hdgxlist;

                    List <MES_SY_TYPEMXLIST> yslist = GetDictionaryMX(33, gc).ToList();
                    yslist.Insert(0, zfsdnode);
                    yscomboBox.DisplayMember = "MXNAME";
                    yscomboBox.ValueMember   = "ID";
                    yscomboBox.DataSource    = yslist;

                    List <MES_SY_TYPEMXLIST> cptypelist = GetDictionaryMX(32, gc).ToList();
                    cptypelist.Insert(0, zfsdnode);
                    cptypecomboBox.DisplayMember = "MXNAME";
                    cptypecomboBox.ValueMember   = "ID";
                    cptypecomboBox.DataSource    = cptypelist;


                    tmtextBox1.Text            = MES_TM_TMINFO_LIST.TM;
                    wlhtextBox2.Text           = MES_TM_TMINFO_LIST.WLH;
                    wllbtextBox.Text           = MES_TM_TMINFO_LIST.WLLBNAME;
                    wlmstextBox.Text           = MES_TM_TMINFO_LIST.WLMS;
                    dcxhcomboBox.SelectedValue = MES_TM_TMINFO_LIST.DCXH;
                    dcdjcomboBox.SelectedValue = MES_TM_TMINFO_LIST.DCDJ;
                    kssjtextBox.Text           = MES_TM_TMINFO_LIST.KSTIME;
                    jssjtextBox.Text           = MES_TM_TMINFO_LIST.JSTIME;
                    cpztcomboBox.SelectedValue = MES_TM_TMINFO_LIST.CPZT;
                    //bztextBox.Text = MES_TM_TMINFO_LIST.REMARK;
                    bzrichTextBox1.Text          = MES_TM_TMINFO_LIST.REMARK;
                    xsddtextBox.Text             = MES_TM_TMINFO_LIST.NOBILL;
                    xsxmtextBox.Text             = MES_TM_TMINFO_LIST.NOBILLMX;
                    gyspctextBox.Text            = MES_TM_TMINFO_LIST.GYSPC;
                    thtextBox.Text               = MES_TM_TMINFO_LIST.TH.ToString();
                    pctextBox.Text               = MES_TM_TMINFO_LIST.PC;
                    clpbtextBox.Text             = MES_TM_TMINFO_LIST.CLPBDM;
                    zflbcomboBox.SelectedValue   = MES_TM_TMINFO_LIST.ZFDCLB;
                    cptypecomboBox.SelectedValue = MES_TM_TMINFO_LIST.CPTYPE;
                    bccomboBox.SelectedValue     = MES_TM_TMINFO_LIST.BC;
                    if (MES_TM_TMINFO_LIST.DCSLYS != 0)
                    {
                        wstextBox1.Text = MES_TM_TMINFO_LIST.DCSLYS.ToString();
                    }
                    if (MES_TM_TMINFO_LIST.DCSLMBSL != 0)
                    {
                        mbsltextBox2.Text = MES_TM_TMINFO_LIST.DCSLMBSL.ToString();
                    }
                    if (MES_TM_TMINFO_LIST.DCSLBS != 0)
                    {
                        bstextBox3.Text = MES_TM_TMINFO_LIST.DCSLBS.ToString();
                    }
                    hgxcomboBox.SelectedValue  = MES_TM_TMINFO_LIST.XDGX;
                    bbpmtextBox.Text           = MES_TM_TMINFO_LIST.RQM;
                    scdatetextBox.Text         = MES_TM_TMINFO_LIST.SCDATE;
                    sbcdcomboBox.SelectedValue = MES_TM_TMINFO_LIST.SBCD;
                    sltextBox.Text             = MES_TM_TMINFO_LIST.SL.ToString();
                    //ystextBox.Text = MES_TM_TMINFO_LIST.MFQCOLORNAME;
                    yscomboBox.SelectedValue = MES_TM_TMINFO_LIST.MFQCOLOR;
                    wqhtextBox.Text          = MES_TM_TMINFO_LIST.WQH;
                    if (MES_TM_TMINFO_LIST.TMSX == 622)// zswlbsk = 622  物料标识卡
                    {
                        ReadOnlyTextboxzswlbsk();
                    }
                    else if (MES_TM_TMINFO_LIST.TMSX == 621)//zswllot = 621, 物料lot表
                    {
                        sltextBox.ReadOnly     = true;
                        bccomboBox.Enabled     = false;
                        scdatetextBox.ReadOnly = true;
                        Sonluk.UI.Model.MES.TM_GLService.MES_TM_GL glmodel = new Sonluk.UI.Model.MES.TM_GLService.MES_TM_GL();
                        glmodel.LB   = 1;
                        glmodel.XCTM = MES_TM_TMINFO_LIST.TM;
                        Sonluk.UI.Model.MES.TM_GLService.MES_TM_GL_SELECT glres = ServicModel.TM_GL.SELECT(glmodel, getToken());
                        if (glres.MES_RETURN.TYPE.Equals("S"))
                        {
                            if (glres.MES_TM_GL.Length > 0)
                            {
                                if (glres.MES_TM_GL[0].SCTMRESDUESL > 0)
                                {
                                    ReadOnlyTextboxzswllot();
                                }
                                else
                                {
                                }
                            }
                            else
                            {
                                cptypecomboBox.Enabled = true;
                            }
                        }
                        else
                        {
                            ShowMeg(glres.MES_RETURN.MESSAGE);
                        }
                    }
                }
                else
                {
                    //ShowMeg("条码数据异常");
                    ShowMeg(q(Msg_Type.msgtmexcept));
                }
            }
            else
            {
                ShowMeg(res.MES_RETURN.MESSAGE);
            }
            smtextBox.Clear();
        }