示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVanonstockvalidate(ref DataRow row, Vanonstockvalidate entity)
 {
     row.SetField("shipprod", entity.shipprod);
     row.SetField("whse", entity.whse);
     row.SetField("arpprodline", entity.arpprodline);
     row.SetField("arpvendno", entity.arpvendno);
     row.SetField("arpwhse", entity.arpwhse);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("asknsoanfl", entity.asknsoanfl);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Vanonstockvalidate BuildVanonstockvalidateFromRow(DataRow row)
        {
            Vanonstockvalidate entity = new Vanonstockvalidate();

            entity.shipprod    = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.arpprodline = row.IsNull("arpprodline") ? string.Empty : row.Field <string>("arpprodline");
            entity.arpvendno   = row.IsNull("arpvendno") ? decimal.Zero : row.Field <decimal>("arpvendno");
            entity.arpwhse     = row.IsNull("arpwhse") ? string.Empty : row.Field <string>("arpwhse");
            entity.prodcat     = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.asknsoanfl  = row.Field <bool>("asknsoanfl");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }