Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIceavcriteria(ref DataRow row, Iceavcriteria entity)
 {
     row.SetField("vendno", entity.vendno);
     row.SetField("whse", entity.whse);
     row.SetField("origprod", entity.origprod);
     row.SetField("coreprod", entity.coreprod);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Iceavcriteria BuildIceavcriteriaFromRow(DataRow row)
        {
            Iceavcriteria entity = new Iceavcriteria();

            entity.vendno           = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.whse             = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.origprod         = row.IsNull("origprod") ? string.Empty : row.Field <string>("origprod");
            entity.coreprod         = row.IsNull("coreprod") ? string.Empty : row.Field <string>("coreprod");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }