private void btnAgregarSucursal_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Sucursal sucursal = new Sucursal();
         sucursal.Nombre      = txtSucursalNombre.Text;
         sucursal.Descripcion = txtSucursalNombre.Text;
         if (sucursal.Descripcion == null)
         {
             sucursal.Descripcion = "";
         }
         DBAgenda.AgregarSucursal(sucursal);
         MessageBox.Show("Registro Añadido Exitosamente :)");
     }
     catch (Exception)
     {
         MessageBox.Show("Revise su información");
     }
 }
Esempio n. 2
0
 public Empleado(int id, string nombre, string telefono, string fax, string email, Departamento departamento, Sucursal sucursal, string usuario, string password)
     : this(id)
 {
     this.nombre       = nombre;
     this.telefono     = telefono;
     this.fax          = fax;
     this.email        = email;
     this.departamento = departamento;
     this.sucursal     = sucursal;
     this.usuario      = usuario;
     this.password     = password;
 }