Ejemplo n.º 1
0
 public EAN Edit(EAN model)
 {
     entities.EAN.Attach(model);
       entities.ObjectStateManager.ChangeObjectState(model, EntityState.Modified);
       this.Commit();
       return model;
 }
Ejemplo n.º 2
0
        public ActionResult Edit_EAN(EAN model, FormCollection formCollection)
        {
            try
              {

            new EANRepository().Edit(model);

            return Json(JsonResponseFactory.SuccessResponse(), JsonRequestBehavior.DenyGet);

              }
              catch (Exception ex)
              {
            TempData["ErrorMessage"] = ex.Message;
            return View(model);
              }
        }
Ejemplo n.º 3
0
 public ActionResult DetailsAlert(EAN model)
 {
     try
       {
     return PartialView("_Details_Alertas", new AlertasRepository().GetAlertaById(Convert.ToInt32(model.Id_alerta)));
       }
       catch
       {
     return RedirectToAction("Details");
       }
 }
Ejemplo n.º 4
0
        public ActionResult Delete_EAN(EAN model, FormCollection formCollection)
        {
            try
              {

            new EANRepository().Delete(Convert.ToInt32(model.Id_ean));
            return Json(JsonResponseFactory.SuccessResponse(), JsonRequestBehavior.DenyGet);
              }
              catch (Exception ex)
              {
            TempData["ErrorMessage"] = ex.Message;
            return View(model);
              }
        }
Ejemplo n.º 5
0
 public ActionResult Create_EAN(int id)
 {
     try
       {
     EAN _ean = new EAN();
     _ean.Id_alerta = id;
     return PartialView(_ean);
       }
       catch
       {
     return RedirectToAction("Index");
       }
 }
Ejemplo n.º 6
0
 public EAN Create(EAN model)
 {
     entities.EAN.AddObject(model);
       this.Commit();
       return model;
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Deprecated Method for adding a new object to the EAN EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToEAN(EAN eAN)
 {
     base.AddObject("EAN", eAN);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Create a new EAN object.
 /// </summary>
 /// <param name="id_ean">Initial value of the Id_ean property.</param>
 public static EAN CreateEAN(global::System.Int32 id_ean)
 {
     EAN eAN = new EAN();
     eAN.Id_ean = id_ean;
     return eAN;
 }