コード例 #1
0
        public async Task <ActionResult> SpecialityInfo(DoctorProfileEditModel model)
        {
            controllerName = "Doctor";
            string strUrl = APIProvider.APIGenerator(controllerName, APIConstant.ACTION_INSERT);
            var    result = await APIProvider.Authorize_DynamicTransaction <DoctorProfileEditModel, bool>(model, _userSession.BearerToken, strUrl, APIConstant.API_Resource_CORE, ARS.IgnoredARS);

            if (result)
            {
                TempData["Alert"] = ApplicationGenerator.RenderResult(ApplicationGenerator.TypeResult.SUCCESS, ApplicationGenerator.GeneralActionMessage(APIConstant.ACTION_UPDATE, ApplicationGenerator.TypeResult.SUCCESS));
            }
            else
            {
                TempData["Alert"] = ApplicationGenerator.RenderResult(ApplicationGenerator.TypeResult.FAIL, ApplicationGenerator.GeneralActionMessage(APIConstant.ACTION_UPDATE, ApplicationGenerator.TypeResult.FAIL));
            }

            //var vmodel = new DoctorProfileViewModel() {
            //    Degrees = model.Degrees,
            //    DepartmentId = model.DepartmentId,
            //    Speciality = model.Speciality,
            //    Office = model.Office,
            //    Training = model.Training,
            //    Workdays = model.Workdays,
            //    UserId = model.UserId
            //};

            return(RedirectToAction("Overview"));
        }
コード例 #2
0
        public async Task <bool> Transaction(DoctorProfileEditModel model, char action)
        {
            var data = Mapper.Map <DoctorProfileEdit>(model);

            return(await _doctor.Transaction(data, action));
        }