Esempio n. 1
0
    public void BindGrid()
    {
        try
        {
            int rowcount = ucCustomPager1.isCountRecord;
            //string sortbycoloumn = (ViewState["SORTBYCOLOUMN"] == null) ? null : (ViewState["SORTBYCOLOUMN"].ToString());
            //int? sortdirection = null; if (ViewState["SORTDIRECTION"] != null) sortdirection = Int32.Parse(ViewState["SORTDIRECTION"].ToString());
            VesselId = Convert.ToInt32(ddlvessel.SelectedValue);

            DataTable dt = oBLL_CP.Redelivery_GetDetail(VesselId, ucCustomPager1.CurrentPageIndex, ucCustomPager1.PageSize, ref rowcount);


            if (ucCustomPager1.isCountRecord == 1)
            {
                ucCustomPager1.CountTotalRec = rowcount.ToString();
                ucCustomPager1.BuildPager();
            }

            if (dt.Rows.Count > 0)
            {
                gvNotices.DataSource = dt;
                gvNotices.DataBind();
            }
        }
        catch { }
    }