Add project files.
This commit is contained in:
46
PWAPPv2/Source/APIConfig.cs
Normal file
46
PWAPPv2/Source/APIConfig.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
|
||||
namespace PWAPPv2.Source
|
||||
{
|
||||
class APIConfig
|
||||
{
|
||||
public string PWUserID;
|
||||
public string PWPassword;
|
||||
public string PWPracticeID;
|
||||
public string PWApiID;
|
||||
|
||||
public void LoadConfig(string path)
|
||||
{
|
||||
XmlDocument cfgDoc = new XmlDocument();
|
||||
try
|
||||
{
|
||||
cfgDoc.Load(path);
|
||||
}
|
||||
catch(XmlException)
|
||||
{
|
||||
Console.WriteLine("An error has occured parsing the config file.");
|
||||
return;
|
||||
}
|
||||
catch(System.IO.FileNotFoundException)
|
||||
{
|
||||
Console.WriteLine("Config file could not be found!");
|
||||
return;
|
||||
}
|
||||
|
||||
XmlNodeList XUserID = cfgDoc.GetElementsByTagName("pwuserid");
|
||||
XmlNodeList XPassword = cfgDoc.GetElementsByTagName("pwpassword");
|
||||
XmlNodeList XPracticeID = cfgDoc.GetElementsByTagName("pwpracticeid");
|
||||
XmlNodeList XApiID = cfgDoc.GetElementsByTagName("pwapiid");
|
||||
|
||||
PWUserID = XUserID[0].InnerText;
|
||||
PWPassword = XPassword[0].InnerText;
|
||||
PWPracticeID = XPracticeID[0].InnerText;
|
||||
PWApiID = XApiID[0].InnerText;
|
||||
}
|
||||
}
|
||||
}
|
||||
20
PWAPPv2/Source/Patient.cs
Normal file
20
PWAPPv2/Source/Patient.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PWAPPv2.Source
|
||||
{
|
||||
class Patient
|
||||
{
|
||||
public string FName;
|
||||
public string MName;
|
||||
public string LName;
|
||||
public string DoB;
|
||||
public string Address;
|
||||
public string City;
|
||||
public string State;
|
||||
public string Zip;
|
||||
}
|
||||
}
|
||||
26
PWAPPv2/Source/PatientGUIAdapter.cs
Normal file
26
PWAPPv2/Source/PatientGUIAdapter.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PWAPPv2.Source
|
||||
{
|
||||
class PatientGUIAdapter
|
||||
{
|
||||
private Patient p;
|
||||
public string txtFName { get { return p.FName; } }
|
||||
public string txtLName { get { return p.LName; } }
|
||||
public string txtMName { get { return p.MName; } }
|
||||
public string txtDob { get { return p.DoB; } }
|
||||
public string txtStreet { get { return p.Address; } }
|
||||
public string txtCity { get { return p.City; } }
|
||||
public string txtState { get { return p.State; } }
|
||||
public string txtZip { get { return p.Zip; } }
|
||||
|
||||
public PatientGUIAdapter(Patient patient)
|
||||
{
|
||||
p = patient;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user