Ejemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            Client myClient = new Client();
            UseDB  uDB      = new UseDB();

            myClient.Name        = txtbName.Text;
            myClient.Phone       = Convert.ToInt32(txtbPhone.Text);
            myClient.PassportSer = txtbPassSer.Text;
            myClient.PassportNum = Convert.ToInt32(txtbPassNum.Text);
            uDB.OpenConnection();
            uDB.InsertClient(myClient);
            uDB.CloseCon();
            this.Hide();
        }