public void Serialization() { salary.Date = DateTime.Today; salary.Amount = 30000; salary.Type = EIncome.Salario; salary.Description = "My Salary"; bonus.Date = DateTime.Today; bonus.Amount = 5000; bonus.Type = EIncome.Bonus; bonus.Description = "Bonus from my company"; vehicle.Date = DateTime.Today; vehicle.Amount = 500; vehicle.Type = ESpending.Vehiculo; vehicle.Description = "insurance"; service.Date = DateTime.Today; service.Amount = 1500; service.Type = ESpending.Servicio; service.Description = "internet"; aprilBalance += bonus; aprilBalance += salary; aprilBalance += service; aprilBalance += vehicle; yearlyBal += aprilBalance; Assert.IsNotNull(Xml <YearlyBalance> .SaveBinaryXml("testBinary.bin", yearlyBal)); Assert.IsNotNull(Xml <YearlyBalance> .ReadBinary("testBinary.bin", out YearlyBalance binaryData)); Assert.IsNotNull(Xml <YearlyBalance> .SaveXml("test.xml", binaryData)); }
private void btnAddMonth_Click_1(object sender, EventArgs e) { try { Balance newBalance = new Balance((EMonth)this.MonthDropDown.SelectedItem); yearlyB += newBalance; this.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public CreateYearForm(YearlyBalance _data) { InitializeComponent(); this.newYear = _data; }
public NewMonthForm(YearlyBalance formYearlyBalance) { InitializeComponent(); yearlyB = formYearlyBalance; }