Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPhysuncountedinvresults(ref DataRow row, Physuncountedinvresults entity)
 {
     row.SetField("item", entity.item);
     row.SetField("loc", entity.loc);
     row.SetField("zone", entity.zone);
     row.SetField("pallet", entity.pallet);
     row.SetField("lot", entity.lot);
     row.SetField("qty", entity.qty);
     row.SetField("inventoryRowID", entity.inventoryRowID.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Physuncountedinvresults BuildPhysuncountedinvresultsFromRow(DataRow row)
        {
            Physuncountedinvresults entity = new Physuncountedinvresults();

            entity.item           = row.IsNull("item") ? string.Empty : row.Field <string>("item");
            entity.loc            = row.IsNull("loc") ? string.Empty : row.Field <string>("loc");
            entity.zone           = row.IsNull("zone") ? string.Empty : row.Field <string>("zone");
            entity.pallet         = row.IsNull("pallet") ? string.Empty : row.Field <string>("pallet");
            entity.lot            = row.IsNull("lot") ? string.Empty : row.Field <string>("lot");
            entity.qty            = row.IsNull("qty") ? 0 : row.Field <int>("qty");
            entity.inventoryRowID = row.Field <byte[]>("inventoryRowID").ToStringEncoded();
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }