Beispiel #1
0
        public static Kpewextend BuildKpewextendFromRow(DataRow row)
        {
            Kpewextend entity = new Kpewextend();

            entity.wono                = row.IsNull("wono") ? 0 : row.Field <int>("wono");
            entity.wosuf               = row.IsNull("wosuf") ? 0 : row.Field <int>("wosuf");
            entity.shipprod            = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.qtyship             = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.stkqtyship          = row.IsNull("stkqtyship") ? decimal.Zero : row.Field <decimal>("stkqtyship");
            entity.bofl                = row.Field <bool>("bofl");
            entity.refer               = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.proddesc            = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.orderaltnotxt       = row.IsNull("orderaltnotxt") ? string.Empty : row.Field <string>("orderaltnotxt");
            entity.orderaltnotxtlbl    = row.IsNull("orderaltnotxtlbl") ? string.Empty : row.Field <string>("orderaltnotxtlbl");
            entity.linealtno           = row.IsNull("linealtno") ? 0 : row.Field <int>("linealtno");
            entity.linealtqty          = row.IsNull("linealtqty") ? decimal.Zero : row.Field <decimal>("linealtqty");
            entity.unit                = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.unitstock           = row.IsNull("unitstock") ? string.Empty : row.Field <string>("unitstock");
            entity.allowshipoverridefl = row.IsNull("allowshipoverridefl") ? string.Empty : row.Field <string>("allowshipoverridefl");
            entity.whse                = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.wmfl                = row.Field <bool>("wmfl");
            entity.wmqtyship           = row.IsNull("wmqtyship") ? decimal.Zero : row.Field <decimal>("wmqtyship");
            entity.userfield           = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Beispiel #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromKpewextend(ref DataRow row, Kpewextend entity)
 {
     row.SetField("wono", entity.wono);
     row.SetField("wosuf", entity.wosuf);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("stkqtyship", entity.stkqtyship);
     row.SetField("bofl", entity.bofl);
     row.SetField("refer", entity.refer);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("orderaltnotxt", entity.orderaltnotxt);
     row.SetField("orderaltnotxtlbl", entity.orderaltnotxtlbl);
     row.SetField("linealtno", entity.linealtno);
     row.SetField("linealtqty", entity.linealtqty);
     row.SetField("unit", entity.unit);
     row.SetField("unitstock", entity.unitstock);
     row.SetField("allowshipoverridefl", entity.allowshipoverridefl);
     row.SetField("whse", entity.whse);
     row.SetField("wmfl", entity.wmfl);
     row.SetField("wmqtyship", entity.wmqtyship);
     row.SetField("userfield", entity.userfield);
 }