示例#1
0
      /// <summary>
      /// Update a database row from a class
      /// </summary>
      public static void UpdateRowFromItemavailprime(ref DataRow row, Itemavailprime entity)
      {
         row.SetField("fullCase", entity.fullCase);
         row.SetField("fcQty", entity.fcQty);
         row.SetField("splitCase", entity.splitCase);
         row.SetField("scQty", entity.scQty);
         row.SetField("counter", entity.counter);
         row.SetField("counterQty", entity.counterQty);
         row.SetField("pallet", entity.pallet);
         row.SetField("palletQty", entity.palletQty);
         row.SetField("itemavailprimeuserfield", entity.itemavailprimeuserfield);
         row.SetField("userfield", entity.userfield);

      }
示例#2
0
 public static Itemavailprime BuildItemavailprimeFromRow(DataRow row)
 {
    Itemavailprime entity = new Itemavailprime();
    entity.fullCase = row.IsNull("fullCase") ? string.Empty : row.Field<string>("fullCase");
    entity.fcQty = row.IsNull("fcQty") ? decimal.Zero : row.Field<decimal>("fcQty");
    entity.splitCase = row.IsNull("splitCase") ? string.Empty : row.Field<string>("splitCase");
    entity.scQty = row.IsNull("scQty") ? decimal.Zero : row.Field<decimal>("scQty");
    entity.counter = row.IsNull("counter") ? string.Empty : row.Field<string>("counter");
    entity.counterQty = row.IsNull("counterQty") ? decimal.Zero : row.Field<decimal>("counterQty");
    entity.pallet = row.IsNull("pallet") ? string.Empty : row.Field<string>("pallet");
    entity.palletQty = row.IsNull("palletQty") ? decimal.Zero : row.Field<decimal>("palletQty");
    entity.itemavailprimeuserfield = row.IsNull("itemavailprimeuserfield") ? string.Empty : row.Field<string>("itemavailprimeuserfield");
    entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field<string>("userfield");
    return entity;
 }