示例#1
0
        public void GetApplicantByIdTest()
        {
            ApplicantService          target        = new ApplicantService(); // TODO: Initialize to an appropriate value
            string                    applicantCode = "1";                    // TODO: Initialize to an appropriate value
            string                    testingNo     = "579906";               // TODO: Initialize to an appropriate value
            string                    examPlaceCode = "10111";                // TODO: Initialize to an appropriate value
            ResponseService <DataSet> expected      = null;                   // TODO: Initialize to an appropriate value
            ResponseService <DataSet> actual;

            actual = target.GetApplicantById(applicantCode, testingNo, examPlaceCode);
        }
示例#2
0
        public ActionResult GetApplicantDetail(int id)
        {
            var applicant = ApplicantService.GetApplicantById(id);

            if (applicant == null)
            {
                return(Json(new { model = "failed", modelList = new[] { "Детальної інформації не знайдено!" } }));
            }

            var result = Mapper.Map <Applicant, ApplicantFormModel>(applicant);

            return(Json(new { model = "confirmed", applicant = result }, JsonRequestBehavior.AllowGet));
        }
示例#3
0
        public async Task <ActionResult> DeleteApplicant(BaseFormModel model)
        {
            var applicant = ApplicantService.GetApplicantById(int.Parse(model.Id));

            if (applicant == null)
            {
                return(Json(new { model = "failed", modelList = "Абітурієнта не знайдено!" }, JsonRequestBehavior.AllowGet));
            }

            var result = await ApplicantService.DeleteApplicant(applicant);

            return(Json(new { model = result.Successed ? "confirmed" : "failed", modelList = result.Message, type = "remove" }, JsonRequestBehavior.AllowGet));
        }