Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromItemlotexpiration(ref DataRow row, Itemlotexpiration entity)
 {
     row.SetField("exp_date", entity.expDate);
     row.SetField("exp_days", entity.expDays);
     row.SetField("lot_num", entity.lotNum);
     row.SetField("num_bins", entity.numBins);
     row.SetField("total_qty", entity.totalQty);
     row.SetField("itemlotexpirationuserfield", entity.itemlotexpirationuserfield);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Itemlotexpiration BuildItemlotexpirationFromRow(DataRow row)
        {
            Itemlotexpiration entity = new Itemlotexpiration();

            entity.expDate  = row.Field <DateTime?>("exp_date");
            entity.expDays  = row.IsNull("exp_days") ? 0 : row.Field <int>("exp_days");
            entity.lotNum   = row.IsNull("lot_num") ? string.Empty : row.Field <string>("lot_num");
            entity.numBins  = row.IsNull("num_bins") ? 0 : row.Field <int>("num_bins");
            entity.totalQty = row.IsNull("total_qty") ? 0 : row.Field <int>("total_qty");
            entity.itemlotexpirationuserfield = row.IsNull("itemlotexpirationuserfield") ? string.Empty : row.Field <string>("itemlotexpirationuserfield");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }