Exemplo n.º 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();
        }
Exemplo n.º 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();
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 private EntitiesLayer.House GetHouse(DataAccessLayer.Houses hou)
 {
     EntitiesLayer.House ho = new EntitiesLayer.House(hou.name);
     return(ho);
 }
Exemplo n.º 5
0
 public EntitiesLayer.House MajHouse(EntitiesLayer.House ho)
 {
     throw new System.NotImplementedException();
 }
Exemplo n.º 6
0
 public Territory(House owner, TerritoryTypeEnum territoryType)
 {
     _owner         = owner;
     _territoryType = territoryType;
 }
Exemplo n.º 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>();
 }
Exemplo n.º 8
0
 public Fight(House challenger1, House challenger2)
 {
     _houseChallenger1 = challenger1;
     _houseChallenger2 = _houseChallenger2;
 }
Exemplo n.º 9
0
        public void UpdateHouse(EntitiesLayer.House house)
        {
            DataAccessLayer.DALManager manager = DataAccessLayer.DALManager.Instance;

            manager.DALServer.UpdateHouse(house);
        }
Exemplo n.º 10
0
 public Fight(House challenging, House challenged, House winning)
 {
     HouseChallenging = challenging;
     HouseChallenged  = challenged;
     WinningHouse     = winning;
 }