} // property Blueprints public CharacterTradeSkill(long skillID) { ID = skillID; Skill skillRecord = SkillGateway.SkillGetById(ID); if (skillRecord == null) { Name = "n/a"; Description = "n/a"; } else { Name = skillRecord.displayName; Description = skillRecord.displayDescription; } } // constructor
} // method Page_Load protected void grd_Recipe_RowDataBound(object sender, GridViewRowEventArgs e) { switch (e.Row.RowType) { case DataControlRowType.DataRow: HyperLink nameLink = (HyperLink)e.Row.FindControl("lnk_Name"); Recipe currentRecipe = (Recipe)e.Row.DataItem; nameLink.Text = currentRecipe.displayName; nameLink.NavigateUrl = LinkGenerator.GenerateRecipeLink(currentRecipe.recipeID); HyperLink skillLink = (HyperLink)e.Row.FindControl("lnk_Skill"); Skill currentSkill = SkillGateway.SkillGetById(currentRecipe.skillID); e.Row.CssClass += " " + currentSkill.displayName; skillLink.Text = currentSkill.displayName; skillLink.NavigateUrl = LinkGenerator.GenerateTradeskillLink(currentSkill.skillID); break; } // switch } // method grd_Recipe_RowDataBound
protected void Page_Load(object sender, EventArgs e) { rpt_TradeSkills.DataSource = SkillGateway.TradeSkillsGetAll(); rpt_TradeSkills.DataBind(); } // method Page_Load
public SkillManager() { this.skillGateway = new SkillGateway(); }