public void SetOfficePacks(OfficePacks officePacks) { //инициализировать скрытое поля класса this._officePacks = officePacks; //присвоить значение данных сотрудника элементам редактирования // this.txtboxFamily.Text = _employee.family; }
private void mnOpenOfficePacks_Click(object sender, EventArgs e) { FrmOfficePacks frmOfficePacks = new FrmOfficePacks(); //Задать сылка на текущий объект в таблицы OfficePacks officePacks = (bsOfficePacks.Current as OfficePacks); frmOfficePacks.SetOfficePacks(officePacks); frmOfficePacks.ShowDialog(); }
public void TestProfitIsNotNull() { List <OfficePacks> officePacks = new List <OfficePacks>(); officePacks.Add( new OfficePacks() { name = "test1", vendor = "test1", composition = 1, price = 90 }); officePacks.Add( new OfficePacks() { name = "test2", vendor = "test2", composition = 3, price = 50 }); officePacks.Add( new OfficePacks() { name = "test3", vendor = "test3", composition = 5, price = 80 }); officePacks.Add( new OfficePacks() { name = "test4", vendor = "test4", composition = 10, price = 40 }); OfficePacks office = OfficePacksMethodProfit.Method(officePacks); Assert.IsNotNull(office); }