private void BtnOk_Click(object sender, EventArgs e) { var customer = new Customer() { FirstName = txbFirstName.Text, LastName = txbLastName.Text, Country = txbCountry.Text, Address = txbAddress.Text, Disqount = trbrDiscount.Value }; if (rbtnMale.Checked) { customer.Gender = 1; } else if (rbtnFemale.Checked) { customer.Gender = 2; } else { customer.Gender = 3; } IOController.AddRecord(customer, "Customers"); this.Close(); }
private void BtnAdd_Click(object sender, EventArgs e) { var source = new Source() { Name = txbName.Text, Link = txbLink.Text, Taxes = Convert.ToSingle(txbTaxes.Text) }; IOController.AddRecord(source, "Sources"); this.Close(); }