Exemple #1
0
 private void CopiarDBTable(NavisionDBTable t_origen, ref NavisionDBTable t_destino)
 {
     int num;
     t_destino.TableName = t_origen.TableName;
     t_destino.TableNo = t_origen.TableNo;
     t_destino.Key = t_origen.Key;
     t_destino.Reverse = t_origen.Reverse;
     if (t_origen.Filters != null)
     {
         object[,] filters = t_origen.Filters;
         for (num = 0; num < (filters.Length / 2); num++)
         {
             t_destino.AddFilter(Convert.ToInt32(filters[num, 0]), Convert.ToString(filters[num, 1]));
         }
     }
     if (t_origen.Columns != null)
     {
         int[] columns = t_origen.Columns;
         for (num = 0; num < columns.Length; num++)
         {
             t_destino.AddColumn(columns[num]);
         }
     }
     if (t_origen.ColumnsName != null)
     {
         string[] columnsName = t_origen.ColumnsName;
         for (num = 0; num < columnsName.Length; num++)
         {
             t_destino.AddColumn(columnsName[num]);
         }
     }
     t_destino.NoColumn = t_origen.NoColumn;
     if (t_origen.Inserts != null)
     {
         object[,] inserts = t_origen.Inserts;
         for (num = 0; num < (inserts.Length / 2); num++)
         {
             t_destino.Insert(Convert.ToInt32(inserts[num, 0]), inserts[num, 1]);
         }
     }
     if (t_origen.Updates != null)
     {
         object[,] updates = t_origen.Updates;
         for (num = 0; num < (updates.Length / 2); num++)
         {
             t_destino.Modify(Convert.ToInt32(updates[num, 0]), updates[num, 1]);
         }
     }
 }