///<summary>DataSet cannot be null.</summary> public static DataSet ProcessQuery(DtoQueryBase dto) { if (dto.GetType() == typeof(DtoGeneralGetTable)) { return(GeneralB.GetTable(((DtoGeneralGetTable)dto).Command)); } else if (dto.GetType() == typeof(DtoGeneralGetTableLow)) { return(GeneralB.GetTableLow(((DtoGeneralGetTableLow)dto).Command)); } else if (dto.GetType() == typeof(DtoGeneralGetDataSet)) { return(GeneralB.GetDataSet(((DtoGeneralGetDataSet)dto).Commands)); } else if (dto.GetType() == typeof(DtoAccountModuleGetAll)) { return(AccountModuleB.GetAll(((DtoAccountModuleGetAll)dto).PatNum)); } else if (dto.GetType() == typeof(DtoChartModuleGetAll)) { return(ChartModuleB.GetAll(((DtoChartModuleGetAll)dto).PatNum, ((DtoChartModuleGetAll)dto).IsAuditMode)); } else if (dto.GetType() == typeof(DtoCovCatRefresh)) { return(CovCatB.Refresh()); } else if (dto.GetType() == typeof(DtoDefRefresh)) { return(DefB.Refresh()); } else if (dto.GetType() == typeof(DtoPrefRefresh)) { return(PrefB.Refresh()); } else if (dto.GetType() == typeof(DtoProcedureRefresh)) { return(ProcedureB.Refresh(((DtoProcedureRefresh)dto).PatNum)); } else if (dto.GetType() == typeof(DtoUserodRefresh)) { return(UserodB.Refresh()); } else { throw new Exception("OpenDentServer.BusinessLayer.ProcessObject(dto) is missing a case for " + dto.GetType().ToString()); } }
///<summary>This is just the first version of this function. It only gets selected parts of the Chart refresh.</summary> public static DataSet GetAll(int patNum, bool isAuditMode) { try { if (RemotingClient.OpenDentBusinessIsLocal) { return(ChartModuleB.GetAll(patNum, isAuditMode)); } else { DtoChartModuleGetAll dto = new DtoChartModuleGetAll(); dto.PatNum = patNum; dto.IsAuditMode = isAuditMode; return(RemotingClient.ProcessQuery(dto)); } } catch (Exception e) { MessageBox.Show(e.Message); return(null); } }