private void LoadCities() { City c = new City(); if (c.LoadByCountryID(CountryID)) { do { HtmlTableRow row = new HtmlTableRow(); row.Cells.Add(AddCityCellInnerHTML(c.GetColumn("Name" + Utils.LangPrefix).ToString(), c.GetColumn("CountryName").ToString(), c.GetColumn("Name_en").ToString())); tblCities.Rows.Add(row); } while (c.MoveNext()); } }
private void LoadCommonPageData() { Settings s = new Settings(); if (s.LoadByPrimaryKey(1)) { if (IsCountryPage) { Country c = new Country(); if (c.LoadByPrimaryKey(CountryID)) { m_Title = c.GetColumn("Name" + Utils.LangPrefix).ToString(); if (!s.IsColumnNull("TitleSuffix" + Utils.LangPrefix)) { m_Title += " - " + s.GetColumn("TitleSuffix" + Utils.LangPrefix).ToString(); } if (!c.IsColumnNull("Keywords" + Utils.LangPrefix)) { m_Keywords = c.GetColumn("Keywords" + Utils.LangPrefix).ToString(); } if (!c.IsColumnNull("Description" + Utils.LangPrefix)) { m_Description = c.GetColumn("Description" + Utils.LangPrefix).ToString(); } } } else if (IsCityPage) { City c = new City(); if (c.LoadByPrimaryKey(CityID)) { m_Title = c.GetColumn("Name" + Utils.LangPrefix).ToString(); if (!s.IsColumnNull("TitleSuffix" + Utils.LangPrefix)) { m_Title += " - " + s.GetColumn("TitleSuffix" + Utils.LangPrefix).ToString(); } if (!c.IsColumnNull("Keywords" + Utils.LangPrefix)) { m_Keywords = c.GetColumn("Keywords" + Utils.LangPrefix).ToString(); } if (!c.IsColumnNull("Description" + Utils.LangPrefix)) { m_Description = c.GetColumn("Description" + Utils.LangPrefix).ToString(); } } } if (m_Title.TrimEnd().Length == 0 && !s.IsColumnNull("Title" + Utils.LangPrefix)) { m_Title = s.GetColumn("Title" + Utils.LangPrefix).ToString(); } if (m_Keywords.TrimEnd().Length == 0 && !s.IsColumnNull("Keywords" + Utils.LangPrefix)) { m_Keywords = s.GetColumn("Keywords" + Utils.LangPrefix).ToString(); } if (m_Description.TrimEnd().Length == 0 && !s.IsColumnNull("Description" + Utils.LangPrefix)) { m_Description = s.GetColumn("Description" + Utils.LangPrefix).ToString(); } } }
private void LoadCommonPageData() { Settings s = new Settings(); if (s.LoadByPrimaryKey(1)) { if (IsCountryPage) { Country c = new Country(); if (c.LoadByPrimaryKey(CountryID)) { m_Title = c.GetColumn(Country.ColumnNames.Name).ToString(); if (!s.IsColumnNull(Settings.ColumnNames.TitleSuffix)) { m_Title += " - " + s.GetColumn(Settings.ColumnNames.TitleSuffix).ToString(); } if (!c.IsColumnNull(Country.ColumnNames.Keywords)) { m_Keywords = c.GetColumn(Country.ColumnNames.Keywords).ToString(); } if (!c.IsColumnNull(Country.ColumnNames.Description)) { m_Description = c.GetColumn(Country.ColumnNames.Description).ToString(); } } } else if (IsCityPage) { City c = new City(); if (c.LoadByPrimaryKey(CityID)) { m_Title = c.GetColumn(City.ColumnNames.Name).ToString(); if (!s.IsColumnNull(Settings.ColumnNames.TitleSuffix)) { m_Title += " - " + s.GetColumn(Settings.ColumnNames.TitleSuffix).ToString(); } if (!c.IsColumnNull(City.ColumnNames.Keywords)) { m_Keywords = c.GetColumn(City.ColumnNames.Keywords).ToString(); } if (!c.IsColumnNull(City.ColumnNames.Description)) { m_Description = c.GetColumn(City.ColumnNames.Description).ToString(); } } } else if (IsBlogPagePage) { BlogPage bp = new BlogPage(); if (bp.LoadByPrimaryKey(BlogPageID)) { m_Title = bp.GetColumn(BlogPage.ColumnNames.Name).ToString(); if (!s.IsColumnNull(Settings.ColumnNames.TitleSuffix)) { m_Title += " - " + s.GetColumn(Settings.ColumnNames.TitleSuffix).ToString(); } if (!bp.IsColumnNull(BlogPage.ColumnNames.Keywords)) { m_Keywords = bp.GetColumn(BlogPage.ColumnNames.Keywords).ToString(); } if (!bp.IsColumnNull(BlogPage.ColumnNames.Description)) { m_Description = bp.GetColumn(BlogPage.ColumnNames.Description).ToString(); } } } if (m_Title.TrimEnd().Length == 0 && !s.IsColumnNull(Settings.ColumnNames.Title)) { m_Title = s.GetColumn(Settings.ColumnNames.Title).ToString(); } if (m_Keywords.TrimEnd().Length == 0 && !s.IsColumnNull(Settings.ColumnNames.Keywords)) { m_Keywords = s.GetColumn(Settings.ColumnNames.Keywords).ToString(); } if (m_Description.TrimEnd().Length == 0 && !s.IsColumnNull(Settings.ColumnNames.Description)) { m_Description = s.GetColumn(Settings.ColumnNames.Description).ToString(); } } }