Esempio n. 1
0
        private List <string> GetLookupValuesByLookupName(string name)
        {
            List <string> values = new List <string>();

            OriginDataContext context = new OriginDataContext();

            OR_Lookup lookup = context.OR_Lookups
                               .Where(l => l.Name.Equals(name))
                               .FirstOrDefault();

            values = context.OR_LookupValues
                     .Where(v => v.RelatedOriginId.Equals(lookup.OriginId))
                     .Select(v => v.Value).ToList();

            return(values);
        }
Esempio n. 2
0
        public GetLookupResponse GetLookup(string name)
        {
            GetLookupResponse viewModel = new GetLookupResponse();

            OriginDataContext context = new OriginDataContext();

            OR_Lookup lookup = context.OR_Lookups
                               .Where(l => l.Name.Equals(name))
                               .FirstOrDefault();

            viewModel.Name = name;

            viewModel.Values = context.OR_LookupValues
                               .Where(v => v.RelatedOriginId.Equals(lookup.OriginId))
                               .Select(v => v.Value);

            return(viewModel);
        }
Esempio n. 3
0
 partial void UpdateOR_Lookup(OR_Lookup instance);
Esempio n. 4
0
 partial void DeleteOR_Lookup(OR_Lookup instance);
Esempio n. 5
0
 partial void InsertOR_Lookup(OR_Lookup instance);