Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromTiatctax(ref DataRow row, Tiatctax entity)
 {
     row.SetField("rowpointer", entity.rowpointer);
     row.SetField("federal", entity.federal);
     row.SetField("state", entity.state);
     row.SetField("secstate", entity.secstate);
     row.SetField("county", entity.county);
     row.SetField("seccounty", entity.seccounty);
     row.SetField("city", entity.city);
     row.SetField("seccity", entity.seccity);
     row.SetField("district", entity.district);
     row.SetField("errorcd", entity.errorcd);
     row.SetField("errorfl", entity.errorfl);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Tiatctax BuildTiatctaxFromRow(DataRow row)
        {
            Tiatctax entity = new Tiatctax();

            entity.rowpointer = row.IsNull("rowpointer") ? string.Empty : row.Field <string>("rowpointer");
            entity.federal    = row.IsNull("federal") ? decimal.Zero : row.Field <decimal>("federal");
            entity.state      = row.IsNull("state") ? decimal.Zero : row.Field <decimal>("state");
            entity.secstate   = row.IsNull("secstate") ? decimal.Zero : row.Field <decimal>("secstate");
            entity.county     = row.IsNull("county") ? decimal.Zero : row.Field <decimal>("county");
            entity.seccounty  = row.IsNull("seccounty") ? decimal.Zero : row.Field <decimal>("seccounty");
            entity.city       = row.IsNull("city") ? decimal.Zero : row.Field <decimal>("city");
            entity.seccity    = row.IsNull("seccity") ? decimal.Zero : row.Field <decimal>("seccity");
            entity.district   = row.IsNull("district") ? decimal.Zero : row.Field <decimal>("district");
            entity.errorcd    = row.IsNull("errorcd") ? string.Empty : row.Field <string>("errorcd");
            entity.errorfl    = row.Field <bool>("errorfl");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }