コード例 #1
0
        public PartialViewResult AddEditHospital(long?id)
        {
            HospitalViewModel model = new HospitalViewModel();

            if (id.HasValue && id.Value != 0)
            {
                var hospital = _hospitalService.GetHospitalbyId(id.Value).SingleOrDefault();
                if (hospital != null)
                {
                    model.HospitalAddress     = hospital.HospitalAddress;
                    model.HospitalName        = hospital.HospitalName;
                    model.HospitalPhoneNumber = hospital.HospitalPhoneNumber;
                    model.Url        = hospital.Url;
                    model.Host       = hospital.Host;
                    model.SecureUrl  = hospital.SecureUrl;
                    model.SslEnabled = hospital.SslEnabled;
                }
            }

            return(PartialView("_AddEditHospital", model));
        }