Exemplo n.º 1
0
        public static Oeblanketupdbyreleaseresults BuildOeblanketupdbyreleaseresultsFromRow(DataRow row)
        {
            Oeblanketupdbyreleaseresults entity = new Oeblanketupdbyreleaseresults();

            entity.orderno       = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf      = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.ordernox      = row.IsNull("ordernox") ? string.Empty : row.Field <string>("ordernox");
            entity.ordernotesfl  = row.IsNull("ordernotesfl") ? string.Empty : row.Field <string>("ordernotesfl");
            entity.stagecd       = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagecdx      = row.IsNull("stagecdx") ? string.Empty : row.Field <string>("stagecdx");
            entity.transtype     = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.custno        = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custnotesfl   = row.IsNull("custnotesfl") ? string.Empty : row.Field <string>("custnotesfl");
            entity.shipto        = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.shiptonotesfl = row.IsNull("shiptonotesfl") ? string.Empty : row.Field <string>("shiptonotesfl");
            entity.promisedt     = row.Field <DateTime?>("promisedt");
            entity.origpromisedt = row.Field <DateTime?>("origpromisedt");
            entity.reqshipdt     = row.Field <DateTime?>("reqshipdt");
            entity.name          = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.qtyord        = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.qtyordOrig    = row.IsNull("qtyord-orig") ? decimal.Zero : row.Field <decimal>("qtyord-orig");
            entity.oeelrecid     = row.IsNull("oeelrecid") ? 0 : row.Field <long>("oeelrecid");
            entity.oeehrowid     = row.Field <byte[]>("oeehrowid").ToStringEncoded();
            entity.arscrowid     = row.Field <byte[]>("arscrowid").ToStringEncoded();
            return(entity);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeblanketupdbyreleaseresults(ref DataRow row, Oeblanketupdbyreleaseresults entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("ordernox", entity.ordernox);
     row.SetField("ordernotesfl", entity.ordernotesfl);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagecdx", entity.stagecdx);
     row.SetField("transtype", entity.transtype);
     row.SetField("custno", entity.custno);
     row.SetField("custnotesfl", entity.custnotesfl);
     row.SetField("shipto", entity.shipto);
     row.SetField("shiptonotesfl", entity.shiptonotesfl);
     row.SetField("promisedt", entity.promisedt);
     row.SetField("origpromisedt", entity.origpromisedt);
     row.SetField("reqshipdt", entity.reqshipdt);
     row.SetField("name", entity.name);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("qtyord-orig", entity.qtyordOrig);
     row.SetField("oeelrecid", entity.oeelrecid);
     row.SetField("oeehrowid", entity.oeehrowid.ToByteArray());
     row.SetField("arscrowid", entity.arscrowid.ToByteArray());
 }