protected void BindProgramsInfo() { try { DataTable dt = new DataTable(); dt = objBL_SiteDetail.BL_BindBatches(objML_SiteDetail); if (dt.Rows.Count > 0) { GrdBatch.DataSource = dt; GrdBatch.DataBind(); } } catch (Exception ex) { ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('" + ex.Message.ToString() + "');", true); } }
protected void Search(object sender, EventArgs e) { try { DataTable dt = new DataTable(); objML_SiteDetail.ID = ddlBatch.SelectedValue != "" ? ddlBatch.SelectedValue : null; dt = objBL_SiteDetail.BL_SearchBatches(objML_SiteDetail); if (dt.Rows.Count > 0) { GrdBatch.DataSource = dt; GrdBatch.DataBind(); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('" + ex.Message.ToString() + "');", true); } }