Example #1
0
        public IActionResult EntityManagerLocalNamespaceSave(LocalNamespaceModel model)
        {
            string sql = "INSERT INTO entitysettings.localnamespace(_createdsource, localnamespacename, localnamespacedescription, _createdby) VALUES ('Synapse Studio', @localnamespacename, @localnamespacedescription, @p_username);";

            var paramList = new List <KeyValuePair <string, string> >()
            {
                new KeyValuePair <string, string>("localnamespacename", model.LocalNamespaceName),
                new KeyValuePair <string, string>("localnamespacedescription", model.LocalNamespaceDescription == null ? "" : model.LocalNamespaceDescription),
                new KeyValuePair <string, string>("p_username", HttpContext.Session.GetString(SynapseSession.FullName))
            };

            DataServices.executeSQLStatement(sql, paramList);
            return(Json("OK"));
        }
Example #2
0
        public IActionResult EntityManagerLocalNamespace()
        {
            string sql       = "SELECT * FROM entitysettings.localnamespace ORDER BY localnamespacename; ";
            var    paramList = new List <KeyValuePair <string, string> >()
            {
            };

            DataSet                  dsLocalNamespace    = DataServices.DataSetFromSQL(sql, paramList);
            LocalNamespaceModel      localNamespaceModel = new LocalNamespaceModel();
            List <LocalNamespaceDto> localNamespaceDto   = dsLocalNamespace.Tables[0].ToList <LocalNamespaceDto>();

            localNamespaceModel.LocalNamespaceDto = localNamespaceDto;
            return(View(localNamespaceModel));
        }