public string DownloadHistoryByEquipmentID(string EquipmentID) { string json = ""; this.GeneralLogManager = new LogManager(tmp_config); try { UploadManager CurManager = new UploadManager(); HistoryEquipmentCollection historyEquipment = CurManager.GetHistoryByEquipmentID(EquipmentID); if (historyEquipment != null) { json = JsonConvert.SerializeObject(historyEquipment); } } catch (Exception e) { string ErrorID = SwissArmy.UniqueID(); //this.CurLogManager.LogError(ErrorID, "DownloadMasterDataFromSQL: Error :: " + e.ToString(), employeeID); json = "Error: " + e.ToString(); } return(json); }
public string DownloadMasterDataFromSQL(DateTime dtCreated, string employeeID) { string json = ""; this.GeneralLogManager = new LogManager(tmp_config); try { UploadManager CurUploadManager = new UploadManager(); MasterCauseCollection CausesCollection = CurUploadManager.DownloadMasterCauses(dtCreated); if (CausesCollection != null) { json += "MasterCauses " + JsonConvert.SerializeObject(CausesCollection); } MasterDamageCollection DamagesCollection = CurUploadManager.DownloadMasterDamages(dtCreated); if (DamagesCollection != null) { json += "MasterDamages" + JsonConvert.SerializeObject(DamagesCollection); } MasterCustomerCollection customerCollection = CurUploadManager.DownloadMasterCustomers(dtCreated); if (customerCollection != null) { json += "MasterCustomers" + JsonConvert.SerializeObject(customerCollection); } MasterEquipmentCollection equipmentCollection = CurUploadManager.DownloadMasterEquipment(dtCreated); if (equipmentCollection != null) { json += "MasterEquipment" + JsonConvert.SerializeObject(equipmentCollection); } MasterLookUpCollection lookUpCollection = CurUploadManager.DownloadMasterLookUp(dtCreated); if (lookUpCollection != null) { json += "MasterLookUp" + JsonConvert.SerializeObject(lookUpCollection); } ApplicationUserCollection UserCollection = CurUploadManager.DownloadMasterUsersInColl(dtCreated); if (UserCollection != null) { json += "MasterUsers" + JsonConvert.SerializeObject(UserCollection); } MasterQuickNotesCollection quickNotesCollection = CurUploadManager.DownloadQuickNotes(); if (quickNotesCollection != null) { json += "MasterQuickNotes" + JsonConvert.SerializeObject(quickNotesCollection); } MasterCheckListTypeCollection masterCheckListTypeColleaction = CurUploadManager.DownloadMasterCheckListType(); if (masterCheckListTypeColleaction != null) { json += "MasterCheckListType" + JsonConvert.SerializeObject(masterCheckListTypeColleaction); } MasterCheckListInCollection masterCheckListCollection = CurUploadManager.DownloadMasterCheckList(); if (masterCheckListCollection != null) { json += "MasterCheckList" + JsonConvert.SerializeObject(masterCheckListCollection); } MasterCheckListRelationCollection checkListRelationCollection = CurUploadManager.DownloadMasterCheckListRelation(); if (checkListRelationCollection != null) { json += "MasterCheckListRelation" + JsonConvert.SerializeObject(checkListRelationCollection); } if (json.Equals("")) { this.GeneralLogManager.LogAction("DownloadMasterDataFromSQL", employeeID, "Result :: null "); } else { this.GeneralLogManager.LogAction("DownloadMasterDataFromSQL", employeeID, "Result :: " + json); } } catch (Exception e) { string ErrorID = SwissArmy.UniqueID(); this.CurLogManager.LogError(ErrorID, "DownloadMasterDataFromSQL: Error :: " + e.ToString(), employeeID); json = "Error: " + e.ToString(); } return(json); }
public bool LogError(string Content, string LoggerID) { return(this.LogError(SwissArmy.UniqueID(), Content, LoggerID)); }