コード例 #1
0
        public ActionResult Create(ViewSVGDataElementState v, long chartId, long docId, string svgId,
                                   string valueIdentifier, string identifier
                                   /*user defined identifier of the data element*/)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    Guid userId = GetUserId();
                    v.DataOwnerID = userId;
                    _db.AddDataElementSate(v.LowLimit, v.State, v.DocID, v.ValueIdentifier, v.DataOwnerID);
                    return(RedirectToAction("Index", new { id = chartId, docID = docId, svgID = svgId, valueIdentifier, identifier }));
                }

                return(View(v));
            }
            catch (Exception e)
            {
                ExceptionMessageToViewBag(e);
                return(View("Error"));
            }
        }