예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVaecresults(ref DataRow row, Vaecresults entity)
 {
     row.SetField("vano", entity.vano);
     row.SetField("vasuf", entity.vasuf);
     row.SetField("seqno", entity.seqno);
     row.SetField("vaehnotesfl", entity.vaehnotesfl);
     row.SetField("whse", entity.whse);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("amount", entity.amount);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("comment", entity.comment);
     row.SetField("vaehcrowid", entity.vaehcrowid.ToByteArray());
 }
예제 #2
0
        public static Vaecresults BuildVaecresultsFromRow(DataRow row)
        {
            Vaecresults entity = new Vaecresults();

            entity.vano        = row.IsNull("vano") ? 0 : row.Field <int>("vano");
            entity.vasuf       = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf");
            entity.seqno       = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.vaehnotesfl = row.IsNull("vaehnotesfl") ? string.Empty : row.Field <string>("vaehnotesfl");
            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.amount      = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.jrnlno      = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.comment     = row.IsNull("comment") ? string.Empty : row.Field <string>("comment");
            entity.vaehcrowid  = row.Field <byte[]>("vaehcrowid").ToStringEncoded();
            return(entity);
        }