Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGletacctresults(ref DataRow row, Gletacctresults entity)
 {
     row.SetField("seqno", entity.seqno);
     row.SetField("cAcctno", entity.cAcctno);
     row.SetField("cNotesfl", entity.cNotesfl);
     row.SetField("amount", entity.amount);
     row.SetField("transcd", entity.transcd);
     row.SetField("refer", entity.refer);
     row.SetField("postdt", entity.postdt);
     row.SetField("cStatus", entity.cStatus);
     row.SetField("recid-glebt", entity.recidGlebt);
     row.SetField("rowid-glebt", entity.rowidGlebt.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Gletacctresults BuildGletacctresultsFromRow(DataRow row)
        {
            Gletacctresults entity = new Gletacctresults();

            entity.seqno      = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.cAcctno    = row.IsNull("cAcctno") ? string.Empty : row.Field <string>("cAcctno");
            entity.cNotesfl   = row.IsNull("cNotesfl") ? string.Empty : row.Field <string>("cNotesfl");
            entity.amount     = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.transcd    = row.IsNull("transcd") ? string.Empty : row.Field <string>("transcd");
            entity.refer      = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.postdt     = row.Field <DateTime?>("postdt");
            entity.cStatus    = row.IsNull("cStatus") ? string.Empty : row.Field <string>("cStatus");
            entity.recidGlebt = row.IsNull("recid-glebt") ? 0 : row.Field <long>("recid-glebt");
            entity.rowidGlebt = row.Field <byte[]>("rowid-glebt").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }