private void Bind_Filter_IncidentCategory() { DataView dataViewCodeName = new DataView(SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes); dataViewCodeName.RowFilter = "Category='XINCIDENTCATEGORY' and Active='Y' and ISNULL(RecordDeleted,'N')<>'Y'"; dataViewCodeName.Sort = "CodeName"; DropDownList_CustomIncidentReportGenerals_GeneralIncidentCategory.DataTextField = "CodeName"; DropDownList_CustomIncidentReportGenerals_GeneralIncidentCategory.DataValueField = "GlobalCodeId"; DropDownList_CustomIncidentReportGenerals_GeneralIncidentCategory.DataSource = dataViewCodeName; DropDownList_CustomIncidentReportGenerals_GeneralIncidentCategory.DataBind(); ListItem item = new ListItem("All Categories", "-1"); DropDownList_CustomIncidentReportGenerals_GeneralIncidentCategory.Items.Insert(0, item); DropDownList_CustomIncidentReportGenerals_GeneralIncidentCategory.SelectedValue = "-1"; }
public override void BindControls() { Bind_Programs(); Bind_Staff(); Bind_SecondaryCategory(); DataView dataViewNotes = new DataView(SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes); dataViewNotes.RowFilter = "Category='CLIENTNOTETYPE' and Active='Y' and ISNULL(RecordDeleted,'N')<>'Y'"; dataViewNotes.Sort = "CodeName"; DropDownList_CustomIncidentReportFollowUpOfIndividualStatuses_NoteType.DataTextField = "CodeName"; DropDownList_CustomIncidentReportFollowUpOfIndividualStatuses_NoteType.DataValueField = "GlobalCodeId"; DropDownList_CustomIncidentReportFollowUpOfIndividualStatuses_NoteType.DataSource = dataViewNotes; DropDownList_CustomIncidentReportFollowUpOfIndividualStatuses_NoteType.DataBind(); DataView dataViewCodeName = new DataView(SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes); //Location of incident dataViewCodeName.RowFilter = "Category='XLOCATIONINCIDNET' and Active='Y' and ISNULL(RecordDeleted,'N')<>'Y'"; dataViewCodeName.Sort = "CodeName"; DropDownList_CustomIncidentReportGenerals_GeneralLocationOfIncident.DataTextField = "CodeName"; DropDownList_CustomIncidentReportGenerals_GeneralLocationOfIncident.DataValueField = "GlobalCodeId"; DropDownList_CustomIncidentReportGenerals_GeneralLocationOfIncident.DataSource = dataViewCodeName; DropDownList_CustomIncidentReportGenerals_GeneralLocationOfIncident.DataBind(); //Location details dataViewCodeName.RowFilter = "Category='XINCIDENTLOCDETAILS' and Active='Y' and ISNULL(RecordDeleted,'N')<>'Y'"; dataViewCodeName.Sort = "CodeName"; DropDownList_CustomIncidentReportGenerals_GeneralLocationDetails.DataTextField = "CodeName"; DropDownList_CustomIncidentReportGenerals_GeneralLocationDetails.DataValueField = "GlobalCodeId"; DropDownList_CustomIncidentReportGenerals_GeneralLocationDetails.DataSource = dataViewCodeName; DropDownList_CustomIncidentReportGenerals_GeneralLocationDetails.DataBind(); //Incident Category dataViewCodeName.RowFilter = "Category='XINCIDENTCATEGORY' and Active='Y' and ISNULL(RecordDeleted,'N')<>'Y'"; dataViewCodeName.Sort = "SortOrder"; DropDownList_CustomIncidentReportGenerals_GeneralIncidentCategory.DataTextField = "CodeName"; DropDownList_CustomIncidentReportGenerals_GeneralIncidentCategory.DataValueField = "GlobalCodeId"; DropDownList_CustomIncidentReportGenerals_GeneralIncidentCategory.DataSource = dataViewCodeName; DropDownList_CustomIncidentReportGenerals_GeneralIncidentCategory.DataBind(); }