public void BindPaymentSchedule() { try { DataSet ds = BLL_POLOG_Register.POLOG_Get_Payment_Schedule_Amount(UDFLib.ConvertStringToNull(ddlSupplier.SelectedValue), UDFLib.ConvertIntegerToNull(ddlVessel.SelectedValue), UDFLib.ConvertStringToNull(ddlOwner.SelectedValue), chkUrgent.Checked ? 1 : 0, UDFLib.ConvertIntegerToNull(GetSessionUserID())); if (ds.Tables[0].Rows.Count > 0) { table1.Visible = true; gvPaymentApproved.DataSource = ds.Tables[0]; gvPaymentApproved.DataBind(); gvPaymentSchedule.DataSource = ds.Tables[1]; gvPaymentSchedule.DataBind(); } else { table1.Visible = false; gvPaymentApproved.DataSource = ds.Tables[0]; gvPaymentApproved.DataBind(); gvPaymentSchedule.DataSource = ds.Tables[1]; gvPaymentSchedule.DataBind(); } } catch { } { } }