Ejemplo n.º 1
0
        public string DropdownBitsJson(string name)
        {
            var f    = Views.GetStandardExtraValues(DbUtil.Db, Table).Single(ee => ee.Name == name);
            var list = ListExtraValues().Where(pp => f.Codes.Contains(pp.Field)).ToList();
            var q    = from c in f.Codes
                       join e in list on c equals e.Field into j
                       from e in j.DefaultIfEmpty()
                       select new
            {
                value = c,
                text  = Value.NoPrefix(c)
            };

            return(JsonConvert.SerializeObject(q.ToArray()));
        }
Ejemplo n.º 2
0
        public string DropdownBitsJson(string name)
        {
            var f    = Views.GetStandardExtraValues(CurrentDatabase, Table, false, Location).Single(ee => ee.Name == name);
            var list = ListExtraValues().Where(pp => f.Codes.Select(x => x.Text).Contains(pp.Field)).ToList();
            var q    = from c in f.Codes
                       join e in list on c.Text equals e.Field into j
                       from e in j.DefaultIfEmpty()
                       select new
            {
                value = c.Text,
                text  = Value.NoPrefix(c.Text)
            };

            return(JsonConvert.SerializeObject(q.ToArray()));
        }