Exemple #1
0
        public void Modificar(ESucursal modificarSucursal)
        {
            try
            {
                if (modificarSucursal.Nombre.Length == 0)
                {
                    throw new ArgumentException("Ingrese el nombre del Sucursal");
                }
                if (modificarSucursal.Ciudad.Length == 0)
                {
                    throw new ArgumentException("Íngrese la cuidad del Sucursal");
                }
                if (modificarSucursal.Direccion.Length == 0)
                {
                    throw new ArgumentException("Ingrese la direccion del Sucursal");
                }
                if (modificarSucursal.Telefono == null)
                {
                    throw new ArgumentException("Ingrese el numero telefonico del sucursal");
                }

                DSucursal gestionsuc = new DSucursal();
                gestionsuc.Modificar(modificarSucursal);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #2
0
 public void ELiminar(ESucursal eliminarSucursal)
 {
     try
     {
         DSucursal gestionelimi = new DSucursal();
         gestionelimi.Eliminar(eliminarSucursal);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #3
0
 public List <ESucursal> obtenerSucursal()
 {
     try
     {
         DSucursal datpsSucu = new DSucursal();
         return(datpsSucu.obtenerSucursal());
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }