/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPderfinalupdate(ref DataRow row, Pderfinalupdate entity) { row.SetField("claimno", entity.claimno); row.SetField("vendno", entity.vendno); row.SetField("jrnlno", entity.jrnlno); row.SetField("currencyty", entity.currencyty); row.SetField("currencytyhidden", entity.currencytyhidden); row.SetField("currencytyenabled", entity.currencytyenabled); row.SetField("reconexrate", entity.reconexrate); row.SetField("reconexrateenabled", entity.reconexrateenabled); row.SetField("reconexrateupdatefl", entity.reconexrateupdatefl); row.SetField("secure", entity.secure); row.SetField("userfield", entity.userfield); }
public static Pderfinalupdate BuildPderfinalupdateFromRow(DataRow row) { Pderfinalupdate entity = new Pderfinalupdate(); entity.claimno = row.IsNull("claimno") ? 0 : row.Field <int>("claimno"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.jrnlno = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno"); entity.currencyty = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty"); entity.currencytyhidden = row.Field <bool>("currencytyhidden"); entity.currencytyenabled = row.Field <bool>("currencytyenabled"); entity.reconexrate = row.IsNull("reconexrate") ? decimal.Zero : row.Field <decimal>("reconexrate"); entity.reconexrateenabled = row.Field <bool>("reconexrateenabled"); entity.reconexrateupdatefl = row.Field <bool>("reconexrateupdatefl"); entity.secure = row.IsNull("secure") ? 0 : row.Field <int>("secure"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }