Ejemplo n.º 1
0
 public ActionResult DreamMV(DreamsMV dream)
 {
     try
     {
         DreamsMV dreammv = new DreamsMV();
         dreammv.IBONum  = ibo.IBONum;
         dreammv.vision  = dream.vision;
         dreammv.mission = dream.mission;
         dreammv.purpose = dream.purpose;
         if (dream.dreamMVId == 0)
         {
             bool result = IBOVirtualAPI.CreateDreamMV(dreammv);
             dreammv = IBOVirtualAPI.GetDreamMV(ibo.IBONum);
         }
         else
         {
             dreammv.dreamMVId = dream.dreamMVId;
             string result = IBOVirtualAPI.UpdateDreamMV(dreammv.dreamMVId.ToString(), dreammv);
         }
         return(Json(new { success = true, id = dreammv.dreamMVId }));
     }
     catch
     {
         return(Json(new { success = false, id = 0 }));
     }
 }