/// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApsplabelcriteria(ref DataRow row, Apsplabelcriteria entity)
 {
     row.SetField("Vendno", entity.vendno);
     row.SetField("Whse", entity.whse);
     row.SetField("ProdLine", entity.prodLine);
     row.SetField("Year", entity.year);
     row.SetField("userfield", entity.userfield);
 }
        public static Apsplabelcriteria BuildApsplabelcriteriaFromRow(DataRow row)
        {
            Apsplabelcriteria entity = new Apsplabelcriteria();

            entity.vendno    = row.IsNull("Vendno") ? decimal.Zero : row.Field <decimal>("Vendno");
            entity.whse      = row.IsNull("Whse") ? string.Empty : row.Field <string>("Whse");
            entity.prodLine  = row.IsNull("ProdLine") ? string.Empty : row.Field <string>("ProdLine");
            entity.year      = row.IsNull("Year") ? 0 : row.Field <int>("Year");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }