public static Oeioloadlnhistresults BuildOeioloadlnhistresultsFromRow(DataRow row) { Oeioloadlnhistresults entity = new Oeioloadlnhistresults(); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.stagecdwords = row.IsNull("stagecdwords") ? string.Empty : row.Field <string>("stagecdwords"); entity.specnstype = row.IsNull("specnstype") ? string.Empty : row.Field <string>("specnstype"); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.prodnotesfl = row.IsNull("prodnotesfl") ? string.Empty : row.Field <string>("prodnotesfl"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.bono = row.IsNull("bono") ? 0 : row.Field <int>("bono"); entity.commentfl = row.Field <bool>("commentfl"); entity.rushdspl = row.IsNull("rushdspl") ? string.Empty : row.Field <string>("rushdspl"); entity.qtyord = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord"); entity.qtyship = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship"); entity.price = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price"); entity.dsplprice = row.IsNull("dsplprice") ? string.Empty : row.Field <string>("dsplprice"); entity.qtybreakty = row.IsNull("qtybreakty") ? string.Empty : row.Field <string>("qtybreakty"); entity.discamt = row.IsNull("discamt") ? decimal.Zero : row.Field <decimal>("discamt"); entity.dspldiscamt = row.IsNull("dspldiscamt") ? string.Empty : row.Field <string>("dspldiscamt"); entity.disctype = row.Field <bool>("disctype"); entity.netamt = row.IsNull("netamt") ? decimal.Zero : row.Field <decimal>("netamt"); entity.dsplnetamt = row.IsNull("dsplnetamt") ? string.Empty : row.Field <string>("dsplnetamt"); entity.dodsply = row.IsNull("dodsply") ? string.Empty : row.Field <string>("dodsply"); entity.jitdsply = row.IsNull("jitdsply") ? string.Empty : row.Field <string>("jitdsply"); entity.proddesc = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc"); entity.orderaltno = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno"); entity.ordertype = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype"); entity.speccostdsply = row.IsNull("speccostdsply") ? string.Empty : row.Field <string>("speccostdsply"); entity.qtyreturndsply = row.IsNull("qtyreturndsply") ? string.Empty : row.Field <string>("qtyreturndsply"); entity.prodcost = row.IsNull("prodcost") ? decimal.Zero : row.Field <decimal>("prodcost"); entity.dsplprodcost = row.IsNull("dsplprodcost") ? string.Empty : row.Field <string>("dsplprodcost"); entity.priceoverfl = row.Field <bool>("priceoverfl"); entity.priceclty = row.IsNull("priceclty") ? string.Empty : row.Field <string>("priceclty"); entity.custprod = row.IsNull("custprod") ? string.Empty : row.Field <string>("custprod"); entity.shipdt = row.Field <DateTime?>("shipdt"); entity.duedt = row.Field <DateTime?>("duedt"); entity.receiptdt = row.Field <DateTime?>("receiptdt"); entity.tiestage = row.IsNull("tiestage") ? string.Empty : row.Field <string>("tiestage"); entity.tiesuf = row.IsNull("tiesuf") ? 0 : row.Field <int>("tiesuf"); entity.tieloc = row.IsNull("tieloc") ? string.Empty : row.Field <string>("tieloc"); entity.shipvia = row.IsNull("shipvia") ? string.Empty : row.Field <string>("shipvia"); entity.ncnr = row.IsNull("ncnr") ? string.Empty : row.Field <string>("ncnr"); entity.eccnclasscd = row.IsNull("eccnclasscd") ? string.Empty : row.Field <string>("eccnclasscd"); entity.countryoforigin = row.IsNull("countryoforigin") ? string.Empty : row.Field <string>("countryoforigin"); entity.tariffcd = row.IsNull("tariffcd") ? string.Empty : row.Field <string>("tariffcd"); entity.upcid = row.IsNull("upcid") ? string.Empty : row.Field <string>("upcid"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeioloadlnhistresults(ref DataRow row, Oeioloadlnhistresults entity) { row.SetField("lineno", entity.lineno); row.SetField("ordersuf", entity.ordersuf); row.SetField("transtype", entity.transtype); row.SetField("stagecdwords", entity.stagecdwords); row.SetField("specnstype", entity.specnstype); row.SetField("shipprod", entity.shipprod); row.SetField("prodnotesfl", entity.prodnotesfl); row.SetField("notesfl", entity.notesfl); row.SetField("unit", entity.unit); row.SetField("bono", entity.bono); row.SetField("commentfl", entity.commentfl); row.SetField("rushdspl", entity.rushdspl); row.SetField("qtyord", entity.qtyord); row.SetField("qtyship", entity.qtyship); row.SetField("price", entity.price); row.SetField("dsplprice", entity.dsplprice); row.SetField("qtybreakty", entity.qtybreakty); row.SetField("discamt", entity.discamt); row.SetField("dspldiscamt", entity.dspldiscamt); row.SetField("disctype", entity.disctype); row.SetField("netamt", entity.netamt); row.SetField("dsplnetamt", entity.dsplnetamt); row.SetField("dodsply", entity.dodsply); row.SetField("jitdsply", entity.jitdsply); row.SetField("proddesc", entity.proddesc); row.SetField("orderaltno", entity.orderaltno); row.SetField("ordertype", entity.ordertype); row.SetField("speccostdsply", entity.speccostdsply); row.SetField("qtyreturndsply", entity.qtyreturndsply); row.SetField("prodcost", entity.prodcost); row.SetField("dsplprodcost", entity.dsplprodcost); row.SetField("priceoverfl", entity.priceoverfl); row.SetField("priceclty", entity.priceclty); row.SetField("custprod", entity.custprod); row.SetField("shipdt", entity.shipdt); row.SetField("duedt", entity.duedt); row.SetField("receiptdt", entity.receiptdt); row.SetField("tiestage", entity.tiestage); row.SetField("tiesuf", entity.tiesuf); row.SetField("tieloc", entity.tieloc); row.SetField("shipvia", entity.shipvia); row.SetField("ncnr", entity.ncnr); row.SetField("eccnclasscd", entity.eccnclasscd); row.SetField("countryoforigin", entity.countryoforigin); row.SetField("tariffcd", entity.tariffcd); row.SetField("upcid", entity.upcid); row.SetField("userfield", entity.userfield); }