Esempio n. 1
0
    //翻页
    protected void GridView_ProType_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView theGrid      = sender as GridView; // refer to the GridView
        int      newPageIndex = 0;

        if (-2 == e.NewPageIndex)
        {
            TextBox     txtNewPageIndex = null;
            GridViewRow pagerRow        = GridView_ProType.BottomPagerRow;


            if (null != pagerRow)
            {
                txtNewPageIndex = (TextBox)pagerRow.FindControl("textbox");   // refer to the TextBox with the NewPageIndex value
            }

            if (null != txtNewPageIndex && txtNewPageIndex.Text != "")
            {
                newPageIndex = int.Parse(txtNewPageIndex.Text) - 1; // get the NewPageIndex
            }
        }
        else
        {
            newPageIndex = e.NewPageIndex;
        }
        GridView_ProType.DataSource = iQCBasicDataL.Search_ProType_RZ(PSl.Text, PTl.Text);
        GridView_ProType.DataBind();
        newPageIndex = newPageIndex < 0 ? 0 : newPageIndex;
        newPageIndex = newPageIndex >= GridView_ProType.PageCount ? GridView_ProType.PageCount - 1 : newPageIndex;
        GridView_ProType.PageIndex = newPageIndex;
        GridView_ProType.DataBind();
    }
Esempio n. 2
0
    protected string GetCondition2()//用于GridView_ProType绑定
    {
        label_pagestate.Text = Request.QueryString["state"];
        string state = label_pagestate.Text;

        string condition2;
        string temp = "";

        if (state == "scyjhhqbmgl")
        {
            GridView_ProType.DataSource = ppp.S_PMPCountersignBasic_BD(" PMPCB_Type = '1'");
            GridView_ProType.DataBind();
        }
        if (state == "sczjhhqbmgl")
        {
            GridView_ProType.DataSource = ppp.S_PMPCountersignBasic_BD(" PMPCB_Type = '3'");
            GridView_ProType.DataBind();
        }
        if (state == "mkyjhhqbmgl")
        {
            GridView_ProType.DataSource = ppp.S_PMPCountersignBasic_BD(" PMPCB_Type = '2'");
            GridView_ProType.DataBind();
        }
        if (state == "mkzjhhqbmgl")
        {
            GridView_ProType.DataSource = ppp.S_PMPCountersignBasic_BD(" PMPCB_Type = '4'");
            GridView_ProType.DataBind();
        }
        condition2 = temp;
        return(condition2);
    }
Esempio n. 3
0
    //检索栏检索按钮
    protected void SelectProType(object sender, EventArgs e)
    {
        string PS = TextBox_Series.Text;
        string PT = TextBox_ProductName.Text;

        GridView_ProType.DataSource = iQCBasicDataL.Search_ProType_RZ(PS, PT);
        GridView_ProType.DataBind();
        UpdatePanel_Product.Update();
    }
Esempio n. 4
0
 //检索栏重置
 protected void Reset1(object sender, EventArgs e)
 {
     TextBox_Series.Text      = "";
     TextBox_ProductName.Text = "";
     PSl.Text = "";
     PTl.Text = "";
     GridView_ProType.DataSource = iQCBasicDataL.Search_ProType_RZ(PSl.Text, PTl.Text);
     GridView_ProType.DataBind();
     UpdatePanel_Product.Update();
 }
Esempio n. 5
0
    //选择产品型号
    protected void Btn_SelectPT_Click(object sender, EventArgs e)
    {
        Panel_Product_Search.Visible = true;

        TextBox_Series.Text         = "";
        TextBox_ProductName.Text    = "";
        GridView_ProType.DataSource = iQCBasicDataL.Search_ProType_RZ("", "");
        GridView_ProType.DataBind();
        UpdatePanel_Product.Update();
    }
Esempio n. 6
0
    public void databind3()
    {
        string condition;
        string PT_Name = TextBox_ProductName.Text.Trim() == "" ? " and 1=1 " : " and PT_Name like '%" + TextBox_ProductName.Text.Trim() + "%' ";
        string PS_Name = TextBox_Series.Text.Trim() == "" ? " and 1=1 " : " and PS_Name like '%" + TextBox_Series.Text.Trim() + "%' ";

        condition = PT_Name;
        GridView_ProType.DataSource = csl.S_ProTypeForCSName(condition);
        GridView_ProType.DataBind();
        UpdatePanel_Product.Update();
    }
Esempio n. 7
0
    public void datebind3()
    {
        string condition;
        string HRDD_StaffNO = TextBox_Series.Text.Trim() == "" ? " and 1=1 " : " and HRDD_StaffNO like '%" + TextBox_Series.Text.Trim() + "%' ";
        string HRDD_Name    = TextBox_ProductName.Text.Trim() == "" ? " and 1=1 " : " and HRDD_Name like '%" + TextBox_ProductName.Text.Trim() + "%' ";

        condition = HRDD_StaffNO + HRDD_Name;
        GridView_ProType.DataSource = cs.S_CSUser_HRDD_Detail(condition);
        GridView_ProType.DataBind();
        UpdatePanel_Product.Update();
    }
Esempio n. 8
0
    public void databind3()
    {
        string condition;
        string ptsname = TextBox_Series.Text.Trim() == "" ? " and 1=1 " : " and PS_Name like '%" + TextBox_Series.Text.Trim() + "%' ";
        string ptname  = TextBox_ProductName.Text.Trim() == "" ? " and 1=1 " : " and PT_Name like '%" + TextBox_ProductName.Text.Trim() + "%' ";

        condition = ptsname + ptname;
        GridView_ProType.DataSource = ppl.S_Protype_ProMainSeries(condition);
        GridView_ProType.DataBind();
        UpdatePanel_Product.Update();
    }
Esempio n. 9
0
    public void databind2()
    {
        string condition;

        string PT_Name = TextBox_Series.Text.Trim() == "" ? " and 1=1 " : " and PT_Name like '%" + TextBox_Series.Text.Trim() + "%' ";
        string PT_Code = TextBox_ProductName.Text.Trim() == "" ? " and 1=1 " : " and PT_Code like '%" + TextBox_ProductName.Text.Trim() + "%' ";

        condition = PT_Name + PT_Code;
        GridView_ProType.DataSource = ppl.S_Protype_ProSeries_ForChose(condition);
        GridView_ProType.DataBind();
        UpdatePanel_Product.Update();
    }
Esempio n. 10
0
    public void databind_PT()
    {
        string condition;
        string PS_Name         = TextBox_Series.Text.Trim() == "" ? " and 1=1 " : " and PS_Name like '%" + TextBox_Series.Text.Trim() + "%' ";
        string PT_Name         = TextBox_ProductName.Text.Trim() == "" ? " and 1=1 " : " and PT_Name like '%" + TextBox_ProductName.Text.Trim() + "%' ";
        string PT_Code         = TextBox_ProductName0.Text.Trim() == "" ? " and 1=1 " : " and PT_Code like '%" + TextBox_ProductName0.Text.Trim() + "%' ";
        string PT_CodeMeanning = TextBox_ProductName1.Text.Trim() == "" ? " and 1=1 " : " and PT_CodeMeanning like '%" + TextBox_ProductName1.Text.Trim() + "%' ";

        condition = PS_Name + PT_Name + PT_CodeMeanning + PT_Code;
        GridView_ProType.DataSource = ppd.S_ProType_For_WorkOrder(condition);
        GridView_ProType.DataBind();
        UpdatePanel_Product.Update();
    }