/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOtivvesselline(ref DataRow row, Otivvesselline entity) { row.SetField("lineno", entity.lineno); row.SetField("trackno", entity.trackno); row.SetField("notesfl", entity.notesfl); row.SetField("vendno", entity.vendno); row.SetField("vendnotes", entity.vendnotes); row.SetField("whse", entity.whse); row.SetField("contno", entity.contno); row.SetField("shipco", entity.shipco); row.SetField("shipid", entity.shipid); row.SetField("userfield", entity.userfield); }
public static Otivvesselline BuildOtivvessellineFromRow(DataRow row) { Otivvesselline entity = new Otivvesselline(); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.trackno = row.IsNull("trackno") ? 0 : row.Field <int>("trackno"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.vendnotes = row.IsNull("vendnotes") ? string.Empty : row.Field <string>("vendnotes"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.contno = row.IsNull("contno") ? string.Empty : row.Field <string>("contno"); entity.shipco = row.IsNull("shipco") ? string.Empty : row.Field <string>("shipco"); entity.shipid = row.IsNull("shipid") ? string.Empty : row.Field <string>("shipid"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }