Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPtxtransdetailaddr(ref DataRow row, Ptxtransdetailaddr entity)
 {
     row.SetField("distpartnerid", entity.distpartnerid);
     row.SetField("distinvno", entity.distinvno);
     row.SetField("distinvsuf", entity.distinvsuf);
     row.SetField("distinvseqno", entity.distinvseqno);
     row.SetField("addrtype", entity.addrtype);
     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("phone", entity.phone);
     row.SetField("countrycd", entity.countrycd);
     row.SetField("partnerid", entity.partnerid);
     row.SetField("dunsno", entity.dunsno);
     row.SetField("fedtaxid", entity.fedtaxid);
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("user3", entity.user3);
     row.SetField("user4", entity.user4);
     row.SetField("user5", entity.user5);
     row.SetField("user6", entity.user6);
     row.SetField("user7", entity.user7);
     row.SetField("user8", entity.user8);
     row.SetField("user9", entity.user9);
     row.SetField("rwidptxtransaddr", entity.rwidptxtransaddr.ToByteArray());
 }
Esempio n. 2
0
        public static Ptxtransdetailaddr BuildPtxtransdetailaddrFromRow(DataRow row)
        {
            Ptxtransdetailaddr entity = new Ptxtransdetailaddr();

            entity.distpartnerid    = row.IsNull("distpartnerid") ? string.Empty : row.Field <string>("distpartnerid");
            entity.distinvno        = row.IsNull("distinvno") ? 0 : row.Field <int>("distinvno");
            entity.distinvsuf       = row.IsNull("distinvsuf") ? 0 : row.Field <int>("distinvsuf");
            entity.distinvseqno     = row.IsNull("distinvseqno") ? 0 : row.Field <int>("distinvseqno");
            entity.addrtype         = row.IsNull("addrtype") ? string.Empty : row.Field <string>("addrtype");
            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.phone            = row.IsNull("phone") ? string.Empty : row.Field <string>("phone");
            entity.countrycd        = row.IsNull("countrycd") ? string.Empty : row.Field <string>("countrycd");
            entity.partnerid        = row.IsNull("partnerid") ? string.Empty : row.Field <string>("partnerid");
            entity.dunsno           = row.IsNull("dunsno") ? string.Empty : row.Field <string>("dunsno");
            entity.fedtaxid         = row.IsNull("fedtaxid") ? string.Empty : row.Field <string>("fedtaxid");
            entity.user1            = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2            = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.user3            = row.IsNull("user3") ? string.Empty : row.Field <string>("user3");
            entity.user4            = row.IsNull("user4") ? string.Empty : row.Field <string>("user4");
            entity.user5            = row.IsNull("user5") ? string.Empty : row.Field <string>("user5");
            entity.user6            = row.Field <decimal?>("user6");
            entity.user7            = row.Field <decimal?>("user7");
            entity.user8            = row.Field <DateTime?>("user8");
            entity.user9            = row.Field <DateTime?>("user9");
            entity.rwidptxtransaddr = row.Field <byte[]>("rwidptxtransaddr").ToStringEncoded();
            return(entity);
        }