public JsonResult Create(DataReferenceValueEdit model)
 {
     if (ModelState.IsValid)
     {
         DataReferenceValue dataRefValue = new DataReferenceValue()
         {
             DataReferenceID = model.DataReferenceID,
             Value = model.Value,
             Description = model.Description,
             Status = model.Status,
             ChangerID = UserManager.Current.ID.Value,
             CreatorID = UserManager.Current.ID.Value
         };
         return Json(DataReferenceValueManager.Save(dataRefValue));
     }
     return Json(SaveOperationResult.NotValid);
 }
 public JsonResult Edit(DataReferenceValueEdit model)
 {
     if (ModelState.IsValid)
     {
         DataReferenceValue dataRefValue = DataReferenceValueManager.GetByID(model.ID.Value);
         dataRefValue.DataReferenceID = model.DataReferenceID;
         dataRefValue.Value = model.Value;
         dataRefValue.Description = model.Description;
         dataRefValue.Status = model.Status;
         dataRefValue.ChangerID = UserManager.Current.ID.Value;
         dataRefValue.Changed = DateTime.Now;
         return Json(DataReferenceValueManager.Save(dataRefValue));
     }
     return Json(SaveOperationResult.NotValid);
 }