Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeprodhistory(ref DataRow row, Oeprodhistory entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("whse", entity.whse);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("descrip", entity.descrip);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Oeprodhistory BuildOeprodhistoryFromRow(DataRow row)
        {
            Oeprodhistory entity = new Oeprodhistory();

            entity.orderno   = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf  = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.shipprod  = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.enterdt   = row.Field <DateTime?>("enterdt");
            entity.prodcat   = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.descrip   = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }