public string PopulateProps(string idSport, string LeagueID) { try { PinniAppi AppPinni = new PinniAppi(); ObservableCollection <csSocProp> PropList = AppPinni.LoadSoccerProps("", LeagueID, idSport); if (PropList != null && PropList.Count > 0) { foreach (var i in PropList) { if (!AppPinni.SaveProp(i)) { return("N"); } } } else { return("N"); } } catch (Exception) { return("N"); } return("Y"); }
protected void SocProps(object sender, EventArgs e) { try { PropList = AppPinni.LoadSoccerProps(inCategory.Items[inCategory.SelectedIndex].Value, inLeague.Items[inLeague.SelectedIndex].Value); rptTable.DataSource = PropList; rptTable.DataBind(); if (PropList != null) { canPopulate = true; btnPopulate.Visible = true; } else { canPopulate = false; btnPopulate.Visible = false; } } catch (Exception) { canPopulate = false; } }