Example #1
0
        public ActionResult SaveUpdateFormData(CommonSaveUpdateProp data)
        {
            FormsViewModel formsViewModel = new FormsViewModel();
            object         objectData     = data.formData;
            string         action         = data.action;
            string         menu           = data.menu;
            bool           IsSuccess      = formsViewModel.SaveUpdateFormData(objectData, action, menu);

            TempData["isSaveSuccessfully"] = IsSuccess;
            return(Json(new { status = IsSuccess }, JsonRequestBehavior.AllowGet));
        }
        public ActionResult SaveUpdateFormData(CommonSaveUpdateProp data)
        {
            string              msg                 = string.Empty;
            FormsViewModel      formsViewModel      = new FormsViewModel();
            object              objectData          = data.formData;
            string              action              = data.action;
            string              menu                = data.menu;
            string              needModificationMSG = data.needModificationMSG;
            Tuple <bool, bool?> IsSuccess           = formsViewModel.SaveUpdateFormData(objectData, action, menu, needModificationMSG, out msg);

            TempData["isSaveSuccessfully"] = IsSuccess.Item1;
            if (IsSuccess.Item2 != null)
            {
                TempData["isFailedToSentEmail"] = !IsSuccess.Item2;
            }
            return(Json(new { status = IsSuccess.Item1, msg = msg }, JsonRequestBehavior.AllowGet));
        }