public static Aretcmproof BuildAretcmproofFromRow(DataRow row) { Aretcmproof entity = new Aretcmproof(); entity.amountproof = row.IsNull("amountproof") ? decimal.Zero : row.Field <decimal>("amountproof"); entity.discproof = row.IsNull("discproof") ? decimal.Zero : row.Field <decimal>("discproof"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromAretcmproof(ref DataRow row, Aretcmproof entity) { row.SetField("amountproof", entity.amountproof); row.SetField("discproof", entity.discproof); row.SetField("userfield", entity.userfield); }