public EAN Edit(EAN model) { entities.EAN.Attach(model); entities.ObjectStateManager.ChangeObjectState(model, EntityState.Modified); this.Commit(); return model; }
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); } }
public ActionResult DetailsAlert(EAN model) { try { return PartialView("_Details_Alertas", new AlertasRepository().GetAlertaById(Convert.ToInt32(model.Id_alerta))); } catch { return RedirectToAction("Details"); } }
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); } }
public ActionResult Create_EAN(int id) { try { EAN _ean = new EAN(); _ean.Id_alerta = id; return PartialView(_ean); } catch { return RedirectToAction("Index"); } }
public EAN Create(EAN model) { entities.EAN.AddObject(model); this.Commit(); return model; }
/// <summary> /// Deprecated Method for adding a new object to the EAN EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToEAN(EAN eAN) { base.AddObject("EAN", eAN); }
/// <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; }