/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromRsasstatus(ref DataRow row, Rsasstatus entity) { row.SetField("statusmsg", entity.statusmsg); row.SetField("since", entity.since); row.SetField("pid", entity.pid); row.SetField("timezoneclient", entity.timezoneclient); row.SetField("startenabled", entity.startenabled); row.SetField("stopenabled", entity.stopenabled); row.SetField("buttonsdisabled", entity.buttonsdisabled); row.SetField("userfield", entity.userfield); }
public static Rsasstatus BuildRsasstatusFromRow(DataRow row) { Rsasstatus entity = new Rsasstatus(); entity.statusmsg = row.IsNull("statusmsg") ? string.Empty : row.Field <string>("statusmsg"); entity.since = row.IsNull("since") ? string.Empty : row.Field <string>("since"); entity.pid = row.IsNull("pid") ? string.Empty : row.Field <string>("pid"); entity.timezoneclient = row.IsNull("timezoneclient") ? 0 : row.Field <int>("timezoneclient"); entity.startenabled = row.Field <bool>("startenabled"); entity.stopenabled = row.Field <bool>("stopenabled"); entity.buttonsdisabled = row.Field <bool>("buttonsdisabled"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }