Esempio n. 1
0
 private XElement GetPropertyConfiguration(string keyword)
 {
     XElement collData = null;
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         XElement el = ccfg.GetElementByAttrib(cliFile, "client", "keyword", keyword);
         YardiInterface.YardiInterface iface = new YardiInterface.YardiInterface(ccfg.GetElement(el, "url").Value, txtLicFile.Text);
         iface.User = ccfg.GetElement(el, "user").Value;
         iface.Pwd = ccfg.GetElement(el, "password").Value;
         iface.Database = ccfg.GetElement(el, "database").Value;
         iface.Server = ccfg.GetElement(el, "server").Value;
         iface.Platform = ccfg.GetElement(el, "platform").Value;
         collData = iface.Getproperties();
         return collData;
     }
     catch (Exception ex)
     {
         Log.Error("Error retrieving data\n" + ex);
         MessageBox.Show("Error retrieving data\n" + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     finally
     {
         Cursor.Current = Cursors.Default;
     }
     return collData;
 }
Esempio n. 2
0
 private void GetVersion(string keyword)
 {
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         XElement el = ccfg.GetElementByAttrib(cliFile, "client", "keyword", keyword);
         YardiInterface.YardiInterface iface = new YardiInterface.YardiInterface(ccfg.GetElement(el, "url").Value, txtLicFile.Text);
         string version = iface.ClientVersion;
         AddMessage("Interface Version for " + keyword + " is " + version);
     }
     catch (Exception ex)
     {
         Log.Error("Error retrieving data\n" + ex);
         MessageBox.Show("Error retrieving data\n" + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     finally
     {
         Cursor.Current = Cursors.Default;
     }
 }
Esempio n. 3
0
 private void GetCollections(string keyword)
 {
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         XElement el = ccfg.GetElementByAttrib(cliFile, "client", "keyword", keyword);
         YardiInterface.YardiInterface iface = new YardiInterface.YardiInterface(ccfg.GetElement(el, "url").Value, txtLicFile.Text);
         iface.URL = ccfg.GetElement(el, "url").Value;
         iface.User = ccfg.GetElement(el, "user").Value;
         iface.Pwd = ccfg.GetElement(el, "password").Value;
         iface.Database = ccfg.GetElement(el, "database").Value;
         iface.Server = ccfg.GetElement(el, "server").Value;
         iface.Platform = ccfg.GetElement(el, "platform").Value;
         iface.YardiPropId = ccfg.GetElement(el, "yardipropid").Value;
         XElement collData = iface.GetCollectionsLeaseInfo(ccfg.GetElement(el, "yardipropid").Value);
         string shortName = ccfg.GetElement(el, "name").Value.Replace(" ", "_");
         string dir = txtRawXML.Text + @"\" + shortName;
         if (!Directory.Exists(dir))
             Directory.CreateDirectory(dir);
         string fname = dir + @"\" + iface.YardiPropId + "_" + keyword + "_" + DateTime.Now.ToString("MMddyyyy_hhmm") + ".xml";
         SaveRawFile(collData, fname);
         AddMessage(" XML File saved as " + fname);
     }
     catch (Exception ex)
     {
         Log.Error("Error retrieving data\n" + ex);
         MessageBox.Show("Error retrieving data\n" + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     finally
     {
         Cursor.Current = Cursors.Default;
     }
 }