void grdOrganisations_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { if (this.FilteredData == null) { DataSet ds = null; using (Facade.Organisation facOrganisation = new Facade.Organisation()) { if (Request.QueryString["incomplete"] != null) { ds = facOrganisation.GetIncomplete(); } else { ds = facOrganisation.GetAllForType((int)eOrganisationType.ClientCustomer); } } this.GridData = ds.Tables[0]; this.FilteredData = ds.Tables[0].DefaultView; grdOrganisations.DataSource = this.FilteredData; } else { grdOrganisations.DataSource = this.FilteredData; } }
private void PopulateClients() { using (Facade.Organisation facOrganisation = new Facade.Organisation()) if (Request.QueryString["incomplete"] != null) { pageHeader.Title = "Incomplete Clients"; pageHeader.SubTitle = "A list of clients for which no information has been entered is listed below. Please enter this information as soon as possible."; dgClients.DataSource = facOrganisation.GetIncomplete(); } else { dgClients.DataSource = facOrganisation.GetAllForType((int)eOrganisationType.Client); } dgClients.DataBind(); }
void btnExport_Click(object sender, EventArgs e) { DataSet ds = null; using (Facade.Organisation facOrganisation = new Facade.Organisation()) if (Request.QueryString["incomplete"] != null) { pageHeader.Title = "Incomplete Clients"; pageHeader.SubTitle = "A list of clients for which no information has been entered is listed below. Please enter this information as soon as possible."; ds = facOrganisation.GetIncomplete(); } else { ds = facOrganisation.GetAllForType((int)eOrganisationType.Client); } Session["__ExportDS"] = ds.Tables[0]; Response.Redirect("../reports/csvexport.aspx?filename=AllClients"); }
void grdOrganisations_NeedDataSource(object source, GridNeedDataSourceEventArgs e) { DataSet ds = null; using (Facade.Organisation facOrganisation = new Facade.Organisation()) { if (Request.QueryString["incomplete"] != null) { ds = facOrganisation.GetIncomplete(); } else { if (optShowActive.Checked) { ds = facOrganisation.GetAllForTypeFiltered((int)eOrganisationType.Client, RowFilter, false); } else if (optShowSuspended.Checked) { ds = facOrganisation.GetAllForTypeFiltered((int)eOrganisationType.Client, RowFilter, true); } //The missing document all include suspended clients. This is because new clients remain suspended until //documents have been scanned. else if (optShowMissingCreditApplicationForm.Checked) { ds = facOrganisation.GetAllForTypeFiltered((int)eOrganisationType.Client, RowFilter, true, false, eFormTypeId.CreditApplicationForm); } else if (optShowMissingClientTnCs.Checked) { ds = facOrganisation.GetAllForTypeFiltered((int)eOrganisationType.Client, RowFilter, true, false, eFormTypeId.ClientTnCs); } else if (optShowMissingSubbyTnCs.Checked) { ds = facOrganisation.GetAllForTypeFiltered((int)eOrganisationType.Client, RowFilter, true, true, eFormTypeId.SubbyTnCs); } } } grdOrganisations.DataSource = ds.Tables[0]; }