/*public void AsignarValores()
         * {
         *  xc = new Cliente();
         *  try
         *  {
         *      xc.Nombre = txtNombre.Text;
         *      xc.ApPaterno = txtApPaterno.Text;
         *      xc.ApMaterno = txtApMaterno.Text;
         *      xc.NombreUsuario = txtNombreUsuario.Text;
         *      xc.Contrasenia = pswContrasenia.Password;
         *      xc.Email = txtEmail.Text;
         *      xc.NumCuenta = Int32.Parse(txtCodigo.Text);
         *  }
         *  catch
         *  {
         *      MessageBox.Show("Algun campo está incorrecto");
         *  }
         *
         * }*/

        private void BtnAgregar_Click(object sender, RoutedEventArgs e)
        {
            //AsignarValores();
            //cc.AgregarCliente(xc);
            //dtgClientes.Items.Refresh();
            //txtCodigo.Text = "";


            Cliente u = new Cliente();

            u.Nombre    = txtNombre.Text;
            u.ApPaterno = txtApPaterno.Text;
            u.ApMaterno = txtApMaterno.Text;
            u.Email     = txtEmail.Text;
            u.IdUsuario = Convert.ToInt32(this.txtNombreUsuario.Text);
            cu.InsertUser(u);

            txtNombre.Text        = "";
            txtApPaterno.Text     = "";
            txtApMaterno.Text     = "";
            txtNombreUsuario.Text = "";
            //pswContrasenia.Password = "";
            txtEmail.Text = "";
        }