Пример #1
0
        public void UpdateHouse(EntitiesLayer.House house)
        {
            DataAccessLayer.ThronesTournamentEntities bdd = new ThronesTournamentEntities();
            House objEntity = bdd.Houses.FirstOrDefault(h => h.Id == house.ID);

            objEntity.name            = house.Name;
            objEntity.numberOfUnities = house.NumberOfUnities;

            bdd.SaveChanges();
        }
Пример #2
0
        public void AddHouse(EntitiesLayer.House house)
        {
            DataAccessLayer.ThronesTournamentEntities bdd = new ThronesTournamentEntities();

            var newHouse = new House();

            newHouse.name            = house.Name;
            newHouse.numberOfUnities = house.NumberOfUnities;

            bdd.Houses.Add(newHouse);

            bdd.SaveChanges();
        }
Пример #3
0
        private EntitiesLayer.House ConvertToHouse(House element)
        {
            EntitiesLayer.House h = new EntitiesLayer.House();

            if (element != null)
            {
                h.ID = element.Id;
                h.NumberOfUnities = element.numberOfUnities;
                h.Name            = element.name;
            }
            else
            {
                h = null;
            }

            return(h);
        }
Пример #4
0
 private EntitiesLayer.House GetHouse(DataAccessLayer.Houses hou)
 {
     EntitiesLayer.House ho = new EntitiesLayer.House(hou.name);
     return(ho);
 }
Пример #5
0
 public EntitiesLayer.House MajHouse(EntitiesLayer.House ho)
 {
     throw new System.NotImplementedException();
 }
Пример #6
0
 public Territory(House owner, TerritoryTypeEnum territoryType)
 {
     _owner         = owner;
     _territoryType = territoryType;
 }
Пример #7
0
 public Character(String FirstName, String LastName, CharacterType characterType, House house)
 {
     this.FirstName = FirstName;
     this.LastName  = LastName;
     Type           = characterType;
     Bravoury       = 0;
     Crazyness      = 0;
     Pv             = GlobalVar.PV;
     House          = house;
     Relations      = new List <Relation>();
 }
Пример #8
0
 public Fight(House challenger1, House challenger2)
 {
     _houseChallenger1 = challenger1;
     _houseChallenger2 = _houseChallenger2;
 }
Пример #9
0
        public void UpdateHouse(EntitiesLayer.House house)
        {
            DataAccessLayer.DALManager manager = DataAccessLayer.DALManager.Instance;

            manager.DALServer.UpdateHouse(house);
        }
Пример #10
0
 public Fight(House challenging, House challenged, House winning)
 {
     HouseChallenging = challenging;
     HouseChallenged  = challenged;
     WinningHouse     = winning;
 }