Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCheckprodxrefsingle(ref DataRow row, Checkprodxrefsingle entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("type", entity.type);
     row.SetField("qty", entity.qty);
     row.SetField("unit", entity.unit);
     row.SetField("cancelfl", entity.cancelfl);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Checkprodxrefsingle BuildCheckprodxrefsingleFromRow(DataRow row)
        {
            Checkprodxrefsingle entity = new Checkprodxrefsingle();

            entity.prod      = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.type      = row.IsNull("type") ? string.Empty : row.Field <string>("type");
            entity.qty       = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty");
            entity.unit      = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.cancelfl  = row.Field <bool>("cancelfl");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }