private void btnAdd_Click(object sender, EventArgs e)
        {
            CustomerInfo.Lastname      = txtLastName.Text;
            CustomerInfo.Firstname     = txtFirstName.Text;
            CustomerInfo.Middleinitial = txtMIddleName.Text;
            CustomerInfo.Age           = Convert.ToInt32(txtAge.Text);
            CustomerInfo.Address       = txtAddress.Text;
            CustomerInfo.Tribe         = txtTribe.Text;

            bool isSuccessfull = CustomerBL.Insert(CustomerInfo);

            if (isSuccessfull)
            {
                MessageBox.Show("Record Successfully Addded!");
            }
            else
            {
                MessageBox.Show("Addding Record Failed!");
            }
        }
示例#2
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            pos.EL.Registrations.Customers CustomerInfo = new pos.EL.Registrations.Customers();
            CustomerInfo.Lastname      = txtLastName.Text;
            CustomerInfo.Firstname     = txtLastName.Text;
            CustomerInfo.Middleinitial = txtMiddleInitial.Text;
            CustomerInfo.Age           = Convert.ToInt32(txtAge.Text);
            CustomerInfo.Address       = txtAddress.Text;
            CustomerInfo.Tribe         = txtTribe.Text;


            pos.BL.Registrations.Customers CustomerBL = new pos.BL.Registrations.Customers();
            bool isSuccessfull = CustomerBL.Insert(CustomerInfo);

            if (isSuccessfull)
            {
                MessageBox.Show("Record Successfully Addded!");
                loaddata();
            }
            else
            {
                MessageBox.Show("Adding Record Failed!");
            }
        }