Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcsprsrcsearchcriteria(ref DataRow row, Icsprsrcsearchcriteria entity)
 {
     row.SetField("restricttype", entity.restricttype);
     row.SetField("product", entity.product);
     row.SetField("prodline", entity.prodline);
     row.SetField("vendno", entity.vendno);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("whse", entity.whse);
     row.SetField("startdt", entity.startdt);
     row.SetField("statuscd", entity.statuscd);
     row.SetField("restrictovrfl", entity.restrictovrfl);
     row.SetField("recordlimit", entity.recordlimit);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Icsprsrcsearchcriteria BuildIcsprsrcsearchcriteriaFromRow(DataRow row)
        {
            Icsprsrcsearchcriteria entity = new Icsprsrcsearchcriteria();

            entity.restricttype  = row.IsNull("restricttype") ? string.Empty : row.Field <string>("restricttype");
            entity.product       = row.IsNull("product") ? string.Empty : row.Field <string>("product");
            entity.prodline      = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.vendno        = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.prodcat       = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.whse          = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.startdt       = row.Field <DateTime?>("startdt");
            entity.statuscd      = row.IsNull("statuscd") ? string.Empty : row.Field <string>("statuscd");
            entity.restrictovrfl = row.Field <bool>("restrictovrfl");
            entity.recordlimit   = row.IsNull("recordlimit") ? 0 : row.Field <int>("recordlimit");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }