Ejemplo n.º 1
0
 ///<summary>Same as GetCount, but will throw exception if query fails instead of displaying message.</summary>
 public static string GetCountEx(string command)
 {
     if (RemotingClient.OpenDentBusinessIsLocal)
     {
         return(GeneralB.GetTable(command).Tables[0].Rows[0][0].ToString());
     }
     else
     {
         DtoGeneralGetTable dto = new DtoGeneralGetTable();
         dto.Command = command;
         return(RemotingClient.ProcessQuery(dto).Tables[0].Rows[0][0].ToString());
     }
 }
Ejemplo n.º 2
0
        ///<summary>Same as GetTable, but will throw exception if query fails instead of displaying message.  Used in ClassConvertDatabase and any place where we want to be able to suppress the exception message or handle it differently.</summary>
        public static DataTable GetTableEx(string command)
        {
            DataTable retVal;

            if (RemotingClient.OpenDentBusinessIsLocal)
            {
                retVal = GeneralB.GetTable(command).Tables[0].Copy();
            }
            else
            {
                DtoGeneralGetTable dto = new DtoGeneralGetTable();
                dto.Command = command;
                retVal      = RemotingClient.ProcessQuery(dto).Tables[0].Copy();
            }
            retVal.TableName = "";          //this is needed for FormQuery dataGrid
            return(retVal);
        }