예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPickdetailsummary(ref DataRow row, Pickdetailsummary entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("order", entity.order);
     row.SetField("order_suffix", entity.orderSuffix);
     row.SetField("line", entity.line);
     row.SetField("line_sequence", entity.lineSequence);
     row.SetField("req_qty", entity.reqQty);
     row.SetField("allocated_qty", entity.allocatedQty);
     row.SetField("remaining_qty", entity.remainingQty);
     row.SetField("abs_num", entity.absNum);
     row.SetField("item_desc", entity.itemDesc);
     row.SetField("item_case_quantity", entity.itemCaseQuantity);
     row.SetField("item_pallet_quantity", entity.itemPalletQuantity);
     row.SetField("requested_stock_status", entity.requestedStockStatus);
     row.SetField("pickdtlsummaryuserfield", entity.pickdtlsummaryuserfield);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Pickdetailsummary BuildPickdetailsummaryFromRow(DataRow row)
        {
            Pickdetailsummary entity = new Pickdetailsummary();

            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.order                   = row.IsNull("order") ? string.Empty : row.Field <string>("order");
            entity.orderSuffix             = row.IsNull("order_suffix") ? string.Empty : row.Field <string>("order_suffix");
            entity.line                    = row.IsNull("line") ? 0 : row.Field <int>("line");
            entity.lineSequence            = row.IsNull("line_sequence") ? 0 : row.Field <int>("line_sequence");
            entity.reqQty                  = row.IsNull("req_qty") ? decimal.Zero : row.Field <decimal>("req_qty");
            entity.allocatedQty            = row.IsNull("allocated_qty") ? decimal.Zero : row.Field <decimal>("allocated_qty");
            entity.remainingQty            = row.IsNull("remaining_qty") ? decimal.Zero : row.Field <decimal>("remaining_qty");
            entity.absNum                  = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num");
            entity.itemDesc                = row.IsNull("item_desc") ? string.Empty : row.Field <string>("item_desc");
            entity.itemCaseQuantity        = row.IsNull("item_case_quantity") ? decimal.Zero : row.Field <decimal>("item_case_quantity");
            entity.itemPalletQuantity      = row.IsNull("item_pallet_quantity") ? decimal.Zero : row.Field <decimal>("item_pallet_quantity");
            entity.requestedStockStatus    = row.IsNull("requested_stock_status") ? string.Empty : row.Field <string>("requested_stock_status");
            entity.pickdtlsummaryuserfield = row.IsNull("pickdtlsummaryuserfield") ? string.Empty : row.Field <string>("pickdtlsummaryuserfield");
            entity.userfield               = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }