Esempio n. 1
0
        public static Vaheaderlistresults BuildVaheaderlistresultsFromRow(DataRow row)
        {
            Vaheaderlistresults entity = new Vaheaderlistresults();

            entity.vano          = row.IsNull("vano") ? 0 : row.Field <int>("vano");
            entity.vasuf         = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf");
            entity.cvanotes      = row.IsNull("cvanotes") ? string.Empty : row.Field <string>("cvanotes");
            entity.whse          = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.stagecdx      = row.IsNull("stagecdx") ? string.Empty : row.Field <string>("stagecdx");
            entity.transtype     = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.nonstockty    = row.IsNull("nonstockty") ? string.Empty : row.Field <string>("nonstockty");
            entity.shipprod      = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.cprodnotes    = row.IsNull("cprodnotes") ? string.Empty : row.Field <string>("cprodnotes");
            entity.cproddesc     = row.IsNull("cproddesc") ? string.Empty : row.Field <string>("cproddesc");
            entity.qtyord        = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.qtyship       = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.unit          = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.enterdt       = row.Field <DateTime?>("enterdt");
            entity.reqshipdt     = row.Field <DateTime?>("reqshipdt");
            entity.promisedt     = row.Field <DateTime?>("promisedt");
            entity.estcompdt     = row.Field <DateTime?>("estcompdt");
            entity.ordertypedspl = row.IsNull("ordertypedspl") ? string.Empty : row.Field <string>("ordertypedspl");
            entity.orderaltno    = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno");
            entity.ordercustno   = row.IsNull("ordercustno") ? decimal.Zero : row.Field <decimal>("ordercustno");
            entity.custnotesfl   = row.IsNull("custnotesfl") ? string.Empty : row.Field <string>("custnotesfl");
            entity.ordercustpo   = row.IsNull("ordercustpo") ? string.Empty : row.Field <string>("ordercustpo");
            entity.verno         = row.IsNull("verno") ? 0 : row.Field <int>("verno");
            entity.stagecd       = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.proddesc      = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.proddesc2     = row.IsNull("proddesc2") ? string.Empty : row.Field <string>("proddesc2");
            entity.ordertype     = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.rowid         = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.estcost       = row.IsNull("estcost") ? decimal.Zero : row.Field <decimal>("estcost");
            entity.availtobuild  = row.IsNull("availtobuild") ? decimal.Zero : row.Field <decimal>("availtobuild");
            entity.alreadybuilt  = row.IsNull("alreadybuilt") ? decimal.Zero : row.Field <decimal>("alreadybuilt");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            entity.vacfgfl       = row.Field <bool>("vacfgfl");
            entity.msdsfl        = row.Field <bool>("msdsfl");
            return(entity);
        }
Esempio n. 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVaheaderlistresults(ref DataRow row, Vaheaderlistresults entity)
 {
     row.SetField("vano", entity.vano);
     row.SetField("vasuf", entity.vasuf);
     row.SetField("cvanotes", entity.cvanotes);
     row.SetField("whse", entity.whse);
     row.SetField("stagecdx", entity.stagecdx);
     row.SetField("transtype", entity.transtype);
     row.SetField("nonstockty", entity.nonstockty);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("cprodnotes", entity.cprodnotes);
     row.SetField("cproddesc", entity.cproddesc);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("unit", entity.unit);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("reqshipdt", entity.reqshipdt);
     row.SetField("promisedt", entity.promisedt);
     row.SetField("estcompdt", entity.estcompdt);
     row.SetField("ordertypedspl", entity.ordertypedspl);
     row.SetField("orderaltno", entity.orderaltno);
     row.SetField("ordercustno", entity.ordercustno);
     row.SetField("custnotesfl", entity.custnotesfl);
     row.SetField("ordercustpo", entity.ordercustpo);
     row.SetField("verno", entity.verno);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("proddesc2", entity.proddesc2);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("estcost", entity.estcost);
     row.SetField("availtobuild", entity.availtobuild);
     row.SetField("alreadybuilt", entity.alreadybuilt);
     row.SetField("userfield", entity.userfield);
     row.SetField("vacfgfl", entity.vacfgfl);
     row.SetField("msdsfl", entity.msdsfl);
 }