/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromValinelaborreviewtotals(ref DataRow row, Valinelaborreviewtotals entity) { row.SetField("completeactualcost", entity.completeactualcost); row.SetField("completeestimatedcost", entity.completeestimatedcost); row.SetField("unitactualcost", entity.unitactualcost); row.SetField("unitestimatedcost", entity.unitestimatedcost); row.SetField("controlledactualcost", entity.controlledactualcost); row.SetField("controlledestimatedcost", entity.controlledestimatedcost); row.SetField("controlledappliedcost", entity.controlledappliedcost); row.SetField("actualandestimatedexist", entity.actualandestimatedexist); }
public static Valinelaborreviewtotals BuildValinelaborreviewtotalsFromRow(DataRow row) { Valinelaborreviewtotals entity = new Valinelaborreviewtotals(); entity.completeactualcost = row.IsNull("completeactualcost") ? decimal.Zero : row.Field <decimal>("completeactualcost"); entity.completeestimatedcost = row.IsNull("completeestimatedcost") ? decimal.Zero : row.Field <decimal>("completeestimatedcost"); entity.unitactualcost = row.IsNull("unitactualcost") ? decimal.Zero : row.Field <decimal>("unitactualcost"); entity.unitestimatedcost = row.IsNull("unitestimatedcost") ? decimal.Zero : row.Field <decimal>("unitestimatedcost"); entity.controlledactualcost = row.IsNull("controlledactualcost") ? decimal.Zero : row.Field <decimal>("controlledactualcost"); entity.controlledestimatedcost = row.IsNull("controlledestimatedcost") ? decimal.Zero : row.Field <decimal>("controlledestimatedcost"); entity.controlledappliedcost = row.IsNull("controlledappliedcost") ? decimal.Zero : row.Field <decimal>("controlledappliedcost"); entity.actualandestimatedexist = row.Field <bool>("actualandestimatedexist"); return(entity); }