public List <cf_Lcr> ObtenerListaControles() { List <cf_Lcr> ListaControles = new List <cf_Lcr>(); ListaControles = InstanceOF.Obtener_Objeto(string.Format("select * from Lcr"), typeof(cf_Lcr)) ?? new List <cf_Lcr>(); return(ListaControles); }
public List <cf_Lcr> ListarControles() { List <cf_Lcr> lista = new List <cf_Lcr>(); lista = InstanceOF.Obtener_Objeto(string.Format("select * from Lcr"), typeof(cf_Lcr)) ?? new List <cf_Lcr>(); return(lista); }
public Dictionary <int, string> GrupoInstrumento() { Dictionary <int, string> Grupo = new Dictionary <int, string>(); List <cf_GrupoInstrumento> result = new List <cf_GrupoInstrumento>(); result = InstanceOF.Obtener_Objeto(string.Format("select * from GrupoInstrumento"), typeof(cf_GrupoInstrumento)) ?? new List <cf_GrupoInstrumento>(); foreach (cf_GrupoInstrumento grupo in result) { Grupo.Add(grupo.Id, grupo.Descripcion); } return(Grupo); }
public List <KeyValuePair <string, int> > ObtenerCliente(int id) { List <cf_Cliente> cliente = new List <cf_Cliente>(); cliente = InstanceOF.Obtener_Objeto(string.Format("select * from ClienteLcr where ClienteId = {0}", id), typeof(cf_Cliente)) ?? new List <cf_Cliente>(); List <KeyValuePair <string, int> > valores = new List <KeyValuePair <string, int> >(); valores.Add(new KeyValuePair <string, int>("Segmento", Convert.ToInt16(cliente[0].SegmentoId))); valores.Add(new KeyValuePair <string, int>("Clasificacion", Convert.ToInt16(cliente[0].ClasificacionCreditoId))); return(valores); }
public Dictionary <int, string> ObtenerClasificacion() { List <cf_ClasificacionCredito> ListaClasificacion = new List <cf_ClasificacionCredito>(); ListaClasificacion = InstanceOF.Obtener_Objeto(string.Format("select Id, Valor from ClasificacionCredito"), typeof(cf_ClasificacionCredito)) ?? new List <cf_ClasificacionCredito>(); Dictionary <int, string> datos = new Dictionary <int, string>(); foreach (cf_ClasificacionCredito clas in ListaClasificacion) { datos.Add(Convert.ToInt32(clas.Id), clas.Valor.ToString()); } return(datos); }
public Dictionary <int, string> ObtenerSegmentos() { List <cf_Segmento> ListaSegmentos = new List <cf_Segmento>(); ListaSegmentos = InstanceOF.Obtener_Objeto(string.Format("select Id, NombreSegmento from segmento"), typeof(cf_Segmento)) ?? new List <cf_Segmento>(); Dictionary <int, string> datos = new Dictionary <int, string>(); foreach (cf_Segmento seg in ListaSegmentos) { datos.Add(Convert.ToInt32(seg.Id), seg.NombreSegmento.ToString()); } return(datos); }
// metodo replicado para clientes globales public List <KeyValuePair <string, string> > CargarClientes() { List <cf_Cliente> ListaClientes = new List <cf_Cliente>(); ListaClientes = InstanceOF.Obtener_Objeto(string.Format("select Id, NombreCliente, Codigo, Subcodigo from Cliente"), typeof(cf_Cliente)) ?? new List <cf_Cliente>(); List <KeyValuePair <string, string> > nombres = new List <KeyValuePair <string, string> >(); foreach (cf_Cliente cliente in ListaClientes) { nombres.Add(new KeyValuePair <string, string>(cliente.NombreCliente.TrimEnd() + ", " + cliente.Codigo + "-" + cliente.SubCodigo, cliente.Id.ToString())); } return(nombres); }
public List <cf_Lcr> ObtenerListaControles(int ClienteId) { List <cf_Lcr> ListaControles = new List <cf_Lcr>(); ListaControles = InstanceOF.Obtener_Objeto(string.Format(@" select Lcr.* from ClienteLcr inner join Lcr on ClienteLcr.LcrId = Lcr.Id inner join CodigoLcr on Lcr.Id = CodigoLcr.LcrId where ClienteId = " + ClienteId), typeof(cf_Lcr)) ?? new List <cf_Lcr>(); return(ListaControles); }
public void ModificarRiesgoCliente(int id, int Clasificacion, int Segmento) { List <cf_Cliente> cliente = new List <cf_Cliente>(); cf_ClasificaciconRiesgoCliente RiesgoCliente = new cf_ClasificaciconRiesgoCliente(); cliente = InstanceOF.Obtener_Objeto(string.Format("select * from Cliente where Id = {0}", id), typeof(cf_Cliente)) ?? new List <cf_Cliente>(); RiesgoCliente.ClasificacionCreditoId = cliente[0].ClasificacionCreditoId; RiesgoCliente.ClienteId = cliente[0].Id; RiesgoCliente.Fecha = DateTime.Today; cliente[0].ClasificacionCreditoId = Clasificacion; cliente[0].SegmentoId = Segmento; bool estadoHistorial = AlmacenaHistorial(RiesgoCliente); bool estadoUpdate = UpdateCliente(cliente[0]); }