예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromInvdiscneginv(ref DataRow row, Invdiscneginv entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("bin_num", entity.binNum);
     row.SetField("abs_num", entity.absNum);
     row.SetField("pallet_id", entity.palletId);
     row.SetField("case_quantity", entity.caseQuantity);
     row.SetField("total_qty", entity.totalQty);
     row.SetField("cycle_flag", entity.cycleFlag);
     row.SetField("cycle_id", entity.cycleId);
     row.SetField("cycle_level", entity.cycleLevel);
     row.SetField("inventoryRowID", entity.inventoryRowID.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Invdiscneginv BuildInvdiscneginvFromRow(DataRow row)
        {
            Invdiscneginv entity = new Invdiscneginv();

            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.absNum         = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num");
            entity.palletId       = row.IsNull("pallet_id") ? string.Empty : row.Field <string>("pallet_id");
            entity.caseQuantity   = row.IsNull("case_quantity") ? decimal.Zero : row.Field <decimal>("case_quantity");
            entity.totalQty       = row.IsNull("total_qty") ? decimal.Zero : row.Field <decimal>("total_qty");
            entity.cycleFlag      = row.Field <bool>("cycle_flag");
            entity.cycleId        = row.IsNull("cycle_id") ? 0 : row.Field <int>("cycle_id");
            entity.cycleLevel     = row.IsNull("cycle_level") ? string.Empty : row.Field <string>("cycle_level");
            entity.inventoryRowID = row.Field <byte[]>("inventoryRowID").ToStringEncoded();
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }