Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdemlookupresults(ref DataRow row, Pdemlookupresults entity)
 {
     row.SetField("setid", entity.setid);
     row.SetField("description", entity.description);
     row.SetField("destination", entity.destination);
     row.SetField("destinationdesc", entity.destinationdesc);
     row.SetField("source", entity.source);
     row.SetField("sourcedesc", entity.sourcedesc);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagedesc", entity.stagedesc);
     row.SetField("lastseqno", entity.lastseqno);
     row.SetField("linecount", entity.linecount);
     row.SetField("rowid-pdem", entity.rowidPdem.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Pdemlookupresults BuildPdemlookupresultsFromRow(DataRow row)
        {
            Pdemlookupresults entity = new Pdemlookupresults();

            entity.setid           = row.IsNull("setid") ? string.Empty : row.Field <string>("setid");
            entity.description     = row.IsNull("description") ? string.Empty : row.Field <string>("description");
            entity.destination     = row.IsNull("destination") ? string.Empty : row.Field <string>("destination");
            entity.destinationdesc = row.IsNull("destinationdesc") ? string.Empty : row.Field <string>("destinationdesc");
            entity.source          = row.IsNull("source") ? string.Empty : row.Field <string>("source");
            entity.sourcedesc      = row.IsNull("sourcedesc") ? string.Empty : row.Field <string>("sourcedesc");
            entity.stagecd         = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagedesc       = row.IsNull("stagedesc") ? string.Empty : row.Field <string>("stagedesc");
            entity.lastseqno       = row.IsNull("lastseqno") ? decimal.Zero : row.Field <decimal>("lastseqno");
            entity.linecount       = row.IsNull("linecount") ? 0 : row.Field <int>("linecount");
            entity.rowidPdem       = row.Field <byte[]>("rowid-pdem").ToStringEncoded();
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }