示例#1
0
        public static Boolean Add(Commons.Currency model)
        {
            using (IndexEntities db = new IndexEntities())
            {
                db.spi_Currency(model.IdCountry, model.Name, model.Description, model.Symbol, model.ExchangeRate, model.RegisterUser);
            }

            return(true);
        }
示例#2
0
        public static Boolean Delete(Commons.Currency model)
        {
            using (IndexEntities db = new IndexEntities())
            {
                db.spd_Currency(model.Id);
            }

            return(true);
        }
        public HttpResponseMessage Delete(Commons.Currency model)
        {
            HttpResponseMessage respuesta = null;

            try
            {
                Boolean result = Dal.Currency.Delete(model);
                respuesta = Request.CreateResponse(HttpStatusCode.OK, result);
            }
            catch (Exception ex)
            {
                respuesta = Request.CreateErrorResponse(HttpStatusCode.Conflict, (ex.InnerException == null) ? ex.Message : ex.InnerException.Message);
            }
            return(respuesta);
        }