Beispiel #1
0
        public string GetHospitalCode(string user_group, string user_inst_code)
        {
            string result    = user_inst_code;
            var    hosp_list = UserGroupHospRespository.GetHospitalList(user_group);

            if (hosp_list.Count > 0)
            {
                result = hosp_list[0].HospitalCode;
            }

            return(result);
        }
Beispiel #2
0
        public List <SelectListItem> GetHospitalList(string user_group, bool include_HAHO)
        {
            List <SelectListItem> result = new List <SelectListItem>();
            var hosp = UserGroupHospRespository.GetHospitalList(user_group);

            if (hosp.Count() > 0)
            {
                result = hosp.Select(h => new SelectListItem()
                {
                    Value = h.HospitalCode.Trim(), Text = h.HospitalCode.Trim()
                }).ToList();
            }
            if (include_HAHO)
            {
                result.Add(new SelectListItem()
                {
                    Value = "HAHO", Text = "HAHO"
                });
            }

            return(result);
        }