public virtual void GetData(string elemName, string parentNodeName) { ResultText = string.Empty; // Get local XML file info GetLocalInfo(elemName, parentNodeName); // Get server info GetServerInfo(); // Check if server date is greater than local date // and total rows are not the same if (LocalMaxDate < ServerMaxDate || LocalTotalRows != ServerTotalRows) { // Get info from server GetFromServer(); // Store XML data to local file StoreToLocalFile(); IsFromLocal = false; } else { // Get info from local file GetFromXmlFile(); IsFromLocal = true; } ResultText += "Is From Local: " + IsFromLocal.ToString() + Environment.NewLine; }
public void GetData() { // Clear properties ResultText = string.Empty; Customers = new ObservableCollection <Customer>(); // Get local XML file info GetLocalInfo(); // Get server info GetServerInfo(); // Check if server date is greater than local date // and total rows are not the same if (LocalMaxDate < ServerMaxDate || LocalTotalRows != ServerTotalRows) { // Get info from server GetFromServer(); // Store XML data to local file StoreToLocalFile(); IsFromLocal = false; } else { // Get info from local file GetFromXmlFile(); IsFromLocal = true; } ResultText += "Is From Local: " + IsFromLocal.ToString() + Environment.NewLine; }