Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCcinvdisc(ref DataRow row, Ccinvdisc entity)
 {
     row.SetField("item_qty", entity.itemQty);
     row.SetField("sugg_qty", entity.suggQty);
     row.SetField("diff_qty", entity.diffQty);
     row.SetField("lot", entity.lot);
     row.SetField("lot_before", entity.lotBefore);
     row.SetField("date_time", entity.dateTime);
     row.SetField("emp_num", entity.empNum);
     row.SetField("bin_num", entity.binNum);
     row.SetField("abs_num", entity.absNum);
     row.SetField("pallet_id", entity.palletId);
     row.SetField("stock_stat", entity.stockStat);
     row.SetField("transRowID", entity.transRowID.ToByteArray());
     row.SetField("ccinvdiscuserfield", entity.ccinvdiscuserfield);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Ccinvdisc BuildCcinvdiscFromRow(DataRow row)
        {
            Ccinvdisc entity = new Ccinvdisc();

            entity.itemQty            = row.IsNull("item_qty") ? decimal.Zero : row.Field <decimal>("item_qty");
            entity.suggQty            = row.IsNull("sugg_qty") ? decimal.Zero : row.Field <decimal>("sugg_qty");
            entity.diffQty            = row.IsNull("diff_qty") ? decimal.Zero : row.Field <decimal>("diff_qty");
            entity.lot                = row.IsNull("lot") ? string.Empty : row.Field <string>("lot");
            entity.lotBefore          = row.IsNull("lot_before") ? string.Empty : row.Field <string>("lot_before");
            entity.dateTime           = row.IsNull("date_time") ? string.Empty : row.Field <string>("date_time");
            entity.empNum             = row.IsNull("emp_num") ? string.Empty : row.Field <string>("emp_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.stockStat          = row.IsNull("stock_stat") ? string.Empty : row.Field <string>("stock_stat");
            entity.transRowID         = row.Field <byte[]>("transRowID").ToStringEncoded();
            entity.ccinvdiscuserfield = row.IsNull("ccinvdiscuserfield") ? string.Empty : row.Field <string>("ccinvdiscuserfield");
            entity.userfield          = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }