Ejemplo n.º 1
0
    protected void Btn_DeprtMan_Click(object sender, EventArgs e)//检索库房管理人员
    {
        //Depart = DropDownList_Depart.Text.Trim().ToString();
        //Manger = TextBox_DptMan.Text.Trim().ToString();
        string temp = "";

        if (DropDownList_Depart.SelectedValue != "请选择")
        {
            temp += " and b.BDOS_Name like '%" + DropDownList_Depart.SelectedValue.ToString() + "%'";
        }
        if (TextBox_DptMan.Text != "")
        {
            temp += " and a.UMUI_UserName like '%" + TextBox_DptMan.Text.ToString() + "%'";
        }
        Label1.Text = temp;
        GridView_Depart.DataSource = PSB.SList_ImstoreManger(Label1.Text);
        GridView_Depart.DataBind();
        UpdatePanel_findMan.Update();
    }
Ejemplo n.º 2
0
    }//更新//当为commandField时使用这种,为模板列连接按钮使用rowcommand根据command那么不同来操作

    #endregion

    #region 库房管理人员查询表的后台事件
    protected void GridView_Depart_PageIndexChanging(object sender, GridViewPageEventArgs e) //出入库类别表,下一页,上一页等跳转后台
    {
        GridView theGrid      = sender as GridView;                                          // refer to the GridView
        int      newPageIndex = 0;

        if (-2 == e.NewPageIndex)
        { // when click the "GO" Button
            TextBox     txtNewPageIndex = null;
            GridViewRow pagerRow        = GridView_Depart.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
        {  // when click the first, last, previous and next Button
            newPageIndex = e.NewPageIndex;
        }

        // check to prevent form the NewPageIndex out of the range
        // newPageIndex = newPageIndex < 0 ? 0 : newPageIndex;
        //   newPageIndex = newPageIndex >= GridView_Depart.PageCount ? GridView_Depart.PageCount - 1 : newPageIndex;

        // specify the NewPageIndex
        //  GridView_Depart.PageIndex = newPageIndex;

        //   GridView_Depart.PageIndex = newPageIndex;
        GridView_Depart.DataSource = PSB.SList_ImstoreManger(Label1.Text);
        GridView_Depart.DataBind();
        UpdatePanel_findMan.Update();
        newPageIndex = newPageIndex < 0 ? 0 : newPageIndex;
        newPageIndex = newPageIndex >= GridView_Depart.PageCount ? GridView_Depart.PageCount - 1 : newPageIndex;
        GridView_Depart.PageIndex = newPageIndex;
        GridView_Depart.DataBind();
    }  //读取go前textbox,导航到指定页面
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            GridView_Depart.DataSource = PSB.SList_ImstoreManger(Label1.Text);
            GridView_Depart.DataBind();
            UpdatePanel_findMan.Update();
            //GridView_Depart.DataSource = PSB.SList_User_IMstore();
            //GridView_Depart.DataBind();

            /*this.GridView_IMSSBD.DataSource = PSB.SList_IMssd_in_out(IN.ToString(), OUT.ToString());
             * this.GridView_IMSSBD.DataBind();
             * this.GridView_IMStore.DataSource = PSB.SList_Istore();
             * this.GridView_IMStore.DataBind();
             * this.GridView_Depart.DataSource = PSB.SList_User_IMstore();
             * this.GridView_Depart.DataBind();
             * this.DropDownList_Depart.DataSource = PSB.SList_DROP_Depart();
             * this.DropDownList_Depart.DataBind();
             * GridView_IMSSBD.Attributes.Add("style", "table-layout:fixed");*/
        }
        if (Request.QueryString["status"] == "SeeSSd")//出入库类别查看权限
        {
            Title = "出入库类别查看";
            Panel_IMStore.Visible = false;

            Button_StoreIn.Visible             = false;
            Button_StoreOut.Visible            = false;
            GridView_IMSSBD.Columns[4].Visible = false;
            GridView_IMSSBD.Columns[5].Visible = false;

            GridView_IMSSBD.DataSource = PSB.SList_IMssd_in_out(IN.ToString(), OUT.ToString());
            GridView_IMSSBD.DataBind();

            GridView_IMSSBD.Attributes.Add("style", "table-layout:fixed");
        }
        else
        if (Request.QueryString["status"] == "EdditSSd")    //出入库类别编辑权限
        {
            Title = "出入库类别维护";
            Panel_IMStore.Visible = false;

            Button_StoreIn.Visible             = true;
            Button_StoreOut.Visible            = true;
            GridView_IMSSBD.Columns[4].Visible = true;
            GridView_IMSSBD.Columns[5].Visible = true;

            GridView_IMSSBD.DataSource = PSB.SList_IMssd_in_out(IN.ToString(), OUT.ToString());
            GridView_IMSSBD.DataBind();

            GridView_IMSSBD.Attributes.Add("style", "table-layout:fixed");
        }
        else
        if (Request.QueryString["status"] == "SeeStore")        //库房查看权限
        {
            Title = "库房查看";
            Panel_StoreSearch.Visible = false;
            Panel_IMSSBD.Visible      = false;
            Btn_NewStore.Visible      = false;

            GridView_IMStore.DataSource = PSB.SList_Istore();
            GridView_IMStore.DataBind();
            GridView_IMStore.Columns[4].Visible = false;
            GridView_IMStore.Columns[5].Visible = false;
            GridView_IMStore.Columns[6].Visible = false;
            GridView_IMStore.Columns[7].Visible = false;
        }
        else
        if (Request.QueryString["status"] == "SeeAreal")            //区域查看权限
        {
            Title = "库存区域查看";
            Panel_StoreSearch.Visible = false;
            Panel_IMSSBD.Visible      = false;
            Btn_NewStore.Visible      = false;


            GridView_IMStore.DataSource = PSB.SList_Istore();
            GridView_IMStore.DataBind();
            GridView_IMStore.Columns[4].Visible = false;
            GridView_IMStore.Columns[5].Visible = false;
            GridView_IMStore.Columns[6].Visible = false;
        }
        else
        if (Request.QueryString["status"] == "EditStore")                //库房编辑权限
        {
            Title = "库存区域维护";
            Panel_StoreSearch.Visible           = false;
            Panel_IMSSBD.Visible                = false;
            GridView_IMStore.Columns[7].Visible = false;

            GridView_IMStore.DataSource = PSB.SList_Istore();
            GridView_IMStore.DataBind();
            //GridView_Depart.DataSource = PSB.SList_User_IMstore();
            //GridView_Depart.DataBind();
            DropDownList_Depart.DataSource = PSB.SList_DROP_Depart();
            DropDownList_Depart.DataBind();
        }
    }