Beispiel #1
0
        public PlayerPos CreatePos(string categoryIn, NFLPlayer p)
        {
            PlayerPos pp;

            switch (categoryIn)
            {
            case RosterLib.Constants.K_QUARTERBACK_CAT:
                pp = new QuarterbackCategory();
                break;

            case RosterLib.Constants.K_RUNNINGBACK_CAT:
                pp = new RunningbackCategory();
                break;

            case RosterLib.Constants.K_RECEIVER_CAT:
                pp = new ReceiverCategory();
                break;

            case RosterLib.Constants.K_KICKER_CAT:
                pp = new KickerCategory();
                break;

            case RosterLib.Constants.K_LINEMAN_CAT:
                pp = new DefensiveLineCategory();
                break;

            case RosterLib.Constants.K_DEFENSIVEBACK_CAT:
                pp = new DefensiveBackCategory();
                break;

            case RosterLib.Constants.K_OFFENSIVELINE_CAT:
                pp = new OffensiveLineCategory();
                break;

            case RosterLib.Constants.K_DEFENSIVETEAM_CAT:
                pp = new DefensiveTeamCategory();
                break;

            default:
                RosterLib.Utility.Announce(string.Format("Unknown Category>{0} player - {1}", categoryIn, p.PlayerName));
                pp = new DefensiveLineCategory();
                break;
            }
            pp.Category = categoryIn;
            return(pp);
        }
Beispiel #2
0
        public async Task <ReceiverCategory> AddCategory(ReceiverCategory cate, AppUser appUser)
        {
            var entity = await _res.AddDetail(cate, DateTime.Now, appUser);

            return(entity);
        }
Beispiel #3
0
 public async Task DeleteCategory(ReceiverCategory cate, AppUser appUser)
 {
     //throw new NotImplementedException();
     await _res.DeleteDetail(cate, DateTime.Now, appUser);
 }
Beispiel #4
0
 public async Task UpdateCategory(ReceiverCategory cate, AppUser appUser)
 {
     await _res.UpdateDetail <ReceiverCategory>(cate, DateTime.Now, appUser);
 }