예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPickdetail(ref DataRow row, Pickdetail entity)
 {
     row.SetField("id", entity.id);
     row.SetField("wh_zone", entity.whZone);
     row.SetField("aisle", entity.aisle);
     row.SetField("bin_num", entity.binNum);
     row.SetField("qty", entity.qty);
     row.SetField("stock_stat", entity.stockStat);
     row.SetField("delete_flag", entity.deleteFlag);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Pickdetail BuildPickdetailFromRow(DataRow row)
        {
            Pickdetail entity = new Pickdetail();

            entity.id         = row.IsNull("id") ? 0 : row.Field <int>("id");
            entity.whZone     = row.IsNull("wh_zone") ? string.Empty : row.Field <string>("wh_zone");
            entity.aisle      = row.IsNull("aisle") ? 0 : row.Field <int>("aisle");
            entity.binNum     = row.IsNull("bin_num") ? string.Empty : row.Field <string>("bin_num");
            entity.qty        = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty");
            entity.stockStat  = row.IsNull("stock_stat") ? string.Empty : row.Field <string>("stock_stat");
            entity.deleteFlag = row.Field <bool>("delete_flag");
            entity.rowid      = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }