예제 #1
0
        public static Aopurchaseorders BuildAopurchaseordersFromRow(DataRow row)
        {
            Aopurchaseorders entity = new Aopurchaseorders();

            entity.cono                          = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.pononstkfl                    = row.Field <bool>("pononstkfl");
            entity.pocostfl                      = row.Field <bool>("pocostfl");
            entity.podolholdty                   = row.IsNull("podolholdty") ? string.Empty : row.Field <string>("podolholdty");
            entity.porcvnofl                     = row.Field <bool>("porcvnofl");
            entity.poqtyrcvfl                    = row.Field <bool>("poqtyrcvfl");
            entity.poallfl                       = row.Field <bool>("poallfl");
            entity.poavgcspct                    = row.IsNull("poavgcspct") ? decimal.Zero : row.Field <decimal>("poavgcspct");
            entity.pormglcostfl                  = row.Field <bool>("pormglcostfl");
            entity.pocrctreason                  = row.IsNull("pocrctreason") ? string.Empty : row.Field <string>("pocrctreason");
            entity.reqpobatchfl                  = row.Field <bool>("reqpobatchfl");
            entity.poassgnty                     = row.IsNull("poassgnty") ? string.Empty : row.Field <string>("poassgnty");
            entity.begpono                       = row.IsNull("begpono") ? 0 : row.Field <int>("begpono");
            entity.nextpono                      = row.IsNull("nextpono") ? 0 : row.Field <int>("nextpono");
            entity.endpono                       = row.IsNull("endpono") ? 0 : row.Field <int>("endpono");
            entity.incval                        = row.IsNull("incval") ? 0 : row.Field <int>("incval");
            entity.porraraccp                    = row.IsNull("porraraccp") ? 0 : row.Field <int>("porraraccp");
            entity.pomrgpricefl                  = row.Field <bool>("pomrgpricefl");
            entity.pomrgrptfl                    = row.Field <bool>("pomrgrptfl");
            entity.pocapdiscfl                   = row.Field <bool>("pocapdiscfl");
            entity.pocapfl                       = row.Field <bool>("pocapfl");
            entity.apusecost                     = row.IsNull("apusecost") ? string.Empty : row.Field <string>("apusecost");
            entity.powodist                      = row.IsNull("powodist") ? string.Empty : row.Field <string>("powodist");
            entity.apeichgpartialfl              = row.Field <bool>("apeichgpartialfl");
            entity.popofrmt                      = row.IsNull("popofrmt") ? 0 : row.Field <int>("popofrmt");
            entity.poedifrmt                     = row.IsNull("poedifrmt") ? 0 : row.Field <int>("poedifrmt");
            entity.pofaxfrmt                     = row.IsNull("pofaxfrmt") ? 0 : row.Field <int>("pofaxfrmt");
            entity.popoheadfl                    = row.Field <bool>("popoheadfl");
            entity.blockpoRmrecb4oeRminvfl       = row.Field <bool>("blockpo-rmrecb4oe-rminvfl");
            entity.sascRowid                     = row.Field <byte[]>("sasc-rowid").ToStringEncoded();
            entity.userfield                     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            entity.purchaseOrderOutputType       = row.IsNull("PurchaseOrderOutputType") ? string.Empty : row.Field <string>("PurchaseOrderOutputType");
            entity.purchaseOrderExtraDataLevel1  = row.IsNull("PurchaseOrderExtraDataLevel1") ? string.Empty : row.Field <string>("PurchaseOrderExtraDataLevel1");
            entity.purchaseOrderExtraDataLevel2  = row.IsNull("PurchaseOrderExtraDataLevel2") ? string.Empty : row.Field <string>("PurchaseOrderExtraDataLevel2");
            entity.purchaseOrderIDMDocTypeID     = row.IsNull("PurchaseOrderIDMDocTypeID") ? string.Empty : row.Field <string>("PurchaseOrderIDMDocTypeID");
            entity.purchaseOrderIDMTemplateName  = row.IsNull("PurchaseOrderIDMTemplateName") ? string.Empty : row.Field <string>("PurchaseOrderIDMTemplateName");
            entity.purchaseOrderIDMFromEmailAddr = row.IsNull("PurchaseOrderIDMFromEmailAddr") ? string.Empty : row.Field <string>("PurchaseOrderIDMFromEmailAddr");
            entity.purchaseOrderIDMFromEmailName = row.IsNull("PurchaseOrderIDMFromEmailName") ? string.Empty : row.Field <string>("PurchaseOrderIDMFromEmailName");
            return(entity);
        }
예제 #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromAopurchaseorders(ref DataRow row, Aopurchaseorders entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("pononstkfl", entity.pononstkfl);
     row.SetField("pocostfl", entity.pocostfl);
     row.SetField("podolholdty", entity.podolholdty);
     row.SetField("porcvnofl", entity.porcvnofl);
     row.SetField("poqtyrcvfl", entity.poqtyrcvfl);
     row.SetField("poallfl", entity.poallfl);
     row.SetField("poavgcspct", entity.poavgcspct);
     row.SetField("pormglcostfl", entity.pormglcostfl);
     row.SetField("pocrctreason", entity.pocrctreason);
     row.SetField("reqpobatchfl", entity.reqpobatchfl);
     row.SetField("poassgnty", entity.poassgnty);
     row.SetField("begpono", entity.begpono);
     row.SetField("nextpono", entity.nextpono);
     row.SetField("endpono", entity.endpono);
     row.SetField("incval", entity.incval);
     row.SetField("porraraccp", entity.porraraccp);
     row.SetField("pomrgpricefl", entity.pomrgpricefl);
     row.SetField("pomrgrptfl", entity.pomrgrptfl);
     row.SetField("pocapdiscfl", entity.pocapdiscfl);
     row.SetField("pocapfl", entity.pocapfl);
     row.SetField("apusecost", entity.apusecost);
     row.SetField("powodist", entity.powodist);
     row.SetField("apeichgpartialfl", entity.apeichgpartialfl);
     row.SetField("popofrmt", entity.popofrmt);
     row.SetField("poedifrmt", entity.poedifrmt);
     row.SetField("pofaxfrmt", entity.pofaxfrmt);
     row.SetField("popoheadfl", entity.popoheadfl);
     row.SetField("blockpo-rmrecb4oe-rminvfl", entity.blockpoRmrecb4oeRminvfl);
     row.SetField("sasc-rowid", entity.sascRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
     row.SetField("PurchaseOrderOutputType", entity.purchaseOrderOutputType);
     row.SetField("PurchaseOrderExtraDataLevel1", entity.purchaseOrderExtraDataLevel1);
     row.SetField("PurchaseOrderExtraDataLevel2", entity.purchaseOrderExtraDataLevel2);
     row.SetField("PurchaseOrderIDMDocTypeID", entity.purchaseOrderIDMDocTypeID);
     row.SetField("PurchaseOrderIDMTemplateName", entity.purchaseOrderIDMTemplateName);
     row.SetField("PurchaseOrderIDMFromEmailAddr", entity.purchaseOrderIDMFromEmailAddr);
     row.SetField("PurchaseOrderIDMFromEmailName", entity.purchaseOrderIDMFromEmailName);
 }