/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOefloorplan(ref DataRow row, Oefloorplan entity) { row.SetField("fpcustno", entity.fpcustno); row.SetField("floorplanfl", entity.floorplanfl); row.SetField("invno", entity.invno); row.SetField("invsuf", entity.invsuf); row.SetField("transtype", entity.transtype); row.SetField("userfield", entity.userfield); }
public static Oefloorplan BuildOefloorplanFromRow(DataRow row) { Oefloorplan entity = new Oefloorplan(); entity.fpcustno = row.IsNull("fpcustno") ? decimal.Zero : row.Field <decimal>("fpcustno"); entity.floorplanfl = row.Field <bool>("floorplanfl"); entity.invno = row.IsNull("invno") ? 0 : row.Field <int>("invno"); entity.invsuf = row.IsNull("invsuf") ? 0 : row.Field <int>("invsuf"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }