Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOelinehistresults(ref DataRow row, Oelinehistresults entity)
 {
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("commentfl", entity.commentfl);
     row.SetField("specnstype", entity.specnstype);
     row.SetField("stage", entity.stage);
     row.SetField("promisedt", entity.promisedt);
     row.SetField("shipdt", entity.shipdt);
     row.SetField("invoicedt", entity.invoicedt);
     row.SetField("paiddt", entity.paiddt);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("orderaltno", entity.orderaltno);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Oelinehistresults BuildOelinehistresultsFromRow(DataRow row)
        {
            Oelinehistresults entity = new Oelinehistresults();

            entity.ordersuf   = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.commentfl  = row.Field <bool>("commentfl");
            entity.specnstype = row.IsNull("specnstype") ? string.Empty : row.Field <string>("specnstype");
            entity.stage      = row.IsNull("stage") ? string.Empty : row.Field <string>("stage");
            entity.promisedt  = row.Field <DateTime?>("promisedt");
            entity.shipdt     = row.Field <DateTime?>("shipdt");
            entity.invoicedt  = row.Field <DateTime?>("invoicedt");
            entity.paiddt     = row.Field <DateTime?>("paiddt");
            entity.stagecd    = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.orderaltno = row.IsNull("orderaltno") ? string.Empty : row.Field <string>("orderaltno");
            entity.qtyord     = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.qtyship    = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }