Exemplo n.º 1
0
    //protected void lnkdelete_Click(object sender, EventArgs e)
    //{
    //    string SolutionId = "";
    //    foreach (RepeaterItem gv in Repeter.Items)
    //    {
    //        string gvIDs;

    //        int FlagStatus = 0;
    //        // Declare local variable deleteChkBxItem of Checkbox type to get the Checkbox Instance of Grid Row
    //        CheckBox deleteChkBxItem = (CheckBox)gv.FindControl("deleteRec");
    //        // Get the Site Id from variable of Label type declare in GridView of grdvwSite
    //        gvIDs = ((Label)gv.FindControl("SiteID")).Text.ToString();
    //        // Check if gvIDs is not null
    //        if (gvIDs != "")
    //        {


    //            if (deleteChkBxItem.Checked)
    //            {
    //                SolutionId = SolutionId + Convert.ToInt16(gvIDs) + ",";

    //            }



    //        }

    //    }



    //     string[] str = SolutionId.Split(new char[] { ',' });
    //        foreach (string s in str)
    //        {
    //            if (s == "")
    //            {
    //                break;
    //            }
    //            int solid = Convert.ToInt16(s);
    //            Objsolutioncreator.Delete(solid);
    //            ObjSolutionKeyword.Delete(solid);
    //            ObjSolution.Delete(solid);
    //        }

    //        Response.Redirect("~/KEDB/ViewSolution.aspx");


    //}



    private void LoadDataForFilterParameter()
    {
        BLLCollection <Solution_mst> col = new BLLCollection <Solution_mst>();
        string filterid = drpfilter.SelectedValue;

        col = ObjSolution.Get_All_By_Filterid(filterid);



        PagedDataSource pgitems = new PagedDataSource();

        pgitems.DataSource       = col;
        pgitems.AllowPaging      = true;
        pgitems.PageSize         = 5;
        pgitems.CurrentPageIndex = PageNumber;
        if (pgitems.PageCount > 1)
        {
            rptPages.Visible = true;
            ArrayList pages = new ArrayList();
            for (int i = 0; i < pgitems.PageCount; i++)
            {
                pages.Add((i + 1).ToString());
            }
            rptPages.Visible    = true;
            rptPages.DataSource = pages;

            rptPages.DataBind();
        }
        else
        {
            rptPages.Visible = false;
        }

        Repeter.DataSource = pgitems;
        Repeter.DataBind();
    }