Example #1
0
        public ViewChartSetsCharts GetChartSetChart(long?chartSetId, Int64 chartId, Guid userId)
        {
            Trace.Assert(_db != null);
            ObjectSet <ViewChartSetsCharts> os     = _db.ViewChartSetsCharts;
            ViewChartSetsCharts             result =
                os.Single(
                    t =>
                    (t.ChartID == chartId) && (chartSetId == null || t.ChartSetID == chartSetId) &&
                    (t.DataOwnerID == userId));

            return(result);
        }
 public ActionResult AddChart(ViewChartSetsCharts v)
 {
     try
     {
         _chartSetsChartsRepository.AddChartSetsCharts(v, GetUserId());
         return(RedirectToAction("Index", new { id = v.ChartSetID }));
     }
     catch (Exception e)
     {
         ExceptionMessageToViewBag(e);
         return(View("Error"));
     }
 }
 public ViewResult Details(Int64 id /*chart set id*/, Int64 chartId)
 {
     try
     {
         ViewChartSetsCharts viewchartsetscharts = _chartSetsChartsRepository.GetChartSetChart(id, chartId,
                                                                                               GetUserId());
         return(View(viewchartsetscharts));
     }
     catch (Exception e)
     {
         ExceptionMessageToViewBag(e);
         return(View("Error"));
     }
 }
 public ActionResult Edit(Int64 id /*chart set id*/, Int64 chartId)
 {
     try
     {
         //  when id == null this results in empty record set error - this is normal,
         //  because this link should be hidden when chart set is not linked
         ViewChartSetsCharts viewchartsetscharts = _chartSetsChartsRepository.GetChartSetChart(id, chartId,
                                                                                               GetUserId());
         return(View(viewchartsetscharts));
     }
     catch (Exception e)
     {
         ExceptionMessageToViewBag(e);
         return(View("Error"));
     }
 }
 public ActionResult Edit(ViewChartSetsCharts viewchartsetscharts)
 {
     try
     {
         if (ModelState.IsValid)
         {
             _chartSetsChartsRepository.UpdateChartSetsCharts(viewchartsetscharts, GetUserId());
             return(RedirectToAction("Index", new { id = viewchartsetscharts.ChartSetID }));
         }
         return(View(viewchartsetscharts));
     }
     catch (Exception e)
     {
         ExceptionMessageToViewBag(e);
         return(View("Error"));
     }
 }
Example #6
0
 public void UpdateChartSetsCharts(ViewChartSetsCharts v, Guid userId)
 {
 }
Example #7
0
 public void AddChartSetsCharts(ViewChartSetsCharts v, Guid userId)
 {
     DeviceRowAffected++;
 }
Example #8
0
 public void UpdateChartSetsCharts(ViewChartSetsCharts v, Guid userId)
 {
     Trace.Assert(_db != null);
     _db.UpdateChartSetsCharts(v.ChartSetID, v.ChartID, v.ColIndex, v.RowIndex, userId);
 }