Esempio n. 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());
            }
        }
Esempio n. 2
0
 ///<summary>This is just the first version of this function.  It only gets selected parts of the Account refresh.</summary>
 public static DataSet GetAll(int patNum)
 {
     try {
         if (RemotingClient.OpenDentBusinessIsLocal)
         {
             return(AccountModuleB.GetAll(patNum));
         }
         else
         {
             DtoAccountModuleGetAll dto = new DtoAccountModuleGetAll();
             dto.PatNum = patNum;
             return(RemotingClient.ProcessQuery(dto));
         }
     }
     catch (Exception e) {
         MessageBox.Show(e.Message);
         return(new DataSet());               //It might be better to return null.
     }
 }