コード例 #1
0
        public List <Dropdownlist> GetAllBankIDNNames(long bankid)
        {
            var query = _dbFirms.usp_GetAllBAnks();
            List <Dropdownlist> list = new List <Dropdownlist>();

            foreach (var item in query)
            {
                list.Add(new Dropdownlist()
                {
                    Value         = item.BankID,
                    Label         = item.BankName,
                    OptionalLabel = item.BankName,
                    Selected      = item.BankID == bankid ? true : false
                });
            }
            return(list);
        }