Ejemplo n.º 1
0
        public static Oeetassemblyfinalcriteria BuildOeetassemblyfinalcriteriaFromRow(DataRow row)
        {
            Oeetassemblyfinalcriteria entity = new Oeetassemblyfinalcriteria();

            entity.vawhse            = row.IsNull("vawhse") ? string.Empty : row.Field <string>("vawhse");
            entity.assemblytype      = row.IsNull("assemblytype") ? string.Empty : row.Field <string>("assemblytype");
            entity.verno             = row.IsNull("verno") ? 0 : row.Field <int>("verno");
            entity.prod              = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.numsegments       = row.IsNull("numsegments") ? 0 : row.Field <int>("numsegments");
            entity.qtytobuild        = row.IsNull("qtytobuild") ? decimal.Zero : row.Field <decimal>("qtytobuild");
            entity.orderwhse         = row.IsNull("orderwhse") ? string.Empty : row.Field <string>("orderwhse");
            entity.orderno           = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf          = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.lineno            = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.maintmode         = row.IsNull("maintmode") ? string.Empty : row.Field <string>("maintmode");
            entity.nonstockdisplay   = row.Field <bool>("nonstockdisplay");
            entity.nonstockasked     = row.Field <bool>("nonstockasked");
            entity.nonstockanswer    = row.Field <bool>("nonstockanswer");
            entity.nonstockmessage   = row.IsNull("nonstockmessage") ? string.Empty : row.Field <string>("nonstockmessage");
            entity.bofl              = row.Field <bool>("bofl");
            entity.taxablefl         = row.Field <bool>("taxablefl");
            entity.preassemblylength = row.IsNull("preassemblylength") ? decimal.Zero : row.Field <decimal>("preassemblylength");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeetassemblyfinalcriteria(ref DataRow row, Oeetassemblyfinalcriteria entity)
 {
     row.SetField("vawhse", entity.vawhse);
     row.SetField("assemblytype", entity.assemblytype);
     row.SetField("verno", entity.verno);
     row.SetField("prod", entity.prod);
     row.SetField("numsegments", entity.numsegments);
     row.SetField("qtytobuild", entity.qtytobuild);
     row.SetField("orderwhse", entity.orderwhse);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("maintmode", entity.maintmode);
     row.SetField("nonstockdisplay", entity.nonstockdisplay);
     row.SetField("nonstockasked", entity.nonstockasked);
     row.SetField("nonstockanswer", entity.nonstockanswer);
     row.SetField("nonstockmessage", entity.nonstockmessage);
     row.SetField("bofl", entity.bofl);
     row.SetField("taxablefl", entity.taxablefl);
     row.SetField("preassemblylength", entity.preassemblylength);
     row.SetField("userfield", entity.userfield);
 }