public UnitLister(string unitCode) { mUnitList = new ArrayList(); mFormat = "weekly"; UnitFactory uf = new UnitFactory(); DataSet ds = Utility.TflWs.GetTeams(Utility.CurrentSeason()); DataTable dt = ds.Tables[0]; foreach (DataRow dr in dt.Rows) { NflTeam t = new NflTeam(dr["TEAMID"].ToString()); TeamUnit myUnit = uf.CreateUnit(unitCode); myUnit.Team = t; mUnitList.Add(myUnit); } }
public static void LoadUnits() { //Announce( "RosterGrid.LoadUnits" ); UnitList = new ArrayList(); var po = new TeamUnit("PO", "Passing Offence"); var ro = new TeamUnit("RO", "Rushing Offence"); var pp = new TeamUnit("PP", "Pass Protection"); var pr = new TeamUnit("PR", "Pass Rush"); var rd = new TeamUnit("RD", "Run Defence"); var pd = new TeamUnit("PD", "Pass Defence"); po.AddPosition("QB"); po.AddPosition("WR"); po.AddPosition("FL"); po.AddPosition("SE"); po.AddPosition("TE"); UnitList.Add(po); UnitList.Add(ro); UnitList.Add(pp); UnitList.Add(pr); UnitList.Add(rd); UnitList.Add(pd); }