Example #1
0
        public static Apeiinvdetaddlinfo BuildApeiinvdetaddlinfoFromRow(DataRow row)
        {
            Apeiinvdetaddlinfo entity = new Apeiinvdetaddlinfo();

            entity.groupnm              = row.IsNull("groupnm") ? string.Empty : row.Field <string>("groupnm");
            entity.createddt            = row.Field <DateTime?>("createddt");
            entity.groupseqno           = row.IsNull("groupseqno") ? 0 : row.Field <int>("groupseqno");
            entity.vendno               = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.apeiRowid            = row.Field <byte[]>("apei-rowid").ToStringEncoded();
            entity.manualcheckenabledfl = row.Field <bool>("manualcheckenabledfl");
            entity.bankno               = row.IsNull("bankno") ? 0 : row.Field <int>("bankno");
            entity.checkno              = row.IsNull("checkno") ? decimal.Zero : row.Field <decimal>("checkno");
            entity.origdisc             = row.IsNull("origdisc") ? decimal.Zero : row.Field <decimal>("origdisc");
            entity.newinvfl             = row.Field <bool>("newinvfl");
            entity.epmttype             = row.IsNull("epmttype") ? string.Empty : row.Field <string>("epmttype");
            entity.addlinfoenabledfl    = row.Field <bool>("addlinfoenabledfl");
            entity.name      = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.addr1     = row.IsNull("addr1") ? string.Empty : row.Field <string>("addr1");
            entity.addr2     = row.IsNull("addr2") ? string.Empty : row.Field <string>("addr2");
            entity.addr3     = row.IsNull("addr3") ? string.Empty : row.Field <string>("addr3");
            entity.city      = row.IsNull("city") ? string.Empty : row.Field <string>("city");
            entity.state     = row.IsNull("state") ? string.Empty : row.Field <string>("state");
            entity.zipcd     = row.IsNull("zipcd") ? string.Empty : row.Field <string>("zipcd");
            entity.manaddrfl = row.Field <bool>("manaddrfl");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Example #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApeiinvdetaddlinfo(ref DataRow row, Apeiinvdetaddlinfo entity)
 {
     row.SetField("groupnm", entity.groupnm);
     row.SetField("createddt", entity.createddt);
     row.SetField("groupseqno", entity.groupseqno);
     row.SetField("vendno", entity.vendno);
     row.SetField("apei-rowid", entity.apeiRowid.ToByteArray());
     row.SetField("manualcheckenabledfl", entity.manualcheckenabledfl);
     row.SetField("bankno", entity.bankno);
     row.SetField("checkno", entity.checkno);
     row.SetField("origdisc", entity.origdisc);
     row.SetField("newinvfl", entity.newinvfl);
     row.SetField("epmttype", entity.epmttype);
     row.SetField("addlinfoenabledfl", entity.addlinfoenabledfl);
     row.SetField("name", entity.name);
     row.SetField("addr1", entity.addr1);
     row.SetField("addr2", entity.addr2);
     row.SetField("addr3", entity.addr3);
     row.SetField("city", entity.city);
     row.SetField("state", entity.state);
     row.SetField("zipcd", entity.zipcd);
     row.SetField("manaddrfl", entity.manaddrfl);
     row.SetField("userfield", entity.userfield);
 }