예제 #1
0
        public void parse()
        {
            var parser  = new SqlDesignParser();
            var refDao  = new RefDataDao();
            var refData = refDao.getRefData();

            defs = new EntityModel();
            parser.parse(refData.defTpl.srcText, defs);
        }
예제 #2
0
        public void OnPost()
        {
            var parser = new SqlDesignParser();
            var defs   = new EntityModel();

            parser.parse(scrText, defs);
            controls = defs.controls.Select((c, i) => new SelectListItem
            {
                Value = i.ToString(),
                Text  = c.controlName
            }).ToList();
            defs.control = defs.controls.Count > 0 ? defs.controls[controlId] : null;
            var set = new RestCrudSet();

            snippets = set.getCode(genMode, defs);
            scrText  = "";
        }