Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGlaccountlookupresults(ref DataRow row, Glaccountlookupresults entity)
 {
     row.SetField("glno", entity.glno);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("lookupnm", entity.lookupnm);
     row.SetField("gltitle", entity.gltitle);
     row.SetField("rowid-glsa", entity.rowidGlsa.ToByteArray());
     row.SetField("cono", entity.cono);
     row.SetField("yr", entity.yr);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Glaccountlookupresults BuildGlaccountlookupresultsFromRow(DataRow row)
        {
            Glaccountlookupresults entity = new Glaccountlookupresults();

            entity.glno      = row.IsNull("glno") ? string.Empty : row.Field <string>("glno");
            entity.notesfl   = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.lookupnm  = row.IsNull("lookupnm") ? string.Empty : row.Field <string>("lookupnm");
            entity.gltitle   = row.IsNull("gltitle") ? string.Empty : row.Field <string>("gltitle");
            entity.rowidGlsa = row.Field <byte[]>("rowid-glsa").ToStringEncoded();
            entity.cono      = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.yr        = row.IsNull("yr") ? 0 : row.Field <int>("yr");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }