Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOelinelist(ref DataRow row, Oelinelist entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("instancedata", entity.instancedata);
     row.SetField("instancedata2", entity.instancedata2);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Oelinelist BuildOelinelistFromRow(DataRow row)
        {
            Oelinelist entity = new Oelinelist();

            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.instancedata  = row.IsNull("instancedata") ? string.Empty : row.Field <string>("instancedata");
            entity.instancedata2 = row.IsNull("instancedata2") ? string.Empty : row.Field <string>("instancedata2");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }