Пример #1
0
        public JsonResult UpdatePrice(BLL.Precio price)
        {
            price.modifica_precio();
            string message = "Success";

            return(Json(message, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
 /// <summary>
 /// Llama a método Update de PrecioDAL y le pasa una entidad para actualizarla en la base
 /// </summary>
 /// <param name="entity">Precio</param>
 public void Update(Precio entity)
 {
     try
     {
         precioDAL.Update(entity);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #3
0
 /// <summary>
 /// Llama a método Insert de PrecioDAL y le pasa una entidad para insertarla en la base
 /// </summary>
 /// <param name="entity">Precio</param>
 /// <returns>Precio</returns>
 public void Insert(Precio entity)
 {
     try
     {
         precioDAL.Insert(entity);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #4
0
        // View PriceList
        public ActionResult PricesList(BLL.Precio precio)
        {
            List <PriceModel> list    = new List <PriceModel>();
            DataSet           dataSet = new DataSet();

            dataSet = precio.lista_precios();
            foreach (DataRow row in dataSet.Tables[0].Rows)
            {
                list.Add(new PriceModel
                {
                    ID_Consecutivo = row["ID_Consecutivo"].ToString(),
                    Tipo           = row["Tipo"].ToString(),
                    Precio         = row["Precio"].ToString()
                });
            }
            return(View(list));
        }
Пример #5
0
        public ActionResult SavePrice(BLL.Precio price)
        {
            price.agregar_precio();

            return(Content("Success!"));
        }