/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdemexcelnewsetupdtradd(ref DataRow row, Pdemexcelnewsetupdtradd entity) { row.SetField("cSetID", entity.cSetID); row.SetField("cDescription", entity.cDescription); row.SetField("deVendNo", entity.deVendNo); row.SetField("cRebateCd", entity.cRebateCd); row.SetField("lPriceRebFl", entity.lPriceRebFl); row.SetField("userfield", entity.userfield); }
public static Pdemexcelnewsetupdtradd BuildPdemexcelnewsetupdtraddFromRow(DataRow row) { Pdemexcelnewsetupdtradd entity = new Pdemexcelnewsetupdtradd(); entity.cSetID = row.IsNull("cSetID") ? string.Empty : row.Field <string>("cSetID"); entity.cDescription = row.IsNull("cDescription") ? string.Empty : row.Field <string>("cDescription"); entity.deVendNo = row.IsNull("deVendNo") ? decimal.Zero : row.Field <decimal>("deVendNo"); entity.cRebateCd = row.IsNull("cRebateCd") ? string.Empty : row.Field <string>("cRebateCd"); entity.lPriceRebFl = row.Field <bool>("lPriceRebFl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }