Ejemplo n.º 1
0
 public COMPTA_Currency CreateCurrency(COMPTA_Currency currencyToAdd)
 {
     using (SUPERPEntities context = new SUPERPEntities(false))
     {
         var currency = context.COMPTA_Currency.Add(currencyToAdd);
         context.SaveChanges();
         return(currency);
     }
 }
Ejemplo n.º 2
0
        public COMPTA_Currency EditCurrency(COMPTA_Currency currencyToEdit)
        {
            using (SUPERPEntities context = new SUPERPEntities(false))
            {
                var currency = context.COMPTA_Currency.Find(currencyToEdit.id);

                if (currency == null)
                {
                    return(null);
                }

                currency = currencyToEdit;
                context.SaveChanges();
                return(currency);
            }
        }