/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOereturnlinelistsingle(ref DataRow row, Oereturnlinelistsingle entity) { row.SetField("custno", entity.custno); row.SetField("custnotesfl", entity.custnotesfl); row.SetField("name", entity.name); row.SetField("invnotesfl", entity.invnotesfl); row.SetField("stagecd", entity.stagecd); row.SetField("stagedesc", entity.stagedesc); row.SetField("userfield", entity.userfield); }
public static Oereturnlinelistsingle BuildOereturnlinelistsingleFromRow(DataRow row) { Oereturnlinelistsingle entity = new Oereturnlinelistsingle(); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.custnotesfl = row.IsNull("custnotesfl") ? string.Empty : row.Field <string>("custnotesfl"); entity.name = row.IsNull("name") ? string.Empty : row.Field <string>("name"); entity.invnotesfl = row.IsNull("invnotesfl") ? string.Empty : row.Field <string>("invnotesfl"); entity.stagecd = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd"); entity.stagedesc = row.IsNull("stagedesc") ? string.Empty : row.Field <string>("stagedesc"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }