public ViewChartSet GetChartSet(Int64 id, Guid userId) { Trace.Assert(_db != null); ObjectSet <ViewChartSet> os = _db.ViewChartSet; ViewChartSet result = os.Single(t => (t.ID == id) && (t.DataOwnerID == userId)); return(result); }
public ActionResult Create(ViewChartSet v) { try { _chartSetRepository.AddChartSet(v, GetUserId()); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Edit(int id) { try { ViewChartSet v = _chartSetRepository.GetChartSet(id, GetUserId()); return(View(v)); } catch (Exception e) { ExceptionMessageToViewBag(e); return(View("Error")); } }
public ActionResult Edit(int id, ViewChartSet v) { try { if (null != v) { v.ID = id; _chartSetRepository.UpdateChartSet(v, GetUserId()); } return(RedirectToAction("Index")); } catch { return(View()); } }
public ViewResult Index(Int64 id /*chart set id.*/) { try { Guid userId = GetUserId(); ViewChartSet v = _chartSetRepository.GetChartSet(id, userId); ViewBag.ChartSetName = v.Name; ViewBag.ChartSetID = v.ID; return(View(_chartSetsChartsRepository.GetChartSetChartsList(id, userId))); } catch (Exception e) { ExceptionMessageToViewBag(e); return(View("Error")); } }
public ActionResult View(int id) { try { Guid userId = GetUserId(); ViewChartSet v = _chartSetRepository.GetChartSet(id, userId); List <ViewChartSetsCharts> l = _chartSetsChartsRepository.GetChartSetChartsList(id, userId); ViewBag.ChartSetsCharts = l; return(View(v)); } catch (Exception e) { ExceptionMessageToViewBag(e); return(View("Error")); } }
public void UpdateChartSet(ViewChartSet v, Guid userId) { }
public void AddChartSet(ViewChartSet v, Guid userId) { DeviceRowAffected++; }
public void UpdateChartSet(ViewChartSet v, Guid userId) { Trace.Assert(_db != null); _db.UpdateChartSet(v.Name, v.ID, v.CellWidth, v.CellHeight, v.Rows, v.Cols, v.Margin, userId); }