Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSataxmasterlookupresults(ref DataRow row, Sataxmasterlookupresults entity)
 {
     row.SetField("recty", entity.recty);
     row.SetField("taxgroup", entity.taxgroup);
     row.SetField("statecd", entity.statecd);
     row.SetField("countycd", entity.countycd);
     row.SetField("citycd", entity.citycd);
     row.SetField("othercd", entity.othercd);
     row.SetField("descrip", entity.descrip);
     row.SetField("rowid-sasgm", entity.rowidSasgm.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Sataxmasterlookupresults BuildSataxmasterlookupresultsFromRow(DataRow row)
        {
            Sataxmasterlookupresults entity = new Sataxmasterlookupresults();

            entity.recty      = row.IsNull("recty") ? 0 : row.Field <int>("recty");
            entity.taxgroup   = row.IsNull("taxgroup") ? 0 : row.Field <int>("taxgroup");
            entity.statecd    = row.IsNull("statecd") ? string.Empty : row.Field <string>("statecd");
            entity.countycd   = row.IsNull("countycd") ? string.Empty : row.Field <string>("countycd");
            entity.citycd     = row.IsNull("citycd") ? string.Empty : row.Field <string>("citycd");
            entity.othercd    = row.IsNull("othercd") ? string.Empty : row.Field <string>("othercd");
            entity.descrip    = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.rowidSasgm = row.Field <byte[]>("rowid-sasgm").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }