Пример #1
0
    protected void btnQuery_Click(object sender, EventArgs e)
    {
        PIC.VDS2G.VSM.IVM.MaintainDataTrans BCO = new PIC.VDS2G.VSM.IVM.MaintainDataTrans(ConntionDB);

        ParameterList.Clear();

        ParameterList.Add(TextBoxRowCountLimit.Text);
        ParameterList.Add(txtTrans_No.Text);
        ParameterList.Add(txtChan_Source_No.Text);
        ParameterList.Add(SLP_Trans_Date.Text);
        ParameterList.Add(SLP_Locate_No.Text);
        ParameterList.Add("");
        ParameterList.Add(txtChan_Trans_No.Text);

        DataTable Dt = BCO.QueryTransInByFind(ParameterList);

        if (Dt.Rows.Count != 0)
        {
            BindGrid(Dt);
        }
        else
        {
            ScriptManager.RegisterClientScriptBlock(Page, this.GetType(), "QueryNoData", "alert(' 查無資料 ');", true);
        }

    }
Пример #2
0
    private void SetNoRangeValue(string strTransNo)
    {
        PIC.VDS2G.VSM.IVM.MaintainDataTrans BCO = new PIC.VDS2G.VSM.IVM.MaintainDataTrans(ConntionDB);

        ParameterList.Clear();

        ParameterList.Add(1);
        ParameterList.Add(strTransNo);
        ParameterList.Add("");
        ParameterList.Add("");
        ParameterList.Add("");
        ParameterList.Add("");
        ParameterList.Add("");

        DataTable Dt = BCO.QueryTransInByFind(ParameterList);

        DataRow dr = Dt.Select("TRANS_NO ='" + strTransNo + "'")[0];

        if (dr["REMOVE_NO_RANGE"].ToString().IndexOf('~') != -1)
        {
            string[] strREMOVE_NO_RANGE = dr["REMOVE_NO_RANGE"].ToString().Split(new char[] { '~' });
            lblRemove_No_Range.Text = strREMOVE_NO_RANGE[0] + "~<br>" + strREMOVE_NO_RANGE[1];
        }
        else
        {
            lblRemove_No_Range.Text = "";
        }

        if (dr["BACKWARD_NO_RANGE"].ToString().IndexOf('~') != -1)
        {
            string[] strRETURN_NO_RANGE = dr["BACKWARD_NO_RANGE"].ToString().Split(new char[] { '~' });
            lblReturn_No_Range.Text = strRETURN_NO_RANGE[0] + "~<br>" + strRETURN_NO_RANGE[1];
        }
        else
        {
            lblReturn_No_Range.Text = "";
        }

        if (dr["ACCEPT_NO_RAGNE"].ToString().IndexOf('~') != -1)
        {
            string[] strST_ACCEPT_NO_RANGE = dr["ACCEPT_NO_RAGNE"].ToString().Split(new char[] { '~' });
            lblST_Accept_No_Range.Text = strST_ACCEPT_NO_RANGE[0] + "~<br>" + strST_ACCEPT_NO_RANGE[1];
        }
        else
        {
            lblST_Accept_No_Range.Text = "";
        }

        if (dr["INOUT_NO_RANGE"].ToString().IndexOf('~') != -1)
        {
            string[] strINOUT_NO_RANGE = dr["INOUT_NO_RANGE"].ToString().Split(new char[] { '~' });
            lblInOut_No_Range.Text = strINOUT_NO_RANGE[0] + "~<br>" + strINOUT_NO_RANGE[1];
        }
        else
        {
            lblInOut_No_Range.Text = "";
        }

        PanelList.Visible = true;

        //this.MID.Value = dr["ID"].ToString();
        Session["MID"] = dr["ID"].ToString();
    }