private void LoadRow(int CoachID) { var oCoaches = new CSBC.Components.Season.clsCoaches(); DataTable rsData = default(DataTable); try { rsData = oCoaches.LoadCoaches(CoachID, Master.CompanyId, Master.SeasonId); if (rsData.Rows.Count > 0) { lnkName.Text = rsData.Rows[0]["Name"].ToString(); lblAddress.Text = rsData.Rows[0]["Address1"].ToString(); lblCSZ.Text = rsData.Rows[0]["City"].ToString() + " " + rsData.Rows[0]["state"].ToString() + " " + rsData.Rows[0]["Zip"].ToString(); lblPhone.Text = rsData.Rows[0]["HousePhone"].ToString(); txtCoachPhone.Text = rsData.Rows[0]["CoachPhone"].ToString(); if (String.IsNullOrEmpty(rsData.Rows[0]["ShirtSize"].ToString())) { cmbSizes.SelectedValue = "N/A"; } else { cmbSizes.SelectedValue = rsData.Rows[0]["ShirtSize"].ToString(); } int x; if (Int32.TryParse(rsData.Rows[0]["PeopleID"].ToString(), out x )) { Session["PeopleID"] = rsData.Rows[0]["PeopleID"].ToString(); } lnkComments.Enabled = true; txtComments.Enabled = true; } } catch (Exception ex) { lblError.Text = "LoadRow::" + ex.Message; } finally { oCoaches = null; } GetKids(CoachID); cmbCoaches.Visible = false; pnlCoach.Visible = true; }
private void UpdPlayer(long CoachID, long PlayerID) { if (Master.AccessType == "R") return; var oCoach = new CSBC.Components.Season.clsCoaches(); try { //oCoach.UpdatePlayer(CompanyId, SeasonId, coachId, PlayerID) -- update } catch (Exception ex) { Session["ErrorMSG"] = "UpdPlayer::" + ex.Message; } finally { oCoach = null; } }
private void DELRow(int iCoachID) { if (Master.AccessType == "R") return; var oCoach = new CSBC.Components.Season.clsCoaches(); try { oCoach.DELRow(iCoachID, Master.CompanyId); } catch (Exception ex) { Session["ErrorMSG"] = "DELRow::" + ex.Message; } finally { oCoach = null; } }