private void FillEmptyForm() { if (!Utilities.IsDev()) { idRow.Attributes["class"] = "hiddencol"; } DataTable dt_titles = DBBase.GetGenericDataTable_WithWhereOrderClause(null, "Title", "", " descr ", "title_id", "descr"); for (int i = dt_titles.Rows.Count - 1; i >= 0; i--) { if (Convert.ToInt32(dt_titles.Rows[i]["title_id"]) == 0) { DataRow newRow = dt_titles.NewRow(); newRow.ItemArray = dt_titles.Rows[i].ItemArray; dt_titles.Rows.RemoveAt(i); dt_titles.Rows.InsertAt(newRow, 0); break; } } ddlTitle.DataSource = dt_titles; ddlTitle.DataBind(); ddlTitle.SelectedIndex = Utilities.IndexOf(ddlTitle, "dr", "dr."); DataTable orgs = OrganisationDB.GetDataTable_ByType(new int[] { 191 }); orgs.DefaultView.Sort = "name ASC"; foreach (DataRowView row in orgs.DefaultView) { ddlOrgsList.Items.Add(new ListItem(row["name"].ToString(), row["organisation_id"].ToString())); } //if (orgs.Rows.Count > 0) // UpdateReferrersAtOrgList(); if (orgs.Rows.Count > 0) { orgsListRow.Visible = true; newOrgTitleRow.Visible = false; newOrgNameRow.Visible = false; newOrgABNRow.Visible = false; newOrgACNRow.Visible = false; newOrgCommentsRow.Visible = false; newOrgSepeatorTrailingRow.Visible = false; newOrgAddressRow1.Visible = false; newOrgAddressRow2.Visible = false; newOrgAddressRow3.Visible = false; newOrgAddressRow4.Visible = false; newOrgAddressRow5.Visible = false; newOrgAddressRow6.Visible = false; newOrgAddressRow7.Visible = false; newOrgAddressRow8.Visible = false; newOrgAddressRow9.Visible = false; newOrgAddressRow10.Visible = false; newOrgContactRow1.Visible = false; newOrgContactRow2.Visible = false; newOrgContactRow3.Visible = false; newOrgContactTitleRow.Visible = false; } else { SetAddNewOrgSection(); } btnSubmit.Text = "Add Referrer"; SetupAddressGUI(); }