public static Oecalcordshptotresults BuildOecalcordshptotresultsFromRow(DataRow row) { Oecalcordshptotresults entity = new Oecalcordshptotresults(); entity.shplineamt = row.IsNull("shplineamt") ? decimal.Zero : row.Field <decimal>("shplineamt"); entity.ordlineamt = row.IsNull("ordlineamt") ? decimal.Zero : row.Field <decimal>("ordlineamt"); entity.shpdiscamt = row.IsNull("shpdiscamt") ? decimal.Zero : row.Field <decimal>("shpdiscamt"); entity.orddiscamt = row.IsNull("orddiscamt") ? decimal.Zero : row.Field <decimal>("orddiscamt"); entity.shpaddonamt = row.IsNull("shpaddonamt") ? decimal.Zero : row.Field <decimal>("shpaddonamt"); entity.ordaddonamt = row.IsNull("ordaddonamt") ? decimal.Zero : row.Field <decimal>("ordaddonamt"); entity.shptaxamt = row.IsNull("shptaxamt") ? decimal.Zero : row.Field <decimal>("shptaxamt"); entity.ordtaxamt = row.IsNull("ordtaxamt") ? decimal.Zero : row.Field <decimal>("ordtaxamt"); entity.shptotalamt = row.IsNull("shptotalamt") ? decimal.Zero : row.Field <decimal>("shptotalamt"); entity.ordtotalamt = row.IsNull("ordtotalamt") ? decimal.Zero : row.Field <decimal>("ordtotalamt"); entity.ordpsttaxamt = row.IsNull("ordpsttaxamt") ? decimal.Zero : row.Field <decimal>("ordpsttaxamt"); entity.shppsttaxamt = row.IsNull("shppsttaxamt") ? decimal.Zero : row.Field <decimal>("shppsttaxamt"); entity.ordgsttaxamt = row.IsNull("ordgsttaxamt") ? decimal.Zero : row.Field <decimal>("ordgsttaxamt"); entity.shpgsttaxamt = row.IsNull("shpgsttaxamt") ? decimal.Zero : row.Field <decimal>("shpgsttaxamt"); entity.ordbotendamt = row.IsNull("ordbotendamt") ? decimal.Zero : row.Field <decimal>("ordbotendamt"); entity.ordboexist = row.Field <bool>("ordboexist"); entity.nextlineno = row.IsNull("nextlineno") ? 0 : row.Field <int>("nextlineno"); entity.ordtottendamt = row.IsNull("ordtottendamt") ? decimal.Zero : row.Field <decimal>("ordtottendamt"); entity.shptottendamt = row.IsNull("shptottendamt") ? decimal.Zero : row.Field <decimal>("shptottendamt"); entity.orddue = row.IsNull("orddue") ? decimal.Zero : row.Field <decimal>("orddue"); entity.shpdue = row.IsNull("shpdue") ? decimal.Zero : row.Field <decimal>("shpdue"); entity.taxordhidden = row.Field <bool>("taxordhidden"); entity.gstordhidden = row.Field <bool>("gstordhidden"); entity.gstordlabel = row.IsNull("gstordlabel") ? string.Empty : row.Field <string>("gstordlabel"); entity.pstordhidden = row.Field <bool>("pstordhidden"); entity.ordgstdspl = row.IsNull("ordgstdspl") ? decimal.Zero : row.Field <decimal>("ordgstdspl"); entity.totdatccostlabel = row.IsNull("totdatccostlabel") ? string.Empty : row.Field <string>("totdatccostlabel"); entity.wodiscamtdspl = row.IsNull("wodiscamtdspl") ? decimal.Zero : row.Field <decimal>("wodiscamtdspl"); entity.wodiscamtenabled = row.Field <bool>("wodiscamtenabled"); entity.marginlabel = row.IsNull("marginlabel") ? string.Empty : row.Field <string>("marginlabel"); entity.totdomsale = row.IsNull("totdomsale") ? decimal.Zero : row.Field <decimal>("totdomsale"); entity.totdomsalelabel = row.IsNull("totdomsalelabel") ? string.Empty : row.Field <string>("totdomsalelabel"); entity.totdomsalehidden = row.Field <bool>("totdomsalehidden"); entity.custcurrsymbol = row.IsNull("custcurrsymbol") ? string.Empty : row.Field <string>("custcurrsymbol"); entity.exchrate = row.IsNull("exchrate") ? decimal.Zero : row.Field <decimal>("exchrate"); entity.lotpricefl = row.Field <bool>("lotpricefl"); entity.nplinecount = row.IsNull("nplinecount") ? 0 : row.Field <int>("nplinecount"); entity.nptotshipamt = row.IsNull("nptotshipamt") ? decimal.Zero : row.Field <decimal>("nptotshipamt"); entity.statecd = row.IsNull("statecd") ? string.Empty : row.Field <string>("statecd"); 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 UpdateRowFromOecalcordshptotresults(ref DataRow row, Oecalcordshptotresults entity) { row.SetField("shplineamt", entity.shplineamt); row.SetField("ordlineamt", entity.ordlineamt); row.SetField("shpdiscamt", entity.shpdiscamt); row.SetField("orddiscamt", entity.orddiscamt); row.SetField("shpaddonamt", entity.shpaddonamt); row.SetField("ordaddonamt", entity.ordaddonamt); row.SetField("shptaxamt", entity.shptaxamt); row.SetField("ordtaxamt", entity.ordtaxamt); row.SetField("shptotalamt", entity.shptotalamt); row.SetField("ordtotalamt", entity.ordtotalamt); row.SetField("ordpsttaxamt", entity.ordpsttaxamt); row.SetField("shppsttaxamt", entity.shppsttaxamt); row.SetField("ordgsttaxamt", entity.ordgsttaxamt); row.SetField("shpgsttaxamt", entity.shpgsttaxamt); row.SetField("ordbotendamt", entity.ordbotendamt); row.SetField("ordboexist", entity.ordboexist); row.SetField("nextlineno", entity.nextlineno); row.SetField("ordtottendamt", entity.ordtottendamt); row.SetField("shptottendamt", entity.shptottendamt); row.SetField("orddue", entity.orddue); row.SetField("shpdue", entity.shpdue); row.SetField("taxordhidden", entity.taxordhidden); row.SetField("gstordhidden", entity.gstordhidden); row.SetField("gstordlabel", entity.gstordlabel); row.SetField("pstordhidden", entity.pstordhidden); row.SetField("ordgstdspl", entity.ordgstdspl); row.SetField("totdatccostlabel", entity.totdatccostlabel); row.SetField("wodiscamtdspl", entity.wodiscamtdspl); row.SetField("wodiscamtenabled", entity.wodiscamtenabled); row.SetField("marginlabel", entity.marginlabel); row.SetField("totdomsale", entity.totdomsale); row.SetField("totdomsalelabel", entity.totdomsalelabel); row.SetField("totdomsalehidden", entity.totdomsalehidden); row.SetField("custcurrsymbol", entity.custcurrsymbol); row.SetField("exchrate", entity.exchrate); row.SetField("lotpricefl", entity.lotpricefl); row.SetField("nplinecount", entity.nplinecount); row.SetField("nptotshipamt", entity.nptotshipamt); row.SetField("statecd", entity.statecd); row.SetField("userfield", entity.userfield); }