Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOereturn(ref DataRow row, Oereturn entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("btnsourcingenabled", entity.btnsourcingenabled);
     row.SetField("createpofl", entity.createpofl);
     row.SetField("createpoflenabled", entity.createpoflenabled);
     row.SetField("crreasonty", entity.crreasonty);
     row.SetField("crreasontyenabled", entity.crreasontyenabled);
     row.SetField("orderaltno", entity.orderaltno);
     row.SetField("orderaltnoenabled", entity.orderaltnoenabled);
     row.SetField("qtyunavail", entity.qtyunavail);
     row.SetField("qtyunavailenabled", entity.qtyunavailenabled);
     row.SetField("reasunavty", entity.reasunavty);
     row.SetField("reasunavtyenabled", entity.reasunavtyenabled);
     row.SetField("reqauthfl", entity.reqauthfl);
     row.SetField("reqinvfl", entity.reqinvfl);
     row.SetField("reqwarrfl", entity.reqwarrfl);
     row.SetField("restktaxgrp", entity.restktaxgrp);
     row.SetField("restktaxgrpenabled", entity.restktaxgrpenabled);
     row.SetField("restockamt", entity.restockamt);
     row.SetField("restockfl", entity.restockfl);
     row.SetField("retlineno", entity.retlineno);
     row.SetField("retlinenoenabled", entity.retlinenoenabled);
     row.SetField("retorderno", entity.retorderno);
     row.SetField("retordernoenabled", entity.retordernoenabled);
     row.SetField("retordersuf", entity.retordersuf);
     row.SetField("retordersufenabled", entity.retordersufenabled);
     row.SetField("returntype", entity.returntype);
     row.SetField("stkunit", entity.stkunit);
     row.SetField("usagefl", entity.usagefl);
     row.SetField("warrantymsg", entity.warrantymsg);
     row.SetField("warrexchgfl", entity.warrexchgfl);
     row.SetField("warrtag", entity.warrtag);
     row.SetField("ehfaddonno", entity.ehfaddonno);
     row.SetField("ehfamt", entity.ehfamt);
     row.SetField("ehfexemptamt", entity.ehfexemptamt);
     row.SetField("userfield", entity.userfield);
     row.SetField("addswoptprodfl", entity.addswoptprodfl);
     row.SetField("cCallMode", entity.cCallMode);
     row.SetField("cCoreRtnTy", entity.cCoreRtnTy);
     row.SetField("cMaintModeL", entity.cMaintModeL);
     row.SetField("cProd", entity.cProd);
     row.SetField("cSerLotType", entity.cSerLotType);
     row.SetField("cSpecNSType", entity.cSpecNSType);
     row.SetField("cUnit", entity.cUnit);
     row.SetField("cWarrantyCd", entity.cWarrantyCd);
     row.SetField("dConv", entity.dConv);
     row.SetField("dQtyOrd", entity.dQtyOrd);
     row.SetField("dVendno", entity.dVendno);
     row.SetField("iOrderAltNo", entity.iOrderAltNo);
     row.SetField("iRepLineNo", entity.iRepLineNo);
     row.SetField("iRepOrdno", entity.iRepOrdno);
     row.SetField("iRepOrdSuf", entity.iRepOrdSuf);
     row.SetField("iShipfmno", entity.iShipfmno);
     row.SetField("lKitfl", entity.lKitfl);
     row.SetField("lRemanCore", entity.lRemanCore);
     row.SetField("lRetOrdLkupfl", entity.lRetOrdLkupfl);
     row.SetField("lTallyfl", entity.lTallyfl);
     row.SetField("dVVendno", entity.dVVendno);
     row.SetField("cVShipfmno", entity.cVShipfmno);
     row.SetField("cVName", entity.cVName);
     row.SetField("cVAddr1", entity.cVAddr1);
     row.SetField("cVAddr2", entity.cVAddr2);
     row.SetField("cVAddr3", entity.cVAddr3);
     row.SetField("cVCity", entity.cVCity);
     row.SetField("cVState", entity.cVState);
     row.SetField("cVZipcd", entity.cVZipcd);
     row.SetField("lVFOBfl", entity.lVFOBfl);
     row.SetField("lVConfirmfl", entity.lVConfirmfl);
     row.SetField("cVShipviaty", entity.cVShipviaty);
     row.SetField("dVDuedt", entity.dVDuedt);
     row.SetField("lVPOWTIntfl", entity.lVPOWTIntfl);
     row.SetField("cVOrderType", entity.cVOrderType);
     row.SetField("v-commentfl", entity.vCommentfl);
     row.SetField("vendretauth", entity.vendretauth);
 }
Пример #2
0
        public static Oereturn BuildOereturnFromRow(DataRow row)
        {
            Oereturn entity = new Oereturn();

            entity.orderno            = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf           = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.lineno             = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.btnsourcingenabled = row.Field <bool>("btnsourcingenabled");
            entity.createpofl         = row.Field <bool>("createpofl");
            entity.createpoflenabled  = row.Field <bool>("createpoflenabled");
            entity.crreasonty         = row.IsNull("crreasonty") ? string.Empty : row.Field <string>("crreasonty");
            entity.crreasontyenabled  = row.Field <bool>("crreasontyenabled");
            entity.orderaltno         = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno");
            entity.orderaltnoenabled  = row.Field <bool>("orderaltnoenabled");
            entity.qtyunavail         = row.IsNull("qtyunavail") ? decimal.Zero : row.Field <decimal>("qtyunavail");
            entity.qtyunavailenabled  = row.Field <bool>("qtyunavailenabled");
            entity.reasunavty         = row.IsNull("reasunavty") ? string.Empty : row.Field <string>("reasunavty");
            entity.reasunavtyenabled  = row.Field <bool>("reasunavtyenabled");
            entity.reqauthfl          = row.Field <bool>("reqauthfl");
            entity.reqinvfl           = row.Field <bool>("reqinvfl");
            entity.reqwarrfl          = row.Field <bool>("reqwarrfl");
            entity.restktaxgrp        = row.IsNull("restktaxgrp") ? 0 : row.Field <int>("restktaxgrp");
            entity.restktaxgrpenabled = row.Field <bool>("restktaxgrpenabled");
            entity.restockamt         = row.IsNull("restockamt") ? decimal.Zero : row.Field <decimal>("restockamt");
            entity.restockfl          = row.Field <bool>("restockfl");
            entity.retlineno          = row.IsNull("retlineno") ? 0 : row.Field <int>("retlineno");
            entity.retlinenoenabled   = row.Field <bool>("retlinenoenabled");
            entity.retorderno         = row.IsNull("retorderno") ? 0 : row.Field <int>("retorderno");
            entity.retordernoenabled  = row.Field <bool>("retordernoenabled");
            entity.retordersuf        = row.IsNull("retordersuf") ? 0 : row.Field <int>("retordersuf");
            entity.retordersufenabled = row.Field <bool>("retordersufenabled");
            entity.returntype         = row.IsNull("returntype") ? string.Empty : row.Field <string>("returntype");
            entity.stkunit            = row.IsNull("stkunit") ? string.Empty : row.Field <string>("stkunit");
            entity.usagefl            = row.Field <bool>("usagefl");
            entity.warrantymsg        = row.IsNull("warrantymsg") ? string.Empty : row.Field <string>("warrantymsg");
            entity.warrexchgfl        = row.Field <bool>("warrexchgfl");
            entity.warrtag            = row.IsNull("warrtag") ? string.Empty : row.Field <string>("warrtag");
            entity.ehfaddonno         = row.IsNull("ehfaddonno") ? 0 : row.Field <int>("ehfaddonno");
            entity.ehfamt             = row.IsNull("ehfamt") ? decimal.Zero : row.Field <decimal>("ehfamt");
            entity.ehfexemptamt       = row.IsNull("ehfexemptamt") ? decimal.Zero : row.Field <decimal>("ehfexemptamt");
            entity.userfield          = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            entity.addswoptprodfl     = row.Field <bool>("addswoptprodfl");
            entity.cCallMode          = row.IsNull("cCallMode") ? string.Empty : row.Field <string>("cCallMode");
            entity.cCoreRtnTy         = row.IsNull("cCoreRtnTy") ? string.Empty : row.Field <string>("cCoreRtnTy");
            entity.cMaintModeL        = row.IsNull("cMaintModeL") ? string.Empty : row.Field <string>("cMaintModeL");
            entity.cProd         = row.IsNull("cProd") ? string.Empty : row.Field <string>("cProd");
            entity.cSerLotType   = row.IsNull("cSerLotType") ? string.Empty : row.Field <string>("cSerLotType");
            entity.cSpecNSType   = row.IsNull("cSpecNSType") ? string.Empty : row.Field <string>("cSpecNSType");
            entity.cUnit         = row.IsNull("cUnit") ? string.Empty : row.Field <string>("cUnit");
            entity.cWarrantyCd   = row.IsNull("cWarrantyCd") ? string.Empty : row.Field <string>("cWarrantyCd");
            entity.dConv         = row.IsNull("dConv") ? decimal.Zero : row.Field <decimal>("dConv");
            entity.dQtyOrd       = row.IsNull("dQtyOrd") ? decimal.Zero : row.Field <decimal>("dQtyOrd");
            entity.dVendno       = row.IsNull("dVendno") ? decimal.Zero : row.Field <decimal>("dVendno");
            entity.iOrderAltNo   = row.IsNull("iOrderAltNo") ? 0 : row.Field <int>("iOrderAltNo");
            entity.iRepLineNo    = row.IsNull("iRepLineNo") ? 0 : row.Field <int>("iRepLineNo");
            entity.iRepOrdno     = row.IsNull("iRepOrdno") ? 0 : row.Field <int>("iRepOrdno");
            entity.iRepOrdSuf    = row.IsNull("iRepOrdSuf") ? 0 : row.Field <int>("iRepOrdSuf");
            entity.iShipfmno     = row.IsNull("iShipfmno") ? 0 : row.Field <int>("iShipfmno");
            entity.lKitfl        = row.Field <bool>("lKitfl");
            entity.lRemanCore    = row.Field <bool>("lRemanCore");
            entity.lRetOrdLkupfl = row.Field <bool>("lRetOrdLkupfl");
            entity.lTallyfl      = row.Field <bool>("lTallyfl");
            entity.dVVendno      = row.IsNull("dVVendno") ? decimal.Zero : row.Field <decimal>("dVVendno");
            entity.cVShipfmno    = row.IsNull("cVShipfmno") ? string.Empty : row.Field <string>("cVShipfmno");
            entity.cVName        = row.IsNull("cVName") ? string.Empty : row.Field <string>("cVName");
            entity.cVAddr1       = row.IsNull("cVAddr1") ? string.Empty : row.Field <string>("cVAddr1");
            entity.cVAddr2       = row.IsNull("cVAddr2") ? string.Empty : row.Field <string>("cVAddr2");
            entity.cVAddr3       = row.IsNull("cVAddr3") ? string.Empty : row.Field <string>("cVAddr3");
            entity.cVCity        = row.IsNull("cVCity") ? string.Empty : row.Field <string>("cVCity");
            entity.cVState       = row.IsNull("cVState") ? string.Empty : row.Field <string>("cVState");
            entity.cVZipcd       = row.IsNull("cVZipcd") ? string.Empty : row.Field <string>("cVZipcd");
            entity.lVFOBfl       = row.Field <bool>("lVFOBfl");
            entity.lVConfirmfl   = row.Field <bool>("lVConfirmfl");
            entity.cVShipviaty   = row.IsNull("cVShipviaty") ? string.Empty : row.Field <string>("cVShipviaty");
            entity.dVDuedt       = row.Field <DateTime?>("dVDuedt");
            entity.lVPOWTIntfl   = row.Field <bool>("lVPOWTIntfl");
            entity.cVOrderType   = row.IsNull("cVOrderType") ? string.Empty : row.Field <string>("cVOrderType");
            entity.vCommentfl    = row.Field <bool>("v-commentfl");
            entity.vendretauth   = row.IsNull("vendretauth") ? string.Empty : row.Field <string>("vendretauth");
            return(entity);
        }