Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCcitems(ref DataRow row, Ccitems entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("abs_num", entity.absNum);
     row.SetField("item_desc", entity.itemDesc);
     row.SetField("prod_grp", entity.prodGrp);
     row.SetField("abc", entity.abc);
     row.SetField("last_count", entity.lastCount);
     row.SetField("lot_ctrl", entity.lotCtrl);
     row.SetField("itemRowID", entity.itemRowID.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Ccitems BuildCcitemsFromRow(DataRow row)
        {
            Ccitems entity = new Ccitems();

            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.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.prodGrp   = row.IsNull("prod_grp") ? string.Empty : row.Field <string>("prod_grp");
            entity.abc       = row.IsNull("abc") ? string.Empty : row.Field <string>("abc");
            entity.lastCount = row.IsNull("last_count") ? string.Empty : row.Field <string>("last_count");
            entity.lotCtrl   = row.Field <bool>("lot_ctrl");
            entity.itemRowID = row.Field <byte[]>("itemRowID").ToStringEncoded();
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }