Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGliatransrevresults(ref DataRow row, Gliatransrevresults entity)
 {
     row.SetField("revalno", entity.revalno);
     row.SetField("seqno", entity.seqno);
     row.SetField("sourcecd", entity.sourcecd);
     row.SetField("idno", entity.idno);
     row.SetField("cDocno", entity.cDocno);
     row.SetField("docseqno", entity.docseqno);
     row.SetField("cTranscd", entity.cTranscd);
     row.SetField("oldexrate", entity.oldexrate);
     row.SetField("newexrate", entity.newexrate);
     row.SetField("revaldt", entity.revaldt);
     row.SetField("operinit", entity.operinit);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Gliatransrevresults BuildGliatransrevresultsFromRow(DataRow row)
        {
            Gliatransrevresults entity = new Gliatransrevresults();

            entity.revalno   = row.IsNull("revalno") ? 0 : row.Field <int>("revalno");
            entity.seqno     = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.sourcecd  = row.IsNull("sourcecd") ? string.Empty : row.Field <string>("sourcecd");
            entity.idno      = row.IsNull("idno") ? 0 : row.Field <int>("idno");
            entity.cDocno    = row.IsNull("cDocno") ? string.Empty : row.Field <string>("cDocno");
            entity.docseqno  = row.IsNull("docseqno") ? 0 : row.Field <int>("docseqno");
            entity.cTranscd  = row.IsNull("cTranscd") ? string.Empty : row.Field <string>("cTranscd");
            entity.oldexrate = row.IsNull("oldexrate") ? decimal.Zero : row.Field <decimal>("oldexrate");
            entity.newexrate = row.IsNull("newexrate") ? decimal.Zero : row.Field <decimal>("newexrate");
            entity.revaldt   = row.Field <DateTime?>("revaldt");
            entity.operinit  = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }