Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdergetitemresults(ref DataRow row, Pdergetitemresults entity)
 {
     row.SetField("statustype", entity.statustype);
     row.SetField("contractno", entity.contractno);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("prodnotesfl", entity.prodnotesfl);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("unit", entity.unit);
     row.SetField("actstkqty", entity.actstkqty);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("rebateamt", entity.rebateamt);
     row.SetField("rptrebamt", entity.rptrebamt);
     row.SetField("dsplyprccostper", entity.dsplyprccostper);
     row.SetField("actnetamt", entity.actnetamt);
     row.SetField("claimnetamt", entity.claimnetamt);
     row.SetField("invpodt", entity.invpodt);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("ordernotesfl", entity.ordernotesfl);
     row.SetField("lineno", entity.lineno);
     row.SetField("seqno", entity.seqno);
     row.SetField("dsplydropshipty", entity.dsplydropshipty);
     row.SetField("custno", entity.custno);
     row.SetField("custnotesfl", entity.custnotesfl);
     row.SetField("custname", entity.custname);
     row.SetField("whse", entity.whse);
     row.SetField("whsedesc", entity.whsedesc);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("currencyty", entity.currencyty);
     row.SetField("rptexrate", entity.rptexrate);
     row.SetField("rowidpder", entity.rowidpder.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Pdergetitemresults BuildPdergetitemresultsFromRow(DataRow row)
        {
            Pdergetitemresults entity = new Pdergetitemresults();

            entity.statustype      = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype");
            entity.contractno      = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno");
            entity.shipprod        = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.prodnotesfl     = row.IsNull("prodnotesfl") ? string.Empty : row.Field <string>("prodnotesfl");
            entity.proddesc        = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.unit            = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.actstkqty       = row.IsNull("actstkqty") ? decimal.Zero : row.Field <decimal>("actstkqty");
            entity.qtyship         = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.rebateamt       = row.IsNull("rebateamt") ? decimal.Zero : row.Field <decimal>("rebateamt");
            entity.rptrebamt       = row.IsNull("rptrebamt") ? decimal.Zero : row.Field <decimal>("rptrebamt");
            entity.dsplyprccostper = row.IsNull("dsplyprccostper") ? string.Empty : row.Field <string>("dsplyprccostper");
            entity.actnetamt       = row.IsNull("actnetamt") ? decimal.Zero : row.Field <decimal>("actnetamt");
            entity.claimnetamt     = row.IsNull("claimnetamt") ? decimal.Zero : row.Field <decimal>("claimnetamt");
            entity.invpodt         = row.Field <DateTime?>("invpodt");
            entity.orderno         = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf        = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.ordernotesfl    = row.IsNull("ordernotesfl") ? string.Empty : row.Field <string>("ordernotesfl");
            entity.lineno          = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.seqno           = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.dsplydropshipty = row.IsNull("dsplydropshipty") ? string.Empty : row.Field <string>("dsplydropshipty");
            entity.custno          = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custnotesfl     = row.IsNull("custnotesfl") ? string.Empty : row.Field <string>("custnotesfl");
            entity.custname        = row.IsNull("custname") ? string.Empty : row.Field <string>("custname");
            entity.whse            = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.whsedesc        = row.IsNull("whsedesc") ? string.Empty : row.Field <string>("whsedesc");
            entity.jrnlno          = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.currencyty      = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty");
            entity.rptexrate       = row.IsNull("rptexrate") ? decimal.Zero : row.Field <decimal>("rptexrate");
            entity.rowidpder       = row.Field <byte[]>("rowidpder").ToStringEncoded();
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }