public static DataTable GetDraftList(int divisionId, int seasonId, int companyId) { var oPlayer = new CSBC.Components.Season.ClsPlayers(); DataTable rsData = default(DataTable); try { rsData = oPlayer.GetDraftList(divisionId, seasonId, companyId); } catch (Exception ex) { string text = "LoadGrid::" + ex.Message; } return rsData; }
private void UpdPlayer(int sponsorId, int PlayerID) { var oPlayers = new CSBC.Components.Season.ClsPlayers(); try { var _with7 = oPlayers; _with7.SponsorID = Master.SponsorId; //oPlayers.UPDSponsor(Session["CompanyID"], Session["SeasonID"], PlayerID); ///implement this!!!! } catch (Exception ex) { ErrorMessage = "UpdPlayer::" + ex.Message; } finally { oPlayers = null; } }
private long SetDivision() { long functionReturnValue = 0; var oPlayer = new CSBC.Components.Season.ClsPlayers(); try { var _with5 = oPlayer; oPlayer.SetDivision(Master.PeopleId, Master.CompanyId, Master.SeasonId); } catch (Exception ex) { Session["ErrorMSG"] = "SetDivision::" + ex.Message; } finally { oPlayer = null; } return functionReturnValue; }
private void UpdPlayer(long PeopleID, long TeamID) { var oPlayers = new CSBC.Components.Season.ClsPlayers(); try { //oPlayers.UpdatePlayer(PeopleID, (int)Session["CompanyID"], (int)Session["SeasonID"], TeamID); oPlayers.UpdatePlayer((int)PeopleID, (int)Session["CompanyID"], (int)Session["SeasonID"]); } catch (Exception ex) { lblError.Text = "UpdPlayer::" + ex.Message; } finally { oPlayers = null; } }
private int GetPlayer() { int functionReturnValue = 0; functionReturnValue = 0; lblBalance.Text = ""; btnTeam.Visible = false; var oPlayer = new CSBC.Components.Season.ClsPlayers(); DataTable rsData = default(DataTable); try { rsData = oPlayer.GetRecords(Master.PeopleId, Master.CompanyId, Master.SeasonId); if ((rsData != null)) { if (rsData.Rows.Count > 0) { var row = rsData.Rows[0]; functionReturnValue = Convert.ToInt32(row["PlayerID"]); btnTeam.Visible = true; Session["TeamID"] = Convert.ToInt32(row["TeamID"]); if (String.IsNullOrEmpty((string)row["TeamID"])) Session["TeamID"] = 0; Session["DivisionID"] = Convert.ToInt32(row["DivisionID"]); if (row["DivisionID"] == null) Session["DivisionID"] = 0; btnTeam.Text = (string)row["Div_Desc"] + " (Team: " + (string)row["TeamNumber"] + ")"; if (row["TeamNumber"] == null) btnTeam.Text = row["Div_Desc"].ToString() + ": Undrafted"; btnTeam.ToolTip = row["TeamName"].ToString() + "-" + row["TeamColor"].ToString(); lblBalance.Text = "Balance: " + String.Format((string)row["BalanceOwed"], "{0:c}"); } } Session.Add("LinkName", txtFirstName.Text + ", " + txtLastName.Text); } catch (Exception ex) { lblError.Text = "GetPlayer::" + ex.Message; } finally { oPlayer = null; Session.Add("LinkName", txtLastName.Text); } return functionReturnValue; }