Example #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());
            }
        }
Example #2
0
        ///<summary></summary>
        public static void Refresh()
        {
            DataSet ds = null;

            try {
                if (RemotingClient.OpenDentBusinessIsLocal)
                {
                    ds = PrefB.Refresh();
                }
                else
                {
                    DtoPrefRefresh dto = new DtoPrefRefresh();
                    ds = RemotingClient.ProcessQuery(dto);
                }
            }
            catch (Exception e) {
                MessageBox.Show(e.Message);
                return;
            }
            PrefB.FillHList(ds.Tables[0]);            //now, we have an HList on both the client and the server.
        }