Ignore:
Timestamp:
Mar 5, 2011, 6:32:01 AM (14 years ago)
Author:
Sam Habiel
Message:

Updated bmxTesterForVista to support RPMS. Compile using VISTA or RPMS flag

Location:
BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXCmdTester
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXCmdTester/BMXCmdTester.csproj

    r967 r1103  
    1 <?xml version="1.0" encoding="utf-8"?>
     1<?xml version="1.0" encoding="utf-8"?>
    22<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    33  <PropertyGroup>
     
    1111    <RootNamespace>BMXCmdTester</RootNamespace>
    1212    <AssemblyName>BMXCmdTester</AssemblyName>
    13     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     13    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    1414    <FileAlignment>512</FileAlignment>
    1515    <FileUpgradeFlags>
     
    3838    <Optimize>false</Optimize>
    3939    <OutputPath>bin\Release\</OutputPath>
    40     <DefineConstants>DEBUG;TRACE</DefineConstants>
     40    <DefineConstants>DEBUG;TRACE;RPMS</DefineConstants>
    4141    <ErrorReport>prompt</ErrorReport>
    4242    <WarningLevel>4</WarningLevel>
     43    <Externalconsole>true</Externalconsole>
     44    <Commandlineparameters>127.0.0.1 9101 system.01 user.003</Commandlineparameters>
    4345  </PropertyGroup>
    4446  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     
    5557      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    5658    </Reference>
    57     <Reference Include="System.Xml.Linq">
    58       <RequiredTargetFramework>3.5</RequiredTargetFramework>
    59     </Reference>
    60     <Reference Include="System.Data.DataSetExtensions">
    61       <RequiredTargetFramework>3.5</RequiredTargetFramework>
    62     </Reference>
    6359    <Reference Include="System.Data" />
    64     <Reference Include="System.Xml" />
    6560  </ItemGroup>
    6661  <ItemGroup>
     
    7267      <Name>BMXNet</Name>
    7368    </ProjectReference>
    74   </ItemGroup>
    75   <ItemGroup>
    76     <Folder Include="Properties\" />
    7769  </ItemGroup>
    7870  <ItemGroup>
     
    9991  </ItemGroup>
    10092  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
     93  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
    10194  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
    10295       Other similar extension points exist, see Microsoft.Common.targets.
  • BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXCmdTester/bmxTesterForVista_0200.cs

    r936 r1103  
    66    class MyFirstApp
    77    {
    8         static void Main()
     8        static void Main(string[] args)
    99        {
     10                        if (args.Length < 4)
     11                        {
     12                                Console.WriteLine("Enter parameters as server port ac vc");
     13                                return;
     14                        }
     15                       
    1016            BMXNetLib ConnectionManager = new BMXNetLib();
    11             Console.Write("Enter IP Address of Server: ");
    12             string ip = Console.ReadLine();
    13             Console.Write("Enter the listener port: ");
    14             string port = Console.ReadLine();
    15             int portno = int.Parse(port);
    16             Console.Write("Enter your Access Code: ");
    17             string accessCode = Console.ReadLine();
    18             Console.Write("Enter your Verify Code: ");
    19             string verifyCode = Console.ReadLine();
     17                        string ip = args[0];
     18            int portno = int.Parse(args[1]);
     19            string accessCode = args[2];
     20            string verifyCode = args[3];
    2021            ConnectionManager.MServerPort = portno;
    2122            bool success = ConnectionManager.OpenConnection(ip, accessCode, verifyCode);
     
    2425            string result = ConnectionManager.TransmitRPC("BMX USER", ConnectionManager.DUZ);
    2526            Console.WriteLine("Simple RPC: User Name: " + result);
    26             result = ConnectionManager.TransmitRPC("BMX UTF-8", "");
    27             Console.WriteLine("UTF-8 stuff: " + result);
    2827
    2928            //string result =
     
    6059            System.Data.DataTable dt = new System.Data.DataTable();
    6160            dt = ds.Tables["BMXNetTable1"];
    62             System.Text.StringBuilder sb = new System.Text.StringBuilder();
     61                        System.Text.StringBuilder sb = new System.Text.StringBuilder();
    6362            for (int i = 0; i < dt.Rows.Count; i++)
    6463            {
     
    7574            Console.WriteLine("More complicated SQL\n");
    7675            BMXNetCommand cmd3 = (BMXNetCommand)conn.CreateCommand();
     76                        cmd3.CommandText = String.Empty; // Default
     77#if VISTA
    7778            cmd3.CommandText = @"SELECT PATIENT.NAME 'NAME', PATIENT.STATE 'STATE',
    7879                        STATE.ABBREVIATION 'ABBR', PATIENT.AGE 'AGE' FROM PATIENT, STATE
    7980                        WHERE INTERNAL[PATIENT.STATE] = STATE.BMXIEN MAXRECORDS:5";
    80             da.SelectCommand = cmd3;
     81#elif RPMS
     82                        cmd3.CommandText = @"SELECT VA_PATIENT.NAME 'NAME', VA_PATIENT.STATE 'STATE',
     83                                                STATE.ABBREVIATION 'ABBR', VA_PATIENT.AGE 'AGE' FROM VA_PATIENT, STATE
     84                                                WHERE INTERNAL[VA_PATIENT.STATE] = STATE.BMXIEN MAXRECORDS:5";
     85#endif
     86                        da.SelectCommand = cmd3;
    8187            da.Fill(ds, "BMXNetTable2");
    8288            System.Data.DataTable dt2 = new System.Data.DataTable();
Note: See TracChangeset for help on using the changeset viewer.