예제 #1
0
    protected void btnEnter_Click(object sender, EventArgs e)
    {
        string originalLot = "";
        //判断是否是UV成型的条码
        string check = CRUD.CheckFilmLabel("UV成型", txtLot.Text);

        if (check != "fail")
        {
            originalLot = check;
        }
        else
        {
            originalLot = txtLot.Text;
        }
        ViewState["originalLot"] = originalLot;
        //查询是否可以过站
        string result = CRUD.QueryStationOfLot(lblWorksiteID.Text, originalLot);

        if (result != "success")
        {
            JScript.Alert(result, this);
            txtLot.Text = "";
            return;
        }
        DataTable lotDt    = CRUD.GetLotBasisInfo(originalLot);
        string    workshop = lotDt.Rows[0]["workshopID"].ToString();

        //膜等级
        //txtFilmLevel.Text = lotDt.Rows[0]["mouldlevel"].ToString();
        setddl(workshop);

        string WO = lotDt.Rows[0]["workorder"].ToString();

        //显示批次长宽信息
        txtPreWidth.Text = lotDt.Rows[0]["mouldwidth"].ToString();
        //txtPreLength.Text = lotDt.Rows[0]["mouldlength"].ToString();
        //=======================前站长度显示改为有效长度 modify by lei.xue on 2017-6-12=================================================
        txtPreLength.Text = lotDt.Rows[0]["validlength"].ToString();
        txtLevel.Text     = lotDt.Rows[0]["filmlevel"].ToString();
        //======================标签宽度改为取有效宽幅 modify by lei.xue on 2017-5-22========================================
        txtValidWidth.Text = lotDt.Rows[0]["validwidth"].ToString();

        //显示工单信息
        SetWOinfo(WO);

        //显示打印标签时间
        string[] LabelTime = FilmCRUD.GetLabelTime(txtLot.Text);
        txtSubsectionDate.Text = LabelTime[0];
        txtPasteFilmDate.Text  = LabelTime[1];
        txtUVCompleteDate.Text = LabelTime[2];


        CRUD.setLabelProcess(lblLotprocess, lblCurrnentWorksite, lblEndProcess, ViewState["originalLot"].ToString(), lblWorksiteID.Text);
    }
예제 #2
0
    private void CheckPackage()
    {
        string originalLot = "";
        //判断是否是UV成型的条码
        string check = CRUD.CheckFilmLabel("UV成型", txtLot.Text);

        if (check != "fail")
        {
            originalLot = check;
        }
        else
        {
            originalLot = txtLot.Text;
        }
        ViewState["originalLot"] = originalLot;

        DataTable lotDt = CRUD.GetLotBasisInfo(originalLot);

        if (lotDt.Rows.Count == 0)
        {
            JScript.Alert("未找到条码信息", this);
            return;
        }
        string isPackage = lotDt.Rows[0]["package"].ToString();

        if (isPackage != "Y")
        {
            JScript.Alert("批次未包装", this);
            return;
        }
        string workshop = lotDt.Rows[0]["workshopID"].ToString();
        //膜等级
        //txtFilmLevel.Text = lotDt.Rows[0]["mouldlevel"].ToString();
        //setddl(workshop);

        string WO = lotDt.Rows[0]["workorder"].ToString();

        //显示批次长宽信息
        txtPreWidth.Text = lotDt.Rows[0]["mouldwidth"].ToString();
        //前站长度改为有效长度 modify by lei.xue on 2017-10-19
        //txtPreLength.Text = lotDt.Rows[0]["mouldlength"].ToString();
        txtPreLength.Text = lotDt.Rows[0]["validlength"].ToString();
        txtLevel.Text     = lotDt.Rows[0]["filmlevel"].ToString();

        //增加有效幅宽
        txtValidWidth.Text = lotDt.Rows[0]["validwidth"].ToString();

        lotDt = null;
        lotDt = Package.GetPackaInfo(originalLot);
        if (lotDt.Rows.Count > 0)
        {
            txtPinHao.Text              = lotDt.Rows[0]["PinHao"].ToString();
            txtAfterPackageWeight.Text  = lotDt.Rows[0]["AfterPackageWeight"].ToString();
            txtBeforePackageWeight.Text = lotDt.Rows[0]["BeforePackageWeight"].ToString();
        }
        else
        {
            JScript.Alert("未查询到品号", this);
        }
        //显示打印标签时间
        string[] LabelTime = FilmCRUD.GetLabelTime(txtLot.Text);
        txtSubsectionDate.Text = LabelTime[0];
        txtPasteFilmDate.Text  = LabelTime[1];
        txtUVCompleteDate.Text = LabelTime[2];
        //显示工单信息
        SetWOinfo(WO);
        //批次已过站点
        string WorksiteIDOfLot = CRUD.GetWorksite(originalLot);
        //查询批次流程
        string    strFlow = "";
        DataTable dt      = CRUD.GetWorkflow(originalLot);

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            if (WorksiteIDOfLot == dt.Rows[i]["worksiteID"].ToString())
            {
                strFlow = strFlow + "[" + dt.Rows[i]["worksitename"].ToString() + "]" + "->";
            }
            else
            {
                strFlow = strFlow + dt.Rows[i]["worksitename"].ToString() + "->";
            }
        }
        if (strFlow != "")
        {
            strFlow = strFlow.Remove((strFlow).Length - 2, 2);
        }
        lblLotprocess.Text = strFlow;
    }