internal void CargarFormasDePago() { FormasDePago = Enum <FormaPago> .ToKeyValuePairList().ToList(); FormasDePago.Insert(0, new KeyValuePair <FormaPago?, string>(null, Resources.comboTodos)); NotifyPropertyChanged(nameof(FormasDePago)); }
public int DatoTarjeta(string descripcion) { AccesoDatos datos = new AccesoDatos(); FormasDePago aux = new FormasDePago(); try { datos.Agregar("@descripcion", descripcion); datos.Setear("select id from FormaPago where Descripcion = @descripcion"); datos.Consultar(); if (datos.Lector.Read()) { aux.id = datos.Lector.GetInt32(0); } return(aux.id); } finally { datos.Cerrar(); } }