Beispiel #1
0
      /// <summary>
      /// Update a database row from a class
      /// </summary>
      public static void UpdateRowFromPocoreallocationupdate(ref DataRow row, Pocoreallocationupdate entity)
      {
         row.SetField("proofok", entity.proofok);
         row.SetField("price", entity.price);
         row.SetField("stkqtyrcv", entity.stkqtyrcv);
         row.SetField("qtyrcv", entity.qtyrcv);
         row.SetField("warrantyfl", entity.warrantyfl);
         row.SetField("chgwhse", entity.chgwhse);
         row.SetField("subprod", entity.subprod);
         row.SetField("userfield", entity.userfield);

      }
Beispiel #2
0
 public static Pocoreallocationupdate BuildPocoreallocationupdateFromRow(DataRow row)
 {
    Pocoreallocationupdate entity = new Pocoreallocationupdate();
    entity.proofok = row.Field<bool>("proofok");
    entity.price = row.IsNull("price") ? decimal.Zero : row.Field<decimal>("price");
    entity.stkqtyrcv = row.IsNull("stkqtyrcv") ? decimal.Zero : row.Field<decimal>("stkqtyrcv");
    entity.qtyrcv = row.IsNull("qtyrcv") ? decimal.Zero : row.Field<decimal>("qtyrcv");
    entity.warrantyfl = row.Field<bool>("warrantyfl");
    entity.chgwhse = row.IsNull("chgwhse") ? string.Empty : row.Field<string>("chgwhse");
    entity.subprod = row.IsNull("subprod") ? string.Empty : row.Field<string>("subprod");
    entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field<string>("userfield");
    return entity;
 }