/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPoetprintglobals(ref DataRow row, Poetprintglobals entity) { row.SetField("cono", entity.cono); row.SetField("operinit", entity.operinit); row.SetField("g-whereappfl", entity.gWhereappfl); row.SetField("g-poprintfl", entity.gPoprintfl); row.SetField("g-pofilefl", entity.gPofilefl); row.SetField("g-printernmpo", entity.gPrinternmpo); row.SetField("g-queuepo", entity.gQueuepo); row.SetField("g-whse", entity.gWhse); row.SetField("userfield", entity.userfield); }
public static Poetprintglobals BuildPoetprintglobalsFromRow(DataRow row) { Poetprintglobals entity = new Poetprintglobals(); entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono"); entity.operinit = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit"); entity.gWhereappfl = row.Field <bool>("g-whereappfl"); entity.gPoprintfl = row.Field <bool>("g-poprintfl"); entity.gPofilefl = row.Field <bool>("g-pofilefl"); entity.gPrinternmpo = row.IsNull("g-printernmpo") ? string.Empty : row.Field <string>("g-printernmpo"); entity.gQueuepo = row.IsNull("g-queuepo") ? string.Empty : row.Field <string>("g-queuepo"); entity.gWhse = row.IsNull("g-whse") ? string.Empty : row.Field <string>("g-whse"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }