public List <clsCliente> ConsultarClientes(string strServicio) { List <clsCliente> lstCliente = new List <clsCliente>(); DataTable dtRespuesta = null; clsPersistenciaCliente objPersistenciaCliente = new clsPersistenciaCliente(); try { dtRespuesta = objPersistenciaCliente.ConsultarCliente(strServicio); if (dtRespuesta != null) { foreach (DataRow dr in dtRespuesta.Rows) { clsCliente objCliente = new clsCliente(); objCliente.idCliente = int.Parse(dr[0].ToString()); objCliente.identificacionCliente = dr[1].ToString(); objCliente.nombreCliente = dr[2].ToString(); objCliente.apellidoCliente = dr[3].ToString(); objCliente.telefonoCliente = dr[4].ToString(); objCliente.emailCliente = dr[5].ToString(); lstCliente.Add(objCliente); } } } catch (Exception) { throw; } return(lstCliente); }
internal bool EliminarCliente(string strServicio, int idCliente) { clsPersistenciaCliente objPersistenciaCliente = new clsPersistenciaCliente(); bool retorno = false; try { retorno = objPersistenciaCliente.EliminarCliente(strServicio, idCliente); } catch (Exception) { throw; } return(retorno); }
internal bool ModificarCliente(string strServicio, int idCliente, string strIdentificacionCliente, string strNombreCliente, string strApellidoCliente, string strTelefonoCliente, string strEmailCliente) { clsPersistenciaCliente objPersistenciaCliente = new clsPersistenciaCliente(); bool retorno = false; try { retorno = objPersistenciaCliente.ModificarCliente(strServicio, idCliente, strIdentificacionCliente, strNombreCliente, strApellidoCliente, strTelefonoCliente, strEmailCliente); } catch (Exception) { throw; } return(retorno); }