public Grid()
 {
     type   = Grid_Type.pass;
     Pos    = Vector2Int.zero;
     FGH    = Vector3Int.zero;
     parent = Vector2Int.zero;
 }
Esempio n. 2
0
    protected void Grid_Type_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        = Grid_Type.BottomPagerRow;


            if (null != pagerRow)
            {
                txtNewPageIndex = (TextBox)pagerRow.FindControl("textbox1");   // 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;
        }

        if (LblStateForGrid_Type.Text == "检索前")
        {
            BindGrid("");
        }
        if (LblStateForGrid_Type.Text == "检索后")
        {
            BindGrid(TxtType.Text.Trim());
        }

        newPageIndex        = newPageIndex < 0 ? 0 : newPageIndex;
        newPageIndex        = newPageIndex >= Grid_Type.PageCount ? Grid_Type.PageCount - 1 : newPageIndex;
        Grid_Type.PageIndex = newPageIndex;
        Grid_Type.DataBind();
        GridView2.PageIndex = newPageIndex;
        GridView2.DataBind();
    }
Esempio n. 3
0
 private void BindGrid(string HRPAT_Type)
 {
     Grid_Type.DataSource = hRPerfL.Search_HRPerformAssessType(HRPAT_Type);
     Grid_Type.DataBind();
 }
Esempio n. 4
0
 private void BindGrid(string HRET_EmpType)
 {
     Grid_Type.DataSource = hRETypeL.Search_HREmployeeType(HRET_EmpType);
     Grid_Type.DataBind();
 }