protected void SetOrgsDDL() { DataTable dt = null; string type = null; if (!UserView.GetInstance().IsAgedCareView) { dt = OrganisationDB.GetDataTable_Clinics(); type = "Clinics"; lblOrgType.Text = "Clinic"; } else { dt = OrganisationDB.GetDataTable_AgedCareFacs(); type = "Facilities"; lblOrgType.Text = "Facility"; } ddlOrgs.Items.Clear(); ddlOrgs.Items.Add(new ListItem("All " + type, "0")); for (int i = 0; i < dt.Rows.Count; i++) { ddlOrgs.Items.Add(new ListItem(dt.Rows[i]["name"].ToString(), dt.Rows[i]["organisation_id"].ToString())); } if (IsValidFormID()) { ddlOrgs.SelectedValue = GetFormID().ToString(); lblHowToAddItems.Visible = false; } }
protected void SetupGUI() { txtStartDate_Picker.OnClientClick = "displayDatePicker('txtStartDate', this, 'dmy', '-'); return false;"; //txtEndDate_Picker.OnClientClick = "displayDatePicker('txtEndDate', this, 'dmy', '-'); return false;"; txtNoRecallLettersAfterDate_Picker.OnClientClick = "displayDatePicker('txtNoRecallLettersAfterDate', this, 'dmy', '-'); return false;"; //txtStartDate.Text = IsValidFormStartDate() ? (GetFormStartDate(false) == DateTime.MinValue ? "" : GetFormStartDate(false).ToString("dd-MM-yyyy")) : DateTime.Today.AddYears(-1).ToString("dd-MM-yyyy"); // DateTime.Now.AddYears(-1).ToString("dd-MM-yyyy"); // txtEndDate.Text = IsValidFormEndDate() ? (GetFormEndDate(false) == DateTime.MinValue ? "" : GetFormEndDate(false).ToString("dd-MM-yyyy")) : DateTime.Today.ToString("dd-MM-yyyy"); // DateTime.Now.AddYears(1).ToString("dd-MM-yyyy"); // txtNoRecallLettersAfterDate.Text = IsValidFormNoRecallDate() ? (GetFormNoRecallDate(false) == DateTime.MinValue ? "" : GetFormNoRecallDate(false).ToString("dd-MM-yyyy")) : DateTime.Today.ToString("dd-MM-yyyy"); string show_with_epc = Request.QueryString["show_with_epc"]; if (show_with_epc != null && (show_with_epc == "1" || show_with_epc == "0")) { chkShowWithEPC.Checked = show_with_epc == "1"; } string show_with_no_epc = Request.QueryString["show_with_no_epc"]; if (show_with_no_epc != null && (show_with_no_epc == "1" || show_with_no_epc == "0")) { chkShowWithNoEPC.Checked = show_with_no_epc == "1"; } UserView userView = UserView.GetInstance(); ddlClinics.Style["width"] = "290px"; ddlClinics.Items.Add(new ListItem("All " + (userView.IsAgedCareView ? "Facilities" : "Clinics"), 0.ToString())); DataTable dt_clinics = OrganisationDB.GetDataTable_Clinics(false); for (int i = 0; i < dt_clinics.Rows.Count; i++) { ddlClinics.Items.Add(new ListItem(dt_clinics.Rows[i]["name"].ToString(), dt_clinics.Rows[i]["organisation_id"].ToString())); } string org = Request.QueryString["org"]; if (org != null && ddlClinics.Items.FindByValue(org) != null) { ddlClinics.SelectedValue = org; } }
protected DataTable GetOrgsDaTatable(UrlParamType urlParamType, bool showDeleted, string searchName = "", bool searchNameOnlyStartsWith = false) { DataTable dt = null; switch (GetUrlParamType()) { case UrlParamType.Clinic: dt = OrganisationDB.GetDataTable_Clinics(chkShowDeleted.Checked, searchName, searchNameOnlyStartsWith); break; case UrlParamType.AgedCare: dt = OrganisationDB.GetDataTable_AgedCareFacs(chkShowDeleted.Checked, searchName, searchNameOnlyStartsWith); break; case UrlParamType.Insurance: dt = OrganisationDB.GetDataTable_Insurance(chkShowDeleted.Checked, searchName, searchNameOnlyStartsWith); break; case UrlParamType.External: if (IsValidFormOrgTypeIDs()) { dt = OrganisationDB.GetDataTable_External(chkShowDeleted.Checked, searchName, searchNameOnlyStartsWith, true, GetFormOrgTypeIDs()); } else { dt = OrganisationDB.GetDataTable_External(chkShowDeleted.Checked, searchName, searchNameOnlyStartsWith); } break; default: dt = OrganisationDB.GetDataTable(0, chkShowDeleted.Checked, true, false, false, true, false, searchName, searchNameOnlyStartsWith); break; } return(dt); }