Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeordercopylinelist(ref DataRow row, Oeordercopylinelist entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("dispordno", entity.dispordno);
     row.SetField("lineno", entity.lineno);
     row.SetField("newlineno", entity.newlineno);
     row.SetField("copyfl", entity.copyfl);
     row.SetField("botype", entity.botype);
     row.SetField("oebotype", entity.oebotype);
     row.SetField("restrictfl", entity.restrictfl);
     row.SetField("remancorefl", entity.remancorefl);
     row.SetField("impliedcorefl", entity.impliedcorefl);
     row.SetField("bodtransferty", entity.bodtransferty);
     row.SetField("bodfabwhse", entity.bodfabwhse);
     row.SetField("bodshipviaty", entity.bodshipviaty);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("verno", entity.verno);
     row.SetField("cSpecNSType", entity.cSpecNSType);
     row.SetField("cShipProd", entity.cShipProd);
     row.SetField("cProdDesc", entity.cProdDesc);
     row.SetField("dQtyOrd", entity.dQtyOrd);
     row.SetField("cUnit", entity.cUnit);
     row.SetField("dNetamt", entity.dNetamt);
     row.SetField("cNetamt", entity.cNetamt);
     row.SetField("of-qtyord", entity.ofQtyord);
     row.SetField("of-specnstype", entity.ofSpecnstype);
     row.SetField("of-seqno", entity.ofSeqno);
     row.SetField("of-nspricefl", entity.ofNspricefl);
     row.SetField("of-submitfl", entity.ofSubmitfl);
     row.SetField("of-ordertype", entity.ofOrdertype);
     row.SetField("of-vendno", entity.ofVendno);
     row.SetField("of-whse", entity.ofWhse);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Oeordercopylinelist BuildOeordercopylinelistFromRow(DataRow row)
        {
            Oeordercopylinelist entity = new Oeordercopylinelist();

            entity.orderno       = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf      = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.dispordno     = row.IsNull("dispordno") ? string.Empty : row.Field <string>("dispordno");
            entity.lineno        = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.newlineno     = row.IsNull("newlineno") ? 0 : row.Field <int>("newlineno");
            entity.copyfl        = row.Field <bool>("copyfl");
            entity.botype        = row.IsNull("botype") ? string.Empty : row.Field <string>("botype");
            entity.oebotype      = row.IsNull("oebotype") ? string.Empty : row.Field <string>("oebotype");
            entity.restrictfl    = row.Field <bool>("restrictfl");
            entity.remancorefl   = row.Field <bool>("remancorefl");
            entity.impliedcorefl = row.Field <bool>("impliedcorefl");
            entity.bodtransferty = row.IsNull("bodtransferty") ? string.Empty : row.Field <string>("bodtransferty");
            entity.bodfabwhse    = row.IsNull("bodfabwhse") ? string.Empty : row.Field <string>("bodfabwhse");
            entity.bodshipviaty  = row.IsNull("bodshipviaty") ? string.Empty : row.Field <string>("bodshipviaty");
            entity.shipprod      = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.verno         = row.IsNull("verno") ? 0 : row.Field <int>("verno");
            entity.cSpecNSType   = row.IsNull("cSpecNSType") ? string.Empty : row.Field <string>("cSpecNSType");
            entity.cShipProd     = row.IsNull("cShipProd") ? string.Empty : row.Field <string>("cShipProd");
            entity.cProdDesc     = row.IsNull("cProdDesc") ? string.Empty : row.Field <string>("cProdDesc");
            entity.dQtyOrd       = row.IsNull("dQtyOrd") ? decimal.Zero : row.Field <decimal>("dQtyOrd");
            entity.cUnit         = row.IsNull("cUnit") ? string.Empty : row.Field <string>("cUnit");
            entity.dNetamt       = row.IsNull("dNetamt") ? decimal.Zero : row.Field <decimal>("dNetamt");
            entity.cNetamt       = row.IsNull("cNetamt") ? string.Empty : row.Field <string>("cNetamt");
            entity.ofQtyord      = row.IsNull("of-qtyord") ? decimal.Zero : row.Field <decimal>("of-qtyord");
            entity.ofSpecnstype  = row.IsNull("of-specnstype") ? string.Empty : row.Field <string>("of-specnstype");
            entity.ofSeqno       = row.IsNull("of-seqno") ? 0 : row.Field <int>("of-seqno");
            entity.ofNspricefl   = row.Field <bool>("of-nspricefl");
            entity.ofSubmitfl    = row.Field <bool>("of-submitfl");
            entity.ofOrdertype   = row.IsNull("of-ordertype") ? string.Empty : row.Field <string>("of-ordertype");
            entity.ofVendno      = row.IsNull("of-vendno") ? decimal.Zero : row.Field <decimal>("of-vendno");
            entity.ofWhse        = row.IsNull("of-whse") ? string.Empty : row.Field <string>("of-whse");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }