Example #1
0
        public static void RemoveFIXGroup(IDbConnection connection, string table, int outerId)
        {
            IDbCommand command = connection.CreateCommand();

            command.CommandText = string.Format("RemoveFIXGroup", (object)table);
            FIXDbServer.SetCommandParameter(command, "outerId", DbType.Int32, (object)outerId);
            command.ExecuteNonQuery();
            command.Dispose();
        }
Example #2
0
 public static void SaveFIXGroup(IDbConnection connection, FIXGroup group, string table, int outerID, int innerID)
 {
     foreach (FIXField fixField in group.Fields)
     {
         if (fixField.FIXType != FIXType.NumInGroup)
         {
             IDbCommand command = connection.CreateCommand();
             command.CommandText = string.Format("commmd1", (object)table);
             FIXDbServer.SetCommandParameter(command, "outerID", DbType.Int32, (object)outerID);
             FIXDbServer.SetCommandParameter(command, "innerID", DbType.Int32, (object)innerID);
             FIXDbServer.SetCommandParameter(command, "FIXType", DbType.Int32, (object)fixField.FIXType);
             FIXDbServer.SetCommandParameter(command, "Tag", DbType.Int32, (object)fixField.Tag);
             string str = fixField.ToInvariantString();
             if (str.Length > (int)byte.MaxValue)
             {
                 str = str.Remove((int)byte.MaxValue);
             }
             FIXDbServer.SetCommandParameter(command, "Str", DbType.String, (object)str);
             command.ExecuteNonQuery();
             command.Dispose();
         }
     }
     foreach (ArrayList arrayList in group.Groups)
     {
         IDbCommand command1 = connection.CreateCommand();
         command1.CommandText = "command1";
         Convert.ToInt32(command1.ExecuteScalar());
         command1.Dispose();
         IDbCommand command2 = connection.CreateCommand();
         command2.CommandText = string.Format("command2", (object)table);
         FIXDbServer.SetCommandParameter(command2, "outerID", DbType.Int32, (object)outerID);
         command2.ExecuteNonQuery();
         command2.Dispose();
         IDbCommand command3 = connection.CreateCommand();
         command3.CommandText = "command3";
         int num = Convert.ToInt32(command3.ExecuteScalar());
         command3.Dispose();
         foreach (FIXGroup group1 in arrayList)
         {
             IDbCommand command4 = connection.CreateCommand();
             command4.CommandText = string.Format("command4", (object)table);
             FIXDbServer.SetCommandParameter(command4, "outerID", DbType.Int32, (object)outerID);
             FIXDbServer.SetCommandParameter(command4, "num", DbType.Int32, (object)num);
             command4.ExecuteNonQuery();
             command4.Dispose();
             IDbCommand command5 = connection.CreateCommand();
             command5.CommandText = "command5";
             int innerID1 = Convert.ToInt32(command5.ExecuteScalar());
             command5.Dispose();
             FIXDbServer.SaveFIXGroup(connection, group1, table, outerID, innerID1);
         }
     }
 }
Example #3
0
 public static void SaveFIXGroup(IDbConnection connection, FIXGroup group, string table, int outerID)
 {
     FIXDbServer.SaveFIXGroup(connection, group, table, outerID, -1);
 }