コード例 #1
0
        public List <Dropdownlist> GetAllOrgDocIdForMadrassa(long id)
        {
            // long id = 11;
            var query = _dbFirms.usp_GetAllFileNamesForMadrassa();
            //var query = _dbFirms.ORGDOCNAMEs.Where(x => x.IsActive == true).ToList();
            List <Dropdownlist> list = new List <Dropdownlist>();

            foreach (var item in query)
            {
                list.Add(new Dropdownlist()
                {
                    Value         = item.OrgDoc_ID,
                    Label         = item.OrgName,
                    OptionalLabel = item.OrgRegNo,
                    Selected      = item.OrgDoc_ID == id ? true : false
                });
            }
            return(list);
        }