Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromAltloclistresults(ref DataRow row, Altloclistresults entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("bin_num", entity.binNum);
     row.SetField("wh_zone", entity.whZone);
     row.SetField("max_pallets", entity.maxPallets);
     row.SetField("binmstRowID", entity.binmstRowID.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Altloclistresults BuildAltloclistresultsFromRow(DataRow row)
        {
            Altloclistresults entity = new Altloclistresults();

            entity.coNum       = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num");
            entity.whNum       = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num");
            entity.binNum      = row.IsNull("bin_num") ? string.Empty : row.Field <string>("bin_num");
            entity.whZone      = row.IsNull("wh_zone") ? string.Empty : row.Field <string>("wh_zone");
            entity.maxPallets  = row.IsNull("max_pallets") ? 0 : row.Field <int>("max_pallets");
            entity.binmstRowID = row.Field <byte[]>("binmstRowID").ToStringEncoded();
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }