Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }