Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromZonebins(ref DataRow row, Zonebins entity)
 {
     row.SetField("bin_num", entity.binNum);
     row.SetField("loc_type", entity.locType);
     row.SetField("prim_pick", entity.primPick);
     row.SetField("prim_pick_type", entity.primPickType);
     row.SetField("abs_num", entity.absNum);
     row.SetField("binmstRowID", entity.binmstRowID.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Zonebins BuildZonebinsFromRow(DataRow row)
        {
            Zonebins entity = new Zonebins();

            entity.binNum       = row.IsNull("bin_num") ? string.Empty : row.Field <string>("bin_num");
            entity.locType      = row.IsNull("loc_type") ? string.Empty : row.Field <string>("loc_type");
            entity.primPick     = row.Field <bool>("prim_pick");
            entity.primPickType = row.IsNull("prim_pick_type") ? string.Empty : row.Field <string>("prim_pick_type");
            entity.absNum       = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num");
            entity.binmstRowID  = row.Field <byte[]>("binmstRowID").ToStringEncoded();
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }