Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOmorderexceptionholdlines(ref DataRow row, Omorderexceptionholdlines entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("id", entity.id);
     row.SetField("order", entity.order);
     row.SetField("order_suffix", entity.orderSuffix);
     row.SetField("actual_freight", entity.actualFreight);
     row.SetField("line", entity.line);
     row.SetField("line_alt_number", entity.lineAltNumber);
     row.SetField("line_status", entity.lineStatus);
     row.SetField("is_hold_line", entity.isHoldLine);
     row.SetField("line_sequence", entity.lineSequence);
     row.SetField("abs_num", entity.absNum);
     row.SetField("item_desc", entity.itemDesc);
     row.SetField("item_serial_flag", entity.itemSerialFlag);
     row.SetField("req_qty", entity.reqQty);
     row.SetField("item_uom", entity.itemUom);
     row.SetField("sale_uom", entity.saleUom);
     row.SetField("sale_uom_conv", entity.saleUomConv);
     row.SetField("act_qty", entity.actQty);
     row.SetField("last_emp_num", entity.lastEmpNum);
     row.SetField("orig_cube", entity.origCube);
     row.SetField("orig_req_qty", entity.origReqQty);
     row.SetField("orig_weight", entity.origWeight);
     row.SetField("shipcompfl", entity.shipcompfl);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("isHoldEnabled", entity.isHoldEnabled);
     row.SetField("isUnHoldEnabled", entity.isUnHoldEnabled);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Omorderexceptionholdlines BuildOmorderexceptionholdlinesFromRow(DataRow row)
        {
            Omorderexceptionholdlines entity = new Omorderexceptionholdlines();

            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.id              = row.IsNull("id") ? 0 : row.Field <int>("id");
            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.actualFreight   = row.IsNull("actual_freight") ? decimal.Zero : row.Field <decimal>("actual_freight");
            entity.line            = row.IsNull("line") ? 0 : row.Field <int>("line");
            entity.lineAltNumber   = row.IsNull("line_alt_number") ? 0 : row.Field <int>("line_alt_number");
            entity.lineStatus      = row.IsNull("line_status") ? string.Empty : row.Field <string>("line_status");
            entity.isHoldLine      = row.Field <bool>("is_hold_line");
            entity.lineSequence    = row.IsNull("line_sequence") ? 0 : row.Field <int>("line_sequence");
            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.itemSerialFlag  = row.Field <bool>("item_serial_flag");
            entity.reqQty          = row.IsNull("req_qty") ? decimal.Zero : row.Field <decimal>("req_qty");
            entity.itemUom         = row.IsNull("item_uom") ? string.Empty : row.Field <string>("item_uom");
            entity.saleUom         = row.IsNull("sale_uom") ? string.Empty : row.Field <string>("sale_uom");
            entity.saleUomConv     = row.IsNull("sale_uom_conv") ? decimal.Zero : row.Field <decimal>("sale_uom_conv");
            entity.actQty          = row.IsNull("act_qty") ? decimal.Zero : row.Field <decimal>("act_qty");
            entity.lastEmpNum      = row.IsNull("last_emp_num") ? string.Empty : row.Field <string>("last_emp_num");
            entity.origCube        = row.IsNull("orig_cube") ? decimal.Zero : row.Field <decimal>("orig_cube");
            entity.origReqQty      = row.IsNull("orig_req_qty") ? decimal.Zero : row.Field <decimal>("orig_req_qty");
            entity.origWeight      = row.IsNull("orig_weight") ? decimal.Zero : row.Field <decimal>("orig_weight");
            entity.shipcompfl      = row.Field <bool>("shipcompfl");
            entity.rowid           = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.isHoldEnabled   = row.Field <bool>("isHoldEnabled");
            entity.isUnHoldEnabled = row.Field <bool>("isUnHoldEnabled");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }