Exemple #1
0
        private void getRwAndJLinfoByTm()
        {
            MES_PD_SCRW_SELECT_BY_TM model = new MES_PD_SCRW_SELECT_BY_TM();

            model.SBBH = SBHID;
            model.TM   = SMtextBox.Text.Trim().ToUpper();
            model.ZPRQ = Convert.ToDateTime(ServicModel.PUBLIC_FUNC.GET_TIME(getToken())).AddHours(-4).ToString("yyyy-MM-dd");
            SELECT_MES_PD_SCRW res = ServicModel.PD_SCRW.SELECT_BY_TM(model, getToken());

            if (res.MES_RETURN.TYPE.Equals("S"))
            {
                if (res.MES_PD_SCRW_LIST.Length == 1)
                {
                    RefreshRW(res.MES_PD_SCRW_LIST[0], SBHID);
                    SMtextBox.Text = model.TM;
                    getReportInfoByTm();

                    //BOMdataGridView.ClearSelection();
                }
                else if (res.MES_PD_SCRW_LIST.Length > 1)
                {
                    SMtextBox.Clear();
                    frmChange_GD form = new frmChange_GD(res.MES_PD_SCRW_LIST, model.SBBH, RigthType);
                    form.block = RefreshRW;
                    show(form);
                    //for (int i = 0; i < BOMdataGridView.Rows.Count; i++)
                    //{
                    //    BOMdataGridView.Rows[i].Cells["状态"].Style.BackColor = Color.Red;

                    //}
                    //BOMdataGridView.ClearSelection();
                    //Tmlist = new List<TMDataGrid>();
                    //LSdataGridView.DataSource = Tmlist;
                    //LSdataGridView.Columns["删除"].DisplayIndex = 4;

                    //SMtextBox.Select();
                    SMtextBox.Text = model.TM;
                    getReportInfoByTm();
                }
                else if (res.MES_PD_SCRW_LIST.Length == 0)
                {
                    //ShowMeg("找不到条码" + SMtextBox.Text.Trim() + "对应的任务信息");
                    ShowMeg(string.Format(q(Msg_Type.msgtmnorw), SMtextBox.Text.Trim()));
                }
                else
                {
                    //ShowMeg("数据异常,请联系管理员");
                    ShowMeg(q(Msg_Type.msgtmexcept));
                }
                SMtextBox.Select();
            }
            else
            {
                ShowMeg(res.MES_RETURN.MESSAGE);
                BomList = new ZBCFUN_GDJGXX_READ();
                BOMdataGridView.DataSource = new List <BomDataGrid>();
                SMtextBox.Clear();
                SMtextBox.Select();
            }
        }
Exemple #2
0
 public SELECT_MES_PD_SCRW SELECT_BY_TM(MES_PD_SCRW_SELECT_BY_TM model, string ptoken)
 {
     return(client.SELECT_BY_TM(model, ptoken));
 }