コード例 #1
0
        public ActionResult Destroy(IntakeVM obj)
        {
            if (ModelState.IsValid)
            {
                repository.IntakeDelete(obj);
            }

            return(Json(obj.CaseId));
        }
コード例 #2
0
        public ActionResult Create(IntakeVM obj)
        {
            int id = 0;

            if (ModelState.IsValid)
            {
                obj.CreatedById = Guid.Parse(User.Identity.GetUserId());
                obj.Status      = "Open";
                id = repository.IntakeInsert(obj);
            }

            return(Json(id));
        }
コード例 #3
0
        public static bool IsCaseReferralChecked(IntakeVM model, int referralId)
        {
            bool result = false;

            if (model != null)
            {
                if (model.ReferralSources != null)
                {
                    result = model.ReferralSources.Any(r => r.ReferralSourceId == referralId);
                }
            }

            return(result);
        }
コード例 #4
0
 public static Case GetIntakeFromViewModel(IntakeVM obj)
 {
     return(new Case
     {
         CaseId = obj.CaseId,
         CaseNo = obj.CaseNo,
         TypeId = obj.TypeId,
         Status = obj.Status,
         CreationDate = obj.CreationDate,
         CreatedById = obj.CreatedById,
         MayWeRecordYourInterview = obj.MayWeRecordYourInterview,
         Narrative = obj.Narrative,
         FirstName = obj.FirstName,
         LastName = obj.LastName,
         OrganizationName = obj.OrganizationName,
         Gender = obj.Gender,
         AcademicStatus = obj.AcademicStatus,
         SocialStatus = obj.SocialStatus,
         CitizenshipStatus = obj.CitizenshipStatus,
         IUStudentId = obj.IUStudentId,
         EnrollmentVerified = obj.EnrollmentVerified,
         StudentActivityFeeVerified = obj.StudentActivityFeeVerified
     });
 }