Example #1
0
        public async Task <IActionResult> Create(ReceptionistCreateInputModel receptionistCreateInputModel)
        {
            if (!ModelState.IsValid)
            {
                await GetAllHospitals();

                return(View(receptionistCreateInputModel));
            }

            ReceptionistServiceModel receptionistServiceModel = AutoMapper.Mapper.Map <ReceptionistServiceModel>(receptionistCreateInputModel);

            await receptionistService.Create(receptionistCreateInputModel.Password, receptionistServiceModel);


            return(Redirect("/Administration/Receptionist/All"));
        }
        public async Task <IHttpActionResult> Create(CreateReceptionistRq rq)
        {
            var rs = await _receptionistService.Create(rq);

            return(ApiJson(rs));
        }