Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGeocodelookupcriteria(ref DataRow row, Geocodelookupcriteria entity)
 {
     row.SetField("tablename", entity.tablename);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("groupnm", entity.groupnm);
     row.SetField("vendno", entity.vendno);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("slsrep", entity.slsrep);
     row.SetField("groupid", entity.groupid);
     row.SetField("whse", entity.whse);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("reportno", entity.reportno);
     row.SetField("sasccono", entity.sasccono);
     row.SetField("city", entity.city);
     row.SetField("country", entity.country);
     row.SetField("outofcityfl", entity.outofcityfl);
     row.SetField("state", entity.state);
     row.SetField("streetaddr", entity.streetaddr);
     row.SetField("zipcd", entity.zipcd);
     row.SetField("geocd", entity.geocd);
 }
Example #2
0
        public static Geocodelookupcriteria BuildGeocodelookupcriteriaFromRow(DataRow row)
        {
            Geocodelookupcriteria entity = new Geocodelookupcriteria();

            entity.tablename   = row.IsNull("tablename") ? string.Empty : row.Field <string>("tablename");
            entity.custno      = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto      = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.groupnm     = row.IsNull("groupnm") ? string.Empty : row.Field <string>("groupnm");
            entity.vendno      = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.shipfmno    = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.slsrep      = row.IsNull("slsrep") ? string.Empty : row.Field <string>("slsrep");
            entity.groupid     = row.IsNull("groupid") ? string.Empty : row.Field <string>("groupid");
            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.orderno     = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf    = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.pono        = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf       = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.reportno    = row.IsNull("reportno") ? 0 : row.Field <int>("reportno");
            entity.sasccono    = row.IsNull("sasccono") ? 0 : row.Field <int>("sasccono");
            entity.city        = row.IsNull("city") ? string.Empty : row.Field <string>("city");
            entity.country     = row.IsNull("country") ? string.Empty : row.Field <string>("country");
            entity.outofcityfl = row.Field <bool>("outofcityfl");
            entity.state       = row.IsNull("state") ? string.Empty : row.Field <string>("state");
            entity.streetaddr  = row.IsNull("streetaddr") ? string.Empty : row.Field <string>("streetaddr");
            entity.zipcd       = row.IsNull("zipcd") ? string.Empty : row.Field <string>("zipcd");
            entity.geocd       = row.IsNull("geocd") ? 0 : row.Field <int>("geocd");
            return(entity);
        }