Exemple #1
0
        public static Oeblanketresults BuildOeblanketresultsFromRow(DataRow row)
        {
            Oeblanketresults entity = new Oeblanketresults();

            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.oeehrowid     = row.Field <byte[]>("oeehrowid").ToStringEncoded();
            entity.arscrowid     = row.Field <byte[]>("arscrowid").ToStringEncoded();
            entity.arssrowid     = row.Field <byte[]>("arssrowid").ToStringEncoded();
            entity.ordernox      = row.IsNull("ordernox") ? string.Empty : row.Field <string>("ordernox");
            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.billdt        = row.Field <DateTime?>("billdt");
            entity.shipviaty     = row.IsNull("shipviaty") ? string.Empty : row.Field <string>("shipviaty");
            entity.descrip       = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.name          = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            return(entity);
        }
Exemple #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeblanketresults(ref DataRow row, Oeblanketresults entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("ordernotesfl", entity.ordernotesfl);
     row.SetField("oeehrowid", entity.oeehrowid.ToByteArray());
     row.SetField("arscrowid", entity.arscrowid.ToByteArray());
     row.SetField("arssrowid", entity.arssrowid.ToByteArray());
     row.SetField("ordernox", entity.ordernox);
     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("billdt", entity.billdt);
     row.SetField("shipviaty", entity.shipviaty);
     row.SetField("descrip", entity.descrip);
     row.SetField("name", entity.name);
 }