public static List<Cliente> buscarClientes(string pNombre, string pApellido, int pDocuemtno) { DataAccessLayerCliente oDAL = new SQLCliente(); return oDAL.SearchClientes(pNombre, pApellido, pDocuemtno); }
//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(); } }
public static Cliente traerClientePorId(int pId) { DataAccessLayerCliente oDAL = new SQLCliente(); return oDAL.LoadById(pId); }
public static void eliminarCliente(int pId) { DataAccessLayerCliente oDAL = new SQLCliente(); try { oDAL.Delete(pId); } catch (SqlException) { throw new ClienteConExpedientes(); } }