Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromTiatcaddress(ref DataRow row, Tiatcaddress entity)
 {
     row.SetField("rowpointer", entity.rowpointer);
     row.SetField("taxinterfacety", entity.taxinterfacety);
     row.SetField("address", entity.address);
     row.SetField("city", entity.city);
     row.SetField("county", entity.county);
     row.SetField("state", entity.state);
     row.SetField("zipcd", entity.zipcd);
     row.SetField("country", entity.country);
     row.SetField("outofcityfl", entity.outofcityfl);
     row.SetField("geocd", entity.geocd);
     row.SetField("seccity", entity.seccity);
     row.SetField("seccounty", entity.seccounty);
     row.SetField("seczipcd", entity.seczipcd);
     row.SetField("secgeocd", entity.secgeocd);
     row.SetField("location", entity.location);
     row.SetField("prodcode", entity.prodcode);
     row.SetField("serviceind", entity.serviceind);
     row.SetField("grossamt", entity.grossamt);
     row.SetField("exemptamt", entity.exemptamt);
     row.SetField("addresssensitive", entity.addresssensitive);
     row.SetField("countrysensitive", entity.countrysensitive);
     row.SetField("outofcitysensitive", entity.outofcitysensitive);
     row.SetField("locationsensitive", entity.locationsensitive);
     row.SetField("seccitysensitive", entity.seccitysensitive);
     row.SetField("seccountysensitive", entity.seccountysensitive);
     row.SetField("seczipcdsensitive", entity.seczipcdsensitive);
     row.SetField("secgeocdsensitive", entity.secgeocdsensitive);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Tiatcaddress BuildTiatcaddressFromRow(DataRow row)
        {
            Tiatcaddress entity = new Tiatcaddress();

            entity.rowpointer         = row.IsNull("rowpointer") ? string.Empty : row.Field <string>("rowpointer");
            entity.taxinterfacety     = row.IsNull("taxinterfacety") ? string.Empty : row.Field <string>("taxinterfacety");
            entity.address            = row.IsNull("address") ? string.Empty : row.Field <string>("address");
            entity.city               = row.IsNull("city") ? string.Empty : row.Field <string>("city");
            entity.county             = row.IsNull("county") ? string.Empty : row.Field <string>("county");
            entity.state              = row.IsNull("state") ? string.Empty : row.Field <string>("state");
            entity.zipcd              = row.IsNull("zipcd") ? string.Empty : row.Field <string>("zipcd");
            entity.country            = row.IsNull("country") ? string.Empty : row.Field <string>("country");
            entity.outofcityfl        = row.Field <bool>("outofcityfl");
            entity.geocd              = row.IsNull("geocd") ? 0 : row.Field <int>("geocd");
            entity.seccity            = row.IsNull("seccity") ? string.Empty : row.Field <string>("seccity");
            entity.seccounty          = row.IsNull("seccounty") ? string.Empty : row.Field <string>("seccounty");
            entity.seczipcd           = row.IsNull("seczipcd") ? string.Empty : row.Field <string>("seczipcd");
            entity.secgeocd           = row.IsNull("secgeocd") ? 0 : row.Field <int>("secgeocd");
            entity.location           = row.IsNull("location") ? string.Empty : row.Field <string>("location");
            entity.prodcode           = row.IsNull("prodcode") ? string.Empty : row.Field <string>("prodcode");
            entity.serviceind         = row.IsNull("serviceind") ? string.Empty : row.Field <string>("serviceind");
            entity.grossamt           = row.IsNull("grossamt") ? decimal.Zero : row.Field <decimal>("grossamt");
            entity.exemptamt          = row.IsNull("exemptamt") ? decimal.Zero : row.Field <decimal>("exemptamt");
            entity.addresssensitive   = row.Field <bool>("addresssensitive");
            entity.countrysensitive   = row.Field <bool>("countrysensitive");
            entity.outofcitysensitive = row.Field <bool>("outofcitysensitive");
            entity.locationsensitive  = row.Field <bool>("locationsensitive");
            entity.seccitysensitive   = row.Field <bool>("seccitysensitive");
            entity.seccountysensitive = row.Field <bool>("seccountysensitive");
            entity.seczipcdsensitive  = row.Field <bool>("seczipcdsensitive");
            entity.secgeocdsensitive  = row.Field <bool>("secgeocdsensitive");
            entity.userfield          = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }