示例#1
0
        public int ChangeAward(Award award, IBll objectBll)
        {
            var oldAward = objectBll.Awards.GetAward(award.Id);

            foreach (var item in oldAward.OwnerList)
            {
                objectBll.RemoveDependUserAndAwards(item, award.Id);
            }

            ChangeAward(award);

            foreach (var item in award.OwnerList)
            {
                var user = objectBll.Users.GetUser(item);
                user.AwardList.Add(award.Id);
                objectBll.Users.ChangeUser(user);
                objectBll.AddDependUserAndAwards(item, award.Id);
            }

            return(1);
        }