Exemplo n.º 1
0
        private void CreateUnloadFile(DataBus dataBus, string releaseName, string unloadName)
        {
            JSCodeRunner codeRunner = new JSCodeRunner();

            codeRunner.Include("JSCode\\JsonEncode.js");
            codeRunner.Include("JSCode\\CreateUnloadRecord.js");
            string  codeToRun    = " return CreateUnloadRecord(\"" + unloadName + "\",\"" + releaseName + "\");";
            JsonRaw unloadEntity = codeRunner.Run <JsonRaw>(dataBus, codeToRun);
        }
        private Collection <EventMapFieldValue> GetEventValues(DataBus dataBus, string fileName, string queryString, string eventMapName)
        {
            JSCodeRunner codeRunner = new JSCodeRunner();

            codeRunner.Include("JSCode\\JsonEncode.js");
            codeRunner.Include("JSCode\\GetEventInFieldValues.js");
            string codeToRun = " return generateEventInFieldValues(\"" + fileName + "\",\"" + queryString + "\",\"" + eventMapName + "\");";
            Collection <EventMapFieldValue> fieldValues = codeRunner.Run <Collection <EventMapFieldValue> >(dataBus, codeToRun);

            return(fieldValues);
        }
Exemplo n.º 3
0
        private UnloadEntity GetUnloadEntity(DataBus dataBus, string unloadName)
        {
            JSCodeRunner codeRunner = new JSCodeRunner();

            codeRunner.Include("JSCode\\JsonEncode.js");
            codeRunner.Include("JSCode\\GetUnloadEntity.js");
            string       codeToRun    = " return GetUnloadEntity(\"" + unloadName + "\");";
            UnloadEntity unloadEntity = codeRunner.Run <UnloadEntity>(dataBus, codeToRun);

            return(unloadEntity);
        }
Exemplo n.º 4
0
        private AuditLogInfo GetAuditInfo(DataBus dataBus, string releaseName)
        {
            JSCodeRunner codeRunner = new JSCodeRunner();

            codeRunner.Include("JSCode\\JsonEncode.js");
            codeRunner.Include("JSCode\\GetAuditInfo.js");
            string       codeToRun    = " return GetAuditInfo(\"" + releaseName + "\");";
            AuditLogInfo auditLogInfo = codeRunner.Run <AuditLogInfo>(dataBus, codeToRun);

            return(auditLogInfo);
        }
 private Format GetFormatInfo(string formatName, string language)
 {
     using (DataBus dataBus = GetDataBus())
     {
         JSCodeRunner codeRunner = new JSCodeRunner();
         codeRunner.Include("JSCode\\JsonEncode.js");
         codeRunner.Include("JSCode\\GetFormatInfo.js");
         string codeToRun = " return GetFormatInfo(\"" + formatName + "\",\"" + language + "\");";
         Format format    = codeRunner.Run <Format>(dataBus, codeToRun);
         return(format);
     }
 }
 /// <summary>
 /// Get RAD panel from SM server.
 /// </summary>
 /// <param name="radName"></param>
 /// <param name="panel"></param>
 /// <returns></returns>
 private RADPanel GetRADPanel(string radName, string panel)
 {
     using (DataBus dataBus = GetDataBus())
     {
         JSCodeRunner codeRunner = new JSCodeRunner();
         codeRunner.Include("JSCode\\JsonEncode.js");
         codeRunner.Include("JSCode\\GetRADInfo.js");
         string   codeToRun = " return GetRADInfo(\"" + radName + "\",\"" + panel + "\");";
         RADPanel radPanel  = codeRunner.Run <RADPanel>(dataBus, codeToRun);
         return(radPanel);
     }
 }
 private RTContext GetContext(string radName, string panelName)
 {
     using (DataBus dataBus = GetDataBus())
     {
         JSCodeRunner codeRunner = new JSCodeRunner();
         codeRunner.Include("JSCode\\JsonEncode.js");
         codeRunner.Include("JSCode\\GetRTContext.js");
         string    codeToRun = " return GetContext(\"" + radName + "\",\"" + panelName + "\");";
         RTContext context   = codeRunner.Run <RTContext>(dataBus, codeToRun);
         return(context);
     }
     //return null;
 }
        private Format GetFormatInfo(string formatName, string language)
        {
            string sessionId           = textBoxCookieId.Text.Trim();
            string authorizationString = textBoxAuthorization.Text.Trim();

            ConnectionInfo    currentConnectionInfo = comboBoxServer.SelectedItem as ConnectionInfo;
            SessionCache      sessionCache          = new SessionCache();
            ConnectionSession connectionSession     = sessionCache[currentConnectionInfo];
            DataBus           dataBus = connectionSession.GetDataBus(sessionId, authorizationString);

            JSCodeRunner codeRunner = new JSCodeRunner();

            codeRunner.Include("JSCode\\JsonEncode.js");
            codeRunner.Include("JSCode\\GetFormatInfo.js");
            string codeToRun = " return GetFormatInfo(\"" + formatName + "\",\"" + language + "\");";
            Format format    = codeRunner.Run <Format>(dataBus, codeToRun);

            return(format);
        }
        private RADPanel GetRADPanel(string radName, string panel)
        {
            string sessionId           = textBoxCookieId.Text.Trim();
            string authorizationString = textBoxAuthorization.Text.Trim();

            ConnectionInfo    currentConnectionInfo = comboBoxServer.SelectedItem as ConnectionInfo;
            SessionCache      sessionCache          = new SessionCache();
            ConnectionSession connectionSession     = sessionCache[currentConnectionInfo];
            DataBus           dataBus = connectionSession.GetDataBus(sessionId, authorizationString);

            JSCodeRunner codeRunner = new JSCodeRunner();

            codeRunner.Include("JSCode\\JsonEncode.js");
            codeRunner.Include("JSCode\\GetRADInfo.js");
            string   codeToRun = " return GetRADInfo(\"" + radName + "\",\"" + panel + "\");";
            RADPanel radPanel  = codeRunner.Run <RADPanel>(dataBus, codeToRun);

            return(radPanel);
        }