Esempio n. 1
0
        public static Tiatdaddress BuildTiatdaddressFromRow(DataRow row)
        {
            Tiatdaddress entity = new Tiatdaddress();

            entity.rowpointer         = row.IsNull("rowpointer") ? string.Empty : row.Field <string>("rowpointer");
            entity.taxinterfacety     = row.IsNull("taxinterfacety") ? string.Empty : row.Field <string>("taxinterfacety");
            entity.shipfrcity         = row.IsNull("shipfrcity") ? string.Empty : row.Field <string>("shipfrcity");
            entity.shipfrstate        = row.IsNull("shipfrstate") ? string.Empty : row.Field <string>("shipfrstate");
            entity.shipfrzipcd        = row.IsNull("shipfrzipcd") ? string.Empty : row.Field <string>("shipfrzipcd");
            entity.shipfrcountry      = row.IsNull("shipfrcountry") ? string.Empty : row.Field <string>("shipfrcountry");
            entity.shipfroutofcityfl  = row.Field <bool>("shipfroutofcityfl");
            entity.shipfrgeocd        = row.IsNull("shipfrgeocd") ? 0 : row.Field <int>("shipfrgeocd");
            entity.shiptocity         = row.IsNull("shiptocity") ? string.Empty : row.Field <string>("shiptocity");
            entity.shiptostate        = row.IsNull("shiptostate") ? string.Empty : row.Field <string>("shiptostate");
            entity.shiptozipcd        = row.IsNull("shiptozipcd") ? string.Empty : row.Field <string>("shiptozipcd");
            entity.shiptocountry      = row.IsNull("shiptocountry") ? string.Empty : row.Field <string>("shiptocountry");
            entity.shiptooutofcityfl  = row.Field <bool>("shiptooutofcityfl");
            entity.shiptogeocd        = row.IsNull("shiptogeocd") ? 0 : row.Field <int>("shiptogeocd");
            entity.acceptcity         = row.IsNull("acceptcity") ? string.Empty : row.Field <string>("acceptcity");
            entity.acceptstate        = row.IsNull("acceptstate") ? string.Empty : row.Field <string>("acceptstate");
            entity.acceptzipcd        = row.IsNull("acceptzipcd") ? string.Empty : row.Field <string>("acceptzipcd");
            entity.acceptcountry      = row.IsNull("acceptcountry") ? string.Empty : row.Field <string>("acceptcountry");
            entity.acceptoutofcityfl  = row.Field <bool>("acceptoutofcityfl");
            entity.acceptgeocd        = row.IsNull("acceptgeocd") ? 0 : row.Field <int>("acceptgeocd");
            entity.acceptlabel        = row.IsNull("acceptlabel") ? string.Empty : row.Field <string>("acceptlabel");
            entity.origincity         = row.IsNull("origincity") ? string.Empty : row.Field <string>("origincity");
            entity.originstate        = row.IsNull("originstate") ? string.Empty : row.Field <string>("originstate");
            entity.originzipcd        = row.IsNull("originzipcd") ? string.Empty : row.Field <string>("originzipcd");
            entity.origincountry      = row.IsNull("origincountry") ? string.Empty : row.Field <string>("origincountry");
            entity.originoutofcityfl  = row.Field <bool>("originoutofcityfl");
            entity.origingeocd        = row.IsNull("origingeocd") ? 0 : row.Field <int>("origingeocd");
            entity.originlabel        = row.IsNull("originlabel") ? string.Empty : row.Field <string>("originlabel");
            entity.autofillfl         = row.Field <bool>("autofillfl");
            entity.canadafl           = row.Field <bool>("canadafl");
            entity.prodcode           = row.IsNull("prodcode") ? string.Empty : row.Field <string>("prodcode");
            entity.serviceind         = row.IsNull("serviceind") ? string.Empty : row.Field <string>("serviceind");
            entity.pointoftransfer    = row.IsNull("pointoftransfer") ? string.Empty : row.Field <string>("pointoftransfer");
            entity.grossamt           = row.IsNull("grossamt") ? decimal.Zero : row.Field <decimal>("grossamt");
            entity.exemptamt          = row.IsNull("exemptamt") ? decimal.Zero : row.Field <decimal>("exemptamt");
            entity.countrysensitive   = row.Field <bool>("countrysensitive");
            entity.outofcitysensitive = row.Field <bool>("outofcitysensitive");
            entity.canadaflsensitive  = row.Field <bool>("canadaflsensitive");
            entity.userfield          = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Esempio n. 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromTiatdaddress(ref DataRow row, Tiatdaddress entity)
 {
     row.SetField("rowpointer", entity.rowpointer);
     row.SetField("taxinterfacety", entity.taxinterfacety);
     row.SetField("shipfrcity", entity.shipfrcity);
     row.SetField("shipfrstate", entity.shipfrstate);
     row.SetField("shipfrzipcd", entity.shipfrzipcd);
     row.SetField("shipfrcountry", entity.shipfrcountry);
     row.SetField("shipfroutofcityfl", entity.shipfroutofcityfl);
     row.SetField("shipfrgeocd", entity.shipfrgeocd);
     row.SetField("shiptocity", entity.shiptocity);
     row.SetField("shiptostate", entity.shiptostate);
     row.SetField("shiptozipcd", entity.shiptozipcd);
     row.SetField("shiptocountry", entity.shiptocountry);
     row.SetField("shiptooutofcityfl", entity.shiptooutofcityfl);
     row.SetField("shiptogeocd", entity.shiptogeocd);
     row.SetField("acceptcity", entity.acceptcity);
     row.SetField("acceptstate", entity.acceptstate);
     row.SetField("acceptzipcd", entity.acceptzipcd);
     row.SetField("acceptcountry", entity.acceptcountry);
     row.SetField("acceptoutofcityfl", entity.acceptoutofcityfl);
     row.SetField("acceptgeocd", entity.acceptgeocd);
     row.SetField("acceptlabel", entity.acceptlabel);
     row.SetField("origincity", entity.origincity);
     row.SetField("originstate", entity.originstate);
     row.SetField("originzipcd", entity.originzipcd);
     row.SetField("origincountry", entity.origincountry);
     row.SetField("originoutofcityfl", entity.originoutofcityfl);
     row.SetField("origingeocd", entity.origingeocd);
     row.SetField("originlabel", entity.originlabel);
     row.SetField("autofillfl", entity.autofillfl);
     row.SetField("canadafl", entity.canadafl);
     row.SetField("prodcode", entity.prodcode);
     row.SetField("serviceind", entity.serviceind);
     row.SetField("pointoftransfer", entity.pointoftransfer);
     row.SetField("grossamt", entity.grossamt);
     row.SetField("exemptamt", entity.exemptamt);
     row.SetField("countrysensitive", entity.countrysensitive);
     row.SetField("outofcitysensitive", entity.outofcitysensitive);
     row.SetField("canadaflsensitive", entity.canadaflsensitive);
     row.SetField("userfield", entity.userfield);
 }