Esempio n. 1
0
        public List <LookupModel> GetListLookup(string groupConfigName)
        {
            List <SqlParameter> parameters = new List <SqlParameter>()
            {
                new SqlParameter()
                {
                    ParameterName = "@GroupConfigName", Value = groupConfigName
                }
            };

            return(DataAccessFactory.Get <List <LookupModel> >("SelectLookupData", parameters, CommandType.StoredProcedure, dr => {
                List <LookupModel> dataReturn = new List <LookupModel>();
                while (dr.Read())
                {
                    dataReturn.Add(new LookupModel()
                    {
                        Id = Convert.ToInt32(dr["Id"]),
                        Ten = dr["Ten"].ToString()
                    });
                }

                return dataReturn;
            }));
        }