Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApeiinvdetterms(ref DataRow row, Apeiinvdetterms entity)
 {
     row.SetField("groupnm", entity.groupnm);
     row.SetField("groupseqno", entity.groupseqno);
     row.SetField("createddt", entity.createddt);
     row.SetField("invseqno", entity.invseqno);
     row.SetField("amount", entity.amount);
     row.SetField("amountenabled", entity.amountenabled);
     row.SetField("invtype", entity.invtype);
     row.SetField("invtypeenabled", entity.invtypeenabled);
     row.SetField("origdisc", entity.origdisc);
     row.SetField("origdiscenabled", entity.origdiscenabled);
     row.SetField("disputefl", entity.disputefl);
     row.SetField("disputeflenabled", entity.disputeflenabled);
     row.SetField("duedt", entity.duedt);
     row.SetField("duedtenabled", entity.duedtenabled);
     row.SetField("discdt", entity.discdt);
     row.SetField("discdtenabled", entity.discdtenabled);
     row.SetField("apei-rowid", entity.apeiRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Apeiinvdetterms BuildApeiinvdettermsFromRow(DataRow row)
        {
            Apeiinvdetterms entity = new Apeiinvdetterms();

            entity.groupnm          = row.IsNull("groupnm") ? string.Empty : row.Field <string>("groupnm");
            entity.groupseqno       = row.IsNull("groupseqno") ? 0 : row.Field <int>("groupseqno");
            entity.createddt        = row.Field <DateTime?>("createddt");
            entity.invseqno         = row.IsNull("invseqno") ? 0 : row.Field <int>("invseqno");
            entity.amount           = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.amountenabled    = row.Field <bool>("amountenabled");
            entity.invtype          = row.IsNull("invtype") ? string.Empty : row.Field <string>("invtype");
            entity.invtypeenabled   = row.Field <bool>("invtypeenabled");
            entity.origdisc         = row.IsNull("origdisc") ? decimal.Zero : row.Field <decimal>("origdisc");
            entity.origdiscenabled  = row.Field <bool>("origdiscenabled");
            entity.disputefl        = row.Field <bool>("disputefl");
            entity.disputeflenabled = row.Field <bool>("disputeflenabled");
            entity.duedt            = row.Field <DateTime?>("duedt");
            entity.duedtenabled     = row.Field <bool>("duedtenabled");
            entity.discdt           = row.Field <DateTime?>("discdt");
            entity.discdtenabled    = row.Field <bool>("discdtenabled");
            entity.apeiRowid        = row.Field <byte[]>("apei-rowid").ToStringEncoded();
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }