Example #1
0
        public ActionResult ManageProposedCourses_Create([DataSourceRequest] DataSourceRequest request, CRM_CourseMapping _mapping, long oid)
        {
            if (ModelState.IsValid)
            {
                _mapping.PersonID = oid;
                if (_PersonBAL.ManageCourse_DuplicationCheckBAL(_mapping) > 0)
                {
                    ModelState.AddModelError(lr.DubliocationHappen, lr.DubliocationHappen);
                }
                else
                {
                    _mapping.CreatedBy = CurrentUser.NameIdentifierInt64;
                    _mapping.CreatedOn = DateTime.Now;

                    _mapping.ID = _PersonBAL.ManageProposedCourses_CreateBAL(_mapping);
                }
            }
            var resultData = new[] { _mapping };

            return(Json(resultData.ToDataSourceResult(request, ModelState)));
        }