コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIceamcriteria(ref DataRow row, Iceamcriteria entity)
 {
     row.SetField("transty", entity.transty);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("origprod", entity.origprod);
     row.SetField("custno", entity.custno);
     row.SetField("vendno", entity.vendno);
     row.SetField("whse", entity.whse);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Iceamcriteria BuildIceamcriteriaFromRow(DataRow row)
        {
            Iceamcriteria entity = new Iceamcriteria();

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