public void BindVesselGrid() { int rowcount = ucCustomPagerItems.isCountRecord; string sortbycoloumn = (ViewState["SORTBYCOLOUMN"] == null) ? null : (ViewState["SORTBYCOLOUMN"].ToString()); int? sortdirection = null; if (ViewState["SORTDIRECTION"] != null) { sortdirection = Int32.Parse(ViewState["SORTDIRECTION"].ToString()); } //DataTable dt = objBLL.SearchVessel(txtfilter.Text != "" ? txtfilter.Text : null, UDFLib.ConvertIntegerToNull(DDLFleet.SelectedValue), UDFLib.ConvertIntegerToNull(DDLVessel.SelectedValue) // , UDFLib.ConvertIntegerToNull(ddlFilterVesselManager.SelectedValue), UDFLib.ConvertIntegerToNull(DDLVesselFlag.SelectedValue), UDFLib.ConvertIntegerToNull(ddlFilterVesselManager.SelectedValue), null, UDFLib.ConvertIntegerToNull(ddlvesselType.SelectedValue) // , sortbycoloumn, sortdirection, ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, ref rowcount); DataTable dt = objBLL.Search_SURVEY_Vessel(txtfilter.Text != "" ? txtfilter.Text : null, UDFLib.ConvertIntegerToNull(DDLFleet.SelectedValue), UDFLib.ConvertIntegerToNull(DDLVessel.SelectedValue) , UDFLib.ConvertIntegerToNull(ddlFilterVesselManager.SelectedValue), UDFLib.ConvertIntegerToNull(DDLVesselFlag.SelectedValue), UDFLib.ConvertIntegerToNull(ddlFilterVesselManager.SelectedValue), null, UDFLib.ConvertIntegerToNull(ddlvesselType.SelectedValue) , sortbycoloumn, sortdirection, ucCustomPagerItems.CurrentPageIndex, ucCustomPagerItems.PageSize, Session["USERCOMPANYID"].ToString(), ref rowcount); if (ucCustomPagerItems.isCountRecord == 1) { ucCustomPagerItems.CountTotalRec = rowcount.ToString(); ucCustomPagerItems.BuildPager(); } if (dt.Rows.Count > 0) { VesselGridView.DataSource = dt; VesselGridView.DataBind(); } else { VesselGridView.DataSource = dt; VesselGridView.DataBind(); } }
protected void FillGridViewAfterSearch() { int UserCompanyID = UDFLib.ConvertToInteger(Session["USERCOMPANYID"].ToString()); DataTable dt = objBLL.Get_VesselList(UDFLib.ConvertToInteger(DDLFleet.SelectedValue), UDFLib.ConvertToInteger(DDLVessel.SelectedValue), UDFLib.ConvertToInteger(ddlFilterVesselManager.SelectedValue), txtfilter.Text, UserCompanyID); VesselGridView.DataSource = dt; VesselGridView.DataBind(); }