/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeersdetaillinesnlot(ref DataRow row, Oeersdetaillinesnlot entity) { row.SetField("lineno", entity.lineno); row.SetField("seqno", entity.seqno); row.SetField("serlottype", entity.serlottype); row.SetField("snlotno", entity.snlotno); row.SetField("qtysel", entity.qtysel); row.SetField("qtybo", entity.qtybo); row.SetField("userfield", entity.userfield); }
public static Oeersdetaillinesnlot BuildOeersdetaillinesnlotFromRow(DataRow row) { Oeersdetaillinesnlot entity = new Oeersdetaillinesnlot(); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.serlottype = row.IsNull("serlottype") ? string.Empty : row.Field <string>("serlottype"); entity.snlotno = row.IsNull("snlotno") ? string.Empty : row.Field <string>("snlotno"); entity.qtysel = row.IsNull("qtysel") ? decimal.Zero : row.Field <decimal>("qtysel"); entity.qtybo = row.IsNull("qtybo") ? decimal.Zero : row.Field <decimal>("qtybo"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }