示例#1
0
        private List <SelectListItem> BindDropDownClinic()
        {
            List <SelectListItem> _authorizedClinics = new List <SelectListItem>();

            if (Session["UserLogon"] != null)
            {
                var _account = (AccountModel)Session["UserLogon"];

                var _getClinics = _clinicHandler.GetAllClinic(_account.ClinicID);
                foreach (var item in _getClinics)
                {
                    _authorizedClinics.Add(new SelectListItem
                    {
                        Text  = item.Name,
                        Value = item.Id.ToString()
                    });
                }
            }

            return(_authorizedClinics);
        }