예제 #1
0
        static void Main(string[] args)
        {
            if (args.Length != 4)
            {
                Console.Write("\nUsage:\n\n" +
                              "CAFSqlGenerator.exe <NBT AccessId> <CAF DB Username> <CAF DB Password> <CAF DB server>\n\n" +
                              "For example, if you were setting up a CAF import from cis0001/userpass@CAFDB to nbt_master, you would type " +
                              "\"CAFSqlGenerator.exe nbt_master cis0001 userpass CAFDB\"\n");
            }
            else
            {
                //assign the command line params to readable variables
                string AccessId    = args[0];
                string CAFSchema   = args[1];
                string CAFPassword = args[2];
                string CAFDatabase = args[3];


                //create the NbtResources and assign the DB Resources using the access id
                CswNbtResources NbtResources = CswNbtResourcesFactory.makeCswNbtResources(CswEnumAppType.Nbt, CswEnumSetupMode.NbtExe, true);
                NbtResources.AccessId = AccessId;

                CswNbtImportTools.startCAFImportImpl(NbtResources, CAFDatabase, CAFSchema, CAFPassword, CswEnumSetupMode.NbtExe);
            } //if correct number of args
        }     //Main
예제 #2
0
 public static void startCAFImport(ICswResources CswResources, CswWebSvcReturn Ret, CswNbtImportWcf.StartImportParams Params)
 {
     CswNbtImportTools.startCAFImportImpl(CswResources, Params.CAFDatabase, Params.CAFSchema, Params.CAFPassword, CswEnumSetupMode.NbtWeb);
 }