Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSlehgetheadlistresults(ref DataRow row, Slehgetheadlistresults entity)
 {
     row.SetField("slehrowid", entity.slehrowid.ToByteArray());
     row.SetField("slupdtno", entity.slupdtno);
     row.SetField("statustype", entity.statustype);
     row.SetField("activecd", entity.activecd);
     row.SetField("updatedt", entity.updatedt);
     row.SetField("seqno", entity.seqno);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("noincreases", entity.noincreases);
     row.SetField("nodecreases", entity.nodecreases);
     row.SetField("issuedt", entity.issuedt);
     row.SetField("readdt", entity.readdt);
     row.SetField("reportdt", entity.reportdt);
     row.SetField("setno", entity.setno);
     row.SetField("perfisc", entity.perfisc);
     row.SetField("percal", entity.percal);
     row.SetField("amountcr", entity.amountcr);
     row.SetField("amountdr", entity.amountdr);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Slehgetheadlistresults BuildSlehgetheadlistresultsFromRow(DataRow row)
        {
            Slehgetheadlistresults entity = new Slehgetheadlistresults();

            entity.slehrowid   = row.Field <byte[]>("slehrowid").ToStringEncoded();
            entity.slupdtno    = row.IsNull("slupdtno") ? string.Empty : row.Field <string>("slupdtno");
            entity.statustype  = row.Field <bool>("statustype");
            entity.activecd    = row.IsNull("activecd") ? string.Empty : row.Field <string>("activecd");
            entity.updatedt    = row.Field <DateTime?>("updatedt");
            entity.seqno       = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.jrnlno      = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.noincreases = row.IsNull("noincreases") ? 0 : row.Field <int>("noincreases");
            entity.nodecreases = row.IsNull("nodecreases") ? 0 : row.Field <int>("nodecreases");
            entity.issuedt     = row.Field <DateTime?>("issuedt");
            entity.readdt      = row.Field <DateTime?>("readdt");
            entity.reportdt    = row.Field <DateTime?>("reportdt");
            entity.setno       = row.IsNull("setno") ? 0 : row.Field <int>("setno");
            entity.perfisc     = row.IsNull("perfisc") ? 0 : row.Field <int>("perfisc");
            entity.percal      = row.IsNull("percal") ? 0 : row.Field <int>("percal");
            entity.amountcr    = row.IsNull("amountcr") ? decimal.Zero : row.Field <decimal>("amountcr");
            entity.amountdr    = row.IsNull("amountdr") ? decimal.Zero : row.Field <decimal>("amountdr");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }