예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromJournallookupresults(ref DataRow row, Journallookupresults entity)
 {
     row.SetField("oper2", entity.oper2);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("ourproc", entity.ourproc);
     row.SetField("opendt", entity.opendt);
     row.SetField("closedt", entity.closedt);
     row.SetField("period", entity.period);
     row.SetField("postdt", entity.postdt);
     row.SetField("nopostings", entity.nopostings);
     row.SetField("closefl", entity.closefl);
     row.SetField("printfl", entity.printfl);
     row.SetField("balancefl", entity.balancefl);
     row.SetField("esbprocessfl", entity.esbprocessfl);
     row.SetField("sasj-rowid", entity.sasjRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Journallookupresults BuildJournallookupresultsFromRow(DataRow row)
        {
            Journallookupresults entity = new Journallookupresults();

            entity.oper2        = row.IsNull("oper2") ? string.Empty : row.Field <string>("oper2");
            entity.jrnlno       = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.ourproc      = row.IsNull("ourproc") ? string.Empty : row.Field <string>("ourproc");
            entity.opendt       = row.Field <DateTime?>("opendt");
            entity.closedt      = row.Field <DateTime?>("closedt");
            entity.period       = row.IsNull("period") ? 0 : row.Field <int>("period");
            entity.postdt       = row.Field <DateTime?>("postdt");
            entity.nopostings   = row.IsNull("nopostings") ? 0 : row.Field <int>("nopostings");
            entity.closefl      = row.Field <bool>("closefl");
            entity.printfl      = row.Field <bool>("printfl");
            entity.balancefl    = row.Field <bool>("balancefl");
            entity.esbprocessfl = row.Field <bool>("esbprocessfl");
            entity.sasjRowid    = row.Field <byte[]>("sasj-rowid").ToStringEncoded();
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }