Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCrtserialcoresttresults(ref DataRow row, Crtserialcoresttresults entity)
 {
     row.SetField("corefl", entity.corefl);
     row.SetField("serialno", entity.serialno);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("ordernotesfl", entity.ordernotesfl);
     row.SetField("commentfl", entity.commentfl);
 }
Пример #2
0
        public static Crtserialcoresttresults BuildCrtserialcoresttresultsFromRow(DataRow row)
        {
            Crtserialcoresttresults entity = new Crtserialcoresttresults();

            entity.corefl       = row.Field <bool>("corefl");
            entity.serialno     = row.IsNull("serialno") ? string.Empty : row.Field <string>("serialno");
            entity.orderno      = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf     = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.lineno       = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.ordernotesfl = row.IsNull("ordernotesfl") ? string.Empty : row.Field <string>("ordernotesfl");
            entity.commentfl    = row.IsNull("commentfl") ? string.Empty : row.Field <string>("commentfl");
            return(entity);
        }