/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPoipbuildpolistresults(ref DataRow row, Poipbuildpolistresults entity) { row.SetField("pono", entity.pono); row.SetField("posuf", entity.posuf); row.SetField("notesfl", entity.notesfl); row.SetField("vendno", entity.vendno); row.SetField("whse", entity.whse); row.SetField("transtype", entity.transtype); row.SetField("shipfmno", entity.shipfmno); row.SetField("buyer", entity.buyer); row.SetField("rcvoperinit", entity.rcvoperinit); row.SetField("receiverno", entity.receiverno); row.SetField("costeddt", entity.costeddt); row.SetField("duedt", entity.duedt); row.SetField("enterdt", entity.enterdt); row.SetField("orderdt", entity.orderdt); row.SetField("paiddt", entity.paiddt); row.SetField("printeddt", entity.printeddt); row.SetField("receiptdt", entity.receiptdt); row.SetField("reqshipdt", entity.reqshipdt); row.SetField("totqtyord", entity.totqtyord); row.SetField("totqtyrcv", entity.totqtyrcv); row.SetField("totinvamt", entity.totinvamt); row.SetField("totlineamt", entity.totlineamt); row.SetField("totrcvamt", entity.totrcvamt); row.SetField("approvty", entity.approvty); row.SetField("vendordno", entity.vendordno); row.SetField("crreasonty", entity.crreasonty); row.SetField("shipprod", entity.shipprod); row.SetField("qtyord", entity.qtyord); row.SetField("qtyrcv", entity.qtyrcv); row.SetField("trackno", entity.trackno); row.SetField("lineno", entity.lineno); row.SetField("nonstockty", entity.nonstockty); row.SetField("pdsvcrecno", entity.pdsvcrecno); row.SetField("contractno", entity.contractno); row.SetField("commentfl", entity.commentfl); row.SetField("unit", entity.unit); row.SetField("ncnr", entity.ncnr); row.SetField("compseqno", entity.compseqno); row.SetField("compshipprod", entity.compshipprod); row.SetField("compqtyord", entity.compqtyord); row.SetField("compunit", entity.compunit); row.SetField("totrcvamthilight", entity.totrcvamthilight); row.SetField("totqtyrcvhilight", entity.totqtyrcvhilight); row.SetField("totinvamthilight", entity.totinvamthilight); row.SetField("vendnotes", entity.vendnotes); row.SetField("stagedesc", entity.stagedesc); row.SetField("valueamt", entity.valueamt); row.SetField("freightexpected", entity.freightexpected); row.SetField("prodnotes", entity.prodnotes); row.SetField("vendorproduct", entity.vendorproduct); row.SetField("vendquote", entity.vendquote); row.SetField("compnotes", entity.compnotes); row.SetField("crreasontydesc", entity.crreasontydesc); row.SetField("daysold", entity.daysold); row.SetField("vendtype", entity.vendtype); row.SetField("name", entity.name); row.SetField("apssname", entity.apssname); row.SetField("icsdname", entity.icsdname); row.SetField("buyername", entity.buyername); row.SetField("vendretauth", entity.vendretauth); }
public static Poipbuildpolistresults BuildPoipbuildpolistresultsFromRow(DataRow row) { Poipbuildpolistresults entity = new Poipbuildpolistresults(); entity.pono = row.IsNull("pono") ? 0 : row.Field <int>("pono"); entity.posuf = row.IsNull("posuf") ? 0 : row.Field <int>("posuf"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.shipfmno = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno"); entity.buyer = row.IsNull("buyer") ? string.Empty : row.Field <string>("buyer"); entity.rcvoperinit = row.IsNull("rcvoperinit") ? string.Empty : row.Field <string>("rcvoperinit"); entity.receiverno = row.IsNull("receiverno") ? string.Empty : row.Field <string>("receiverno"); entity.costeddt = row.Field <DateTime?>("costeddt"); entity.duedt = row.Field <DateTime?>("duedt"); entity.enterdt = row.Field <DateTime?>("enterdt"); entity.orderdt = row.Field <DateTime?>("orderdt"); entity.paiddt = row.Field <DateTime?>("paiddt"); entity.printeddt = row.Field <DateTime?>("printeddt"); entity.receiptdt = row.Field <DateTime?>("receiptdt"); entity.reqshipdt = row.Field <DateTime?>("reqshipdt"); entity.totqtyord = row.IsNull("totqtyord") ? decimal.Zero : row.Field <decimal>("totqtyord"); entity.totqtyrcv = row.IsNull("totqtyrcv") ? decimal.Zero : row.Field <decimal>("totqtyrcv"); entity.totinvamt = row.IsNull("totinvamt") ? decimal.Zero : row.Field <decimal>("totinvamt"); entity.totlineamt = row.IsNull("totlineamt") ? decimal.Zero : row.Field <decimal>("totlineamt"); entity.totrcvamt = row.IsNull("totrcvamt") ? decimal.Zero : row.Field <decimal>("totrcvamt"); entity.approvty = row.IsNull("approvty") ? string.Empty : row.Field <string>("approvty"); entity.vendordno = row.IsNull("vendordno") ? string.Empty : row.Field <string>("vendordno"); entity.crreasonty = row.IsNull("crreasonty") ? string.Empty : row.Field <string>("crreasonty"); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.qtyord = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord"); entity.qtyrcv = row.IsNull("qtyrcv") ? decimal.Zero : row.Field <decimal>("qtyrcv"); entity.trackno = row.IsNull("trackno") ? 0 : row.Field <int>("trackno"); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.nonstockty = row.IsNull("nonstockty") ? string.Empty : row.Field <string>("nonstockty"); entity.pdsvcrecno = row.IsNull("pdsvcrecno") ? 0 : row.Field <int>("pdsvcrecno"); entity.contractno = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno"); entity.commentfl = row.Field <bool>("commentfl"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.ncnr = row.IsNull("ncnr") ? string.Empty : row.Field <string>("ncnr"); entity.compseqno = row.IsNull("compseqno") ? 0 : row.Field <int>("compseqno"); entity.compshipprod = row.IsNull("compshipprod") ? string.Empty : row.Field <string>("compshipprod"); entity.compqtyord = row.IsNull("compqtyord") ? decimal.Zero : row.Field <decimal>("compqtyord"); entity.compunit = row.IsNull("compunit") ? string.Empty : row.Field <string>("compunit"); entity.totrcvamthilight = row.Field <bool>("totrcvamthilight"); entity.totqtyrcvhilight = row.Field <bool>("totqtyrcvhilight"); entity.totinvamthilight = row.Field <bool>("totinvamthilight"); entity.vendnotes = row.IsNull("vendnotes") ? string.Empty : row.Field <string>("vendnotes"); entity.stagedesc = row.IsNull("stagedesc") ? string.Empty : row.Field <string>("stagedesc"); entity.valueamt = row.IsNull("valueamt") ? decimal.Zero : row.Field <decimal>("valueamt"); entity.freightexpected = row.IsNull("freightexpected") ? string.Empty : row.Field <string>("freightexpected"); entity.prodnotes = row.IsNull("prodnotes") ? string.Empty : row.Field <string>("prodnotes"); entity.vendorproduct = row.IsNull("vendorproduct") ? string.Empty : row.Field <string>("vendorproduct"); entity.vendquote = row.IsNull("vendquote") ? string.Empty : row.Field <string>("vendquote"); entity.compnotes = row.IsNull("compnotes") ? string.Empty : row.Field <string>("compnotes"); entity.crreasontydesc = row.IsNull("crreasontydesc") ? string.Empty : row.Field <string>("crreasontydesc"); entity.daysold = row.IsNull("daysold") ? 0 : row.Field <int>("daysold"); entity.vendtype = row.IsNull("vendtype") ? string.Empty : row.Field <string>("vendtype"); entity.name = row.IsNull("name") ? string.Empty : row.Field <string>("name"); entity.apssname = row.IsNull("apssname") ? string.Empty : row.Field <string>("apssname"); entity.icsdname = row.IsNull("icsdname") ? string.Empty : row.Field <string>("icsdname"); entity.buyername = row.IsNull("buyername") ? string.Empty : row.Field <string>("buyername"); entity.vendretauth = row.IsNull("vendretauth") ? string.Empty : row.Field <string>("vendretauth"); return(entity); }