public static Shoplistupdatetotals BuildShoplistupdatetotalsFromRow(DataRow row) { Shoplistupdatetotals entity = new Shoplistupdatetotals(); entity.totalordered = row.IsNull("totalordered") ? decimal.Zero : row.Field <decimal>("totalordered"); entity.totalrecommend = row.IsNull("totalrecommend") ? decimal.Zero : row.Field <decimal>("totalrecommend"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromShoplistupdatetotals(ref DataRow row, Shoplistupdatetotals entity) { row.SetField("totalordered", entity.totalordered); row.SetField("totalrecommend", entity.totalrecommend); }