Example #1
0
 internal void toRecords(string[] response)
 {
     if (response == null || response.Length == 0)
     {
         return;
     }
     records = new List <CallBackFileRecord>(response.Length);
     for (int i = 0; i < response.Length; i++)
     {
         string[]           flds = StringUtils.split(response[i], StringUtils.CARET);
         CallBackFileRecord rec  = new CallBackFileRecord();
         rec.Fields["IEN"].VistaValue            = flds[0];
         rec.Fields["CALLBACKTYPE"].VistaValue   = flds[1];
         rec.Fields["CALLBACKPORT"].VistaValue   = flds[2];
         rec.Fields["CALLBACKSERVER"].VistaValue = flds[3];
         rec.Fields["URLSTRING"].VistaValue      = flds[4];
         records.Add(rec);
     }
 }
Example #2
0
 internal void toRecords(string[] response)
 {
     if (response == null || response.Length == 0)
     {
         return;
     }
     records = new List<CallBackFileRecord>(response.Length);
     for (int i = 0; i < response.Length; i++)
     {
         string[] flds = StringUtils.split(response[i], StringUtils.CARET);
         CallBackFileRecord rec = new CallBackFileRecord();
         rec.Fields["IEN"].VistaValue = flds[0];
         rec.Fields["CALLBACKTYPE"].VistaValue = flds[1];
         rec.Fields["CALLBACKPORT"].VistaValue = flds[2];
         rec.Fields["CALLBACKSERVER"].VistaValue = flds[3];
         rec.Fields["URLSTRING"].VistaValue = flds[4];
         records.Add(rec);
     }
 }
Example #3
0
        internal static DdrFiler buildAddRecordQuery(AbstractConnection cxn, RemoteApplicationRecord rec, CallBackFileRecord subrec)
        {
            DdrFiler query = new DdrFiler(cxn);
            query.Operation = "ADD";
            ArrayList lst = new ArrayList(7);
            VistaField f = rec.Fields["NAME"];
            lst.Add(FILE_NUMBER + "^" + f.VistaNumber + "^+1,^" + f.VistaValue);
            f = rec.Fields["CONTEXTOPTION"];
            VistaUserDao dao = new VistaUserDao(cxn);
            lst.Add(FILE_NUMBER + "^" + f.VistaNumber + "^+1,^" + dao.getOptionIen(f.VistaValue));
            f = rec.Fields["APPLICATIONCODE"];
            lst.Add(FILE_NUMBER + "^" + f.VistaNumber + "^+1,^" + f.VistaValue);

            f = subrec.Fields["CALLBACKTYPE"];
            lst.Add(CALLBACK_FILE_NUMBER + "^" + f.VistaNumber + "^+2,+1^" + f.VistaValue);
            f = subrec.Fields["CALLBACKPORT"];
            lst.Add(CALLBACK_FILE_NUMBER + "^" + f.VistaNumber + "^+2,+1^" + f.VistaValue);
            f = subrec.Fields["CALLBACKSERVER"];
            lst.Add(CALLBACK_FILE_NUMBER + "^" + f.VistaNumber + "^+2,+1^" + f.VistaValue);
            f = subrec.Fields["URLSTRING"];
            lst.Add(CALLBACK_FILE_NUMBER + "^" + f.VistaNumber + "^+2,+1^" + f.VistaValue);

            query.Args = (string[])lst.ToArray(typeof(string));
            return query;
        }
Example #4
0
 public static string addRecord(AbstractConnection cxn, RemoteApplicationRecord rec, CallBackFileRecord subrec)
 {
     DdrFiler query = buildAddRecordQuery(cxn, rec, subrec);
     string response = query.execute();
     return response;
 }
Example #5
0
        internal static DdrFiler buildAddRecordQuery(AbstractConnection cxn, RemoteApplicationRecord rec, CallBackFileRecord subrec)
        {
            DdrFiler query = new DdrFiler(cxn);

            query.Operation = "ADD";
            ArrayList  lst = new ArrayList(7);
            VistaField f   = rec.Fields["NAME"];

            lst.Add(FILE_NUMBER + "^" + f.VistaNumber + "^+1,^" + f.VistaValue);
            f = rec.Fields["CONTEXTOPTION"];
            VistaUserDao dao = new VistaUserDao(cxn);

            lst.Add(FILE_NUMBER + "^" + f.VistaNumber + "^+1,^" + dao.getOptionIen(f.VistaValue));
            f = rec.Fields["APPLICATIONCODE"];
            lst.Add(FILE_NUMBER + "^" + f.VistaNumber + "^+1,^" + f.VistaValue);

            f = subrec.Fields["CALLBACKTYPE"];
            lst.Add(CALLBACK_FILE_NUMBER + "^" + f.VistaNumber + "^+2,+1^" + f.VistaValue);
            f = subrec.Fields["CALLBACKPORT"];
            lst.Add(CALLBACK_FILE_NUMBER + "^" + f.VistaNumber + "^+2,+1^" + f.VistaValue);
            f = subrec.Fields["CALLBACKSERVER"];
            lst.Add(CALLBACK_FILE_NUMBER + "^" + f.VistaNumber + "^+2,+1^" + f.VistaValue);
            f = subrec.Fields["URLSTRING"];
            lst.Add(CALLBACK_FILE_NUMBER + "^" + f.VistaNumber + "^+2,+1^" + f.VistaValue);

            query.Args = (string[])lst.ToArray(typeof(string));
            return(query);
        }
Example #6
0
        public static string addRecord(AbstractConnection cxn, RemoteApplicationRecord rec, CallBackFileRecord subrec)
        {
            DdrFiler query    = buildAddRecordQuery(cxn, rec, subrec);
            string   response = query.execute();

            return(response);
        }