Beispiel #1
0
 public static List<Cliente> buscarClientes(string pNombre, string pApellido, int pDocuemtno)
 {
     DataAccessLayerCliente oDAL = new SQLCliente();
     return oDAL.SearchClientes(pNombre, pApellido, pDocuemtno);
 }
Beispiel #2
0
 //CLIENTES
 public static void guardarCliente(Cliente pCliente, string pOperacion)
 {
     DataAccessLayerCliente oDAL = new SQLCliente();
     if (pOperacion == "Insert")
     {
         oDAL.Insert(pCliente);
     }
     else if (pOperacion == "Update")
     {
         oDAL.Update(pCliente);
     }
     else
     {
         throw new Exception();
     }
 }
Beispiel #3
0
 public static Cliente traerClientePorId(int pId)
 {
     DataAccessLayerCliente oDAL = new SQLCliente();
     return oDAL.LoadById(pId);
 }
Beispiel #4
0
 public static void eliminarCliente(int pId)
 {
     DataAccessLayerCliente oDAL = new SQLCliente();
     try
     {
         oDAL.Delete(pId);
     }
     catch (SqlException)
     {
         throw new ClienteConExpedientes();
     }
 }