Пример #1
0
        ///<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());
            }
        }