public void RemoveCellblockTest() { Cellblock cellblock = new Cellblock("TestBlock"); Cell cell = new Cell(4, 4, cellblock); cell.CellBlock = null; Assert.AreEqual(null, cell.CellBlock); }
private void comboBoxAvaCells_SelectionChangeCommitted(object sender, EventArgs e) { groupBox1.Visible = true; cell = cellRepo.GetCellByIndex(Int32.Parse(comboBoxAvaCells.SelectedItem.ToString())); txtBoxMaxPop.Text = cell.MaxPop.ToString(); txtBoxPopulation.Text = cell.Pop.ToString(); }
public Prisoner(string fName, string lName, string adr, DateTime from, DateTime to, string reason) { this.FirstName = fName; this.LastName = lName; this.Adress = adr; this.ServeFrom = from; this.ServeTo = to; this.ServeReason = reason; this.PrisonerAssignment = null; this.PrisonerCell = null; }
public void Add(int maxPop, int pop, Cellblock cellblock) { LoadCellsFromDatabase(); Cell cell = new Cell(maxPop, pop, cellblock); using (ISession session = NhibernateService.OpenSession()) { using (ITransaction transaction = session.BeginTransaction()) { session.Save(cell); transaction.Commit(); } } LoadCellsFromDatabase(); Notify(); }
public void AddCellblockTest() { Cellblock cellblock = new Cellblock("TestBlock"); Cell cell = new Cell(4, 4, cellblock); Assert.AreEqual("TestBlock", cell.CellBlock.Name); }