/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromGletamtresults(ref DataRow row, Gletamtresults entity) { row.SetField("cDescrip", entity.cDescrip); row.SetField("readydb", entity.readydb); row.SetField("readycr", entity.readycr); row.SetField("readybal", entity.readybal); row.SetField("holddb", entity.holddb); row.SetField("holdcr", entity.holdcr); row.SetField("holdbal", entity.holdbal); row.SetField("totdb", entity.totdb); row.SetField("totcr", entity.totcr); row.SetField("totbal", entity.totbal); row.SetField("lastupddt", entity.lastupddt); row.SetField("lastupdtm", entity.lastupdtm); row.SetField("cMode", entity.cMode); row.SetField("userfield", entity.userfield); }
public static Gletamtresults BuildGletamtresultsFromRow(DataRow row) { Gletamtresults entity = new Gletamtresults(); entity.cDescrip = row.IsNull("cDescrip") ? string.Empty : row.Field <string>("cDescrip"); entity.readydb = row.IsNull("readydb") ? decimal.Zero : row.Field <decimal>("readydb"); entity.readycr = row.IsNull("readycr") ? decimal.Zero : row.Field <decimal>("readycr"); entity.readybal = row.IsNull("readybal") ? decimal.Zero : row.Field <decimal>("readybal"); entity.holddb = row.IsNull("holddb") ? decimal.Zero : row.Field <decimal>("holddb"); entity.holdcr = row.IsNull("holdcr") ? decimal.Zero : row.Field <decimal>("holdcr"); entity.holdbal = row.IsNull("holdbal") ? decimal.Zero : row.Field <decimal>("holdbal"); entity.totdb = row.IsNull("totdb") ? decimal.Zero : row.Field <decimal>("totdb"); entity.totcr = row.IsNull("totcr") ? decimal.Zero : row.Field <decimal>("totcr"); entity.totbal = row.IsNull("totbal") ? decimal.Zero : row.Field <decimal>("totbal"); entity.lastupddt = row.Field <DateTime?>("lastupddt"); entity.lastupdtm = row.IsNull("lastupdtm") ? string.Empty : row.Field <string>("lastupdtm"); entity.cMode = row.IsNull("cMode") ? string.Empty : row.Field <string>("cMode"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }