/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPoeifinalinit(ref DataRow row, Poeifinalinit entity) { row.SetField("updatefl", entity.updatefl); row.SetField("receiptprinter", entity.receiptprinter); row.SetField("pickprinter", entity.pickprinter); row.SetField("receiptsensitive", entity.receiptsensitive); row.SetField("picksensitive", entity.picksensitive); row.SetField("crctexistsfl", entity.crctexistsfl); row.SetField("errorpono", entity.errorpono); row.SetField("errorposuf", entity.errorposuf); row.SetField("userfield", entity.userfield); }
public static Poeifinalinit BuildPoeifinalinitFromRow(DataRow row) { Poeifinalinit entity = new Poeifinalinit(); entity.updatefl = row.Field <bool>("updatefl"); entity.receiptprinter = row.IsNull("receiptprinter") ? string.Empty : row.Field <string>("receiptprinter"); entity.pickprinter = row.IsNull("pickprinter") ? string.Empty : row.Field <string>("pickprinter"); entity.receiptsensitive = row.Field <bool>("receiptsensitive"); entity.picksensitive = row.Field <bool>("picksensitive"); entity.crctexistsfl = row.Field <bool>("crctexistsfl"); entity.errorpono = row.IsNull("errorpono") ? 0 : row.Field <int>("errorpono"); entity.errorposuf = row.IsNull("errorposuf") ? 0 : row.Field <int>("errorposuf"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }