public void LoadByContactId(int ContactId) { DataSet ds = new atriumDB(); PreRefresh(); myA.GetAttendee().PreRefresh(); if (myA.AtMng.AppMan.UseService) { ds = BEManager.DecompressDataSet(myA.AtMng.AppMan.AtriumX().AppointmentLoadByContactId(ContactId, myA.AtMng.AppMan.AtriumXCon), ds); } else { try { ds = BEManager.DecompressDataSet(myDAL.LoadAllForOfficer(ContactId), ds); } catch (System.Runtime.Serialization.SerializationException x) { RecoverDAL(); ds = BEManager.DecompressDataSet(myDAL.LoadAllForOfficer(ContactId), ds); } } Fill(ds.Tables["Appointment"]); myA.GetApptRecurrence().Fill(ds.Tables["ApptRecurrence"]); myA.GetAttendee().Fill(ds.Tables["Attendee"]); SetLocalDates(); ds.Clear(); ds.Dispose(); }
public int LoadBF(int officeId, int officerID, DateTime date, bool refresh) { if (refresh) { // myLastEdit = new DateTime(1900, 1, 1); myLastTS = 0; //myDAL.PreRefresh(); } else { // myA.AtMng.LogMessage(String.Format("RefreshBF {0} {1}", myA.IsVirtualFM, myA.CurrentFileId)); } if (myActivityBFDT.Rows.Count > 0) { myLastTS = (Int64)myActivityBFDT.Select("", "ver desc")[0]["ver"]; } int i; DataSet ds; if (myA.AtMng.AppMan.UseService) { ds = BEManager.DecompressDataSet(myA.AtMng.AppMan.AtriumX().ActivityBFLoadBF(officeId, officerID, date, myA.AtMng.OfficeLoggedOn.OfficerBF, myLastTS, myA.AtMng.AppMan.AtriumXCon), new atriumDB()); } else { //to fix two threads using connection at same time atriumDAL.ActivityBFDAL abdal = myDAL; if (!refresh) { atriumDAL.atriumDALManager adm = new atriumDAL.atriumDALManager(myA.AtMng.AppMan.myUser, myA.AtMng.AppMan.myPwd, myA.AtMng.AppMan.Connect); abdal = adm.GetActivityBF(); } try { ds = atLogic.BEManager.DecompressDataSet(abdal.LoadBF(officeId, officerID, date, myA.AtMng.OfficeLoggedOn.OfficerBF, myLastTS), new atriumDB()); } catch (System.Runtime.Serialization.SerializationException x) { RecoverDAL(); ds = atLogic.BEManager.DecompressDataSet(myDAL.LoadBF(officeId, officerID, date, myA.AtMng.OfficeLoggedOn.OfficerBF, myLastTS), new atriumDB()); } } i = ds.Tables["ACtivityBF"].Rows.Count; Fill(ds.Tables["ActivityBF"]); return(i); }
public override void LoadAll(bool refresh) { if (refresh) { GetSSTCase().PreRefresh(); GetSSTGroup().PreRefresh(); GetSSTDecision().PreRefresh(); GetSSTRequest().PreRefresh(); GetSSTReqRecipient().PreRefresh(); GetSSTCaseMatter().PreRefresh(); GetSSTAppealGround().PreRefresh(); // WI 75221 GetFileParty().PreRefresh(); GetHearing().PreRefresh(); GetFormHearing().PreRefresh(); } DataSet ds; try { ds = BEManager.DecompressDataSet(GetSSTCase().myDAL.LoadAll(myFM.CurrentFileId), new SST()); } catch (System.Runtime.Serialization.SerializationException x) { GetSSTCase().RecoverDAL(); ds = BEManager.DecompressDataSet(GetSSTCase().myDAL.LoadAll(myFM.CurrentFileId), new SST()); } GetSSTCase().Fill(ds.Tables["SSTCase"]); GetSSTCase().CalcDates(); GetSSTGroup().Fill(ds.Tables["SSTGroup"]); GetSSTDecision().Fill(ds.Tables["SSTDecision"]); GetSSTRequest().Fill(ds.Tables["SSTRequest"]); GetSSTReqRecipient().Fill(ds.Tables["SSTReqRecipient"]); GetSSTCaseMatter().Fill(ds.Tables["SSTCaseMatter"]); GetSSTAppealGround().Fill(ds.Tables["SSTAppealGround"]); // WI 75221 GetFileParty().Fill(ds.Tables["FileParty"]); GetFileParty().CalcRecipType(); GetHearing().Fill(ds.Tables["Hearing"]); GetFormHearing().Fill(ds.Tables["FormHearing"]); ds.Clear(); ds.Dispose(); }
//TFS#54344 CJW 2013-8-21 //new mthod clears data before loading when refreshing public override void LoadAll(bool refresh) { int delay = -AtMng.GetSetting(AppIntSetting.FileReloadInterval); if (refresh) { lastFileRefresh = DateTime.Now.AddSeconds(delay - 60); GetFileContact().PreRefresh(); GetPerson().PreRefresh(); GetFileOffice().PreRefresh(); GetFileXRef().PreRefresh(); GetFileAKA().PreRefresh(); GetAppointment().PreRefresh(); GetAppointment().SetLocalDates(); GetApptRecurrence().PreRefresh(); GetAttendee().PreRefresh(); GetAddress().PreRefresh(); GetsecFileRule().PreRefresh(); GetFileFlag().PreRefresh(); GetIRP().PreRefresh(); GetRiskAssessment().PreRefresh(); GetAKA().PreRefresh(); GetArchiveBatch().PreRefresh(); foreach (ddEntityBE d in myddEntity.Values) { d.PreRefresh(); } } if (DateTime.Now.AddSeconds(delay).CompareTo(lastFileRefresh) > 0) { DataSet ds = null; if (AtMng.AppMan.ServerInfo.useService) { atLogic.AtriumX.AtriumXClient axc = AtMng.AppMan.AtriumX(); ds = BEManager.DecompressDataSet(axc.LoadFile(CurrentFileId, AtMng.AppMan.AtriumXCon), new atriumDB()); } else { try { ds = BEManager.DecompressDataSet(this.EFile.myDAL.MainLoadByFileId(CurrentFileId), new atriumDB()); } catch (System.Runtime.Serialization.SerializationException x) { this.EFile.RecoverDAL(); ds = BEManager.DecompressDataSet(this.EFile.myDAL.MainLoadByFileId(CurrentFileId), new atriumDB()); } } EFile.Fill(ds.Tables["EFile"]); this.GetFileContact().Fill(ds.Tables["FileContact"]); this.GetPerson().Fill(ds.Tables["Contact"]); this.GetFileOffice().Fill(ds.Tables["FileOffice"]); this.GetFileXRef().Fill(ds.Tables["FileXRef"]); this.GetFileAKA().Fill(ds.Tables["FileAKA"]); this.GetAppointment().Fill(ds.Tables["Appointment"]); this.GetAppointment().SetLocalDates(); this.GetApptRecurrence().Fill(ds.Tables["ApptRecurrence"]); this.GetAttendee().Fill(ds.Tables["Attendee"]); this.GetAddress().Fill(ds.Tables["Address"]); this.GetsecFileRule().Fill(ds.Tables["secFileRule"]); this.GetFileFlag().Fill(ds.Tables["FileFlag"]); this.GetArchiveBatch().Fill(ds.Tables["ArchiveBatch"]); this.GetIRP().Fill(ds.Tables["IRP"]); this.GetRiskAssessment().Fill(ds.Tables["RiskAssessment"]); this.GetAKA().Fill(ds.Tables["AKA"]); LoadDDEntities(ds.Tables["ddEntity"]); // this.GetddEntity("MOP").Fill(ds.Tables["ddEntity"]); ds.Clear(); ds.Dispose(); lastFileRefresh = DateTime.Now; this.CurrentFile.FileStructXml = EFile.CalcFileStructXml(this.CurrentFile, true, false).OuterXml; this.CurrentFile.AcceptChanges(); } }
public override void LoadAll(bool refresh) { if (refresh) { GetFileHistory().PreRefresh(); GetDebt().PreRefresh(); GetAccountHistory().PreRefresh(); GetJudgment().PreRefresh(); GetJudgmentAccount().PreRefresh(); GetCost().PreRefresh(); GetWrit().PreRefresh(); GetWritHistory().PreRefresh(); GetProperty().PreRefresh(); GetCashBlotter().PreRefresh(); GetCBDetail().PreRefresh(); GetBankruptcy().PreRefresh(); GetBankruptcyAccount().PreRefresh(); GetInsolvency().PreRefresh(); GetInsolvencyAccount().PreRefresh(); GetHardship().PreRefresh(); GetCompOffer().PreRefresh(); GetCompOfferDetail().PreRefresh(); GetTaxing().PreRefresh(); GetOfficeAccount().PreRefresh(); GetDebtor().PreRefresh(); } DataSet ds; if (myatMng.AppMan.UseService) { ds = BEManager.DecompressDataSet(myatMng.AppMan.AtriumX().LoadCLAS(FM.CurrentFileId, myatMng.AppMan.AtriumXCon), new lmDatasets.CLAS()); } else { try { ds = BEManager.DecompressDataSet(this.FM.EFile.myDAL.CLASLoadByFileId(FM.CurrentFileId), new lmDatasets.CLAS()); } catch (System.Runtime.Serialization.SerializationException x) { this.FM.EFile.RecoverDAL(); ds = BEManager.DecompressDataSet(this.FM.EFile.myDAL.CLASLoadByFileId(FM.CurrentFileId), new lmDatasets.CLAS()); } } GetFileHistory().Fill(ds.Tables["FileHistory"]); GetDebt().Fill(ds.Tables["Debt"]); GetAccountHistory().Fill(ds.Tables["AccountHistory"]); GetJudgment().Fill(ds.Tables["Judgment"]); GetJudgmentAccount().Fill(ds.Tables["JudgmentAccount"]); GetCost().Fill(ds.Tables["Cost"]); GetWrit().Fill(ds.Tables["Writ"]); GetWritHistory().Fill(ds.Tables["WritHistory"]); GetProperty().Fill(ds.Tables["Property"]); GetCashBlotter().Fill(ds.Tables["CashBlotter"]); GetCBDetail().Fill(ds.Tables["CBDetail"]); GetBankruptcy().Fill(ds.Tables["Bankruptcy"]); GetBankruptcyAccount().Fill(ds.Tables["BankruptcyAccount"]); GetInsolvency().Fill(ds.Tables["Insolvency"]); GetInsolvencyAccount().Fill(ds.Tables["InsolvencyAccount"]); GetHardship().Fill(ds.Tables["Hardship"]); GetCompOffer().Fill(ds.Tables["CompOffer"]); GetCompOfferDetail().Fill(ds.Tables["CompOfferDetail"]); GetTaxing().Fill(ds.Tables["Taxing"]); GetOfficeAccount().Fill(ds.Tables["OfficeAccount"]); GetDebtor().Fill(ds.Tables["Debtor"]); ds.Clear(); ds.Dispose(); }