Пример #1
0
        public static Oetaxdetail BuildOetaxdetailFromRow(DataRow row)
        {
            Oetaxdetail entity = new Oetaxdetail();

            entity.recty       = row.IsNull("recty") ? 0 : row.Field <int>("recty");
            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.taxsalebase = row.IsNull("taxsalebase") ? decimal.Zero : row.Field <decimal>("taxsalebase");
            entity.taxsaleamt  = row.IsNull("taxsaleamt") ? decimal.Zero : row.Field <decimal>("taxsaleamt");
            entity.taxuseamt   = row.IsNull("taxuseamt") ? decimal.Zero : row.Field <decimal>("taxuseamt");
            entity.taxtransamt = row.IsNull("taxtransamt") ? decimal.Zero : row.Field <decimal>("taxtransamt");
            entity.taxexcamt   = row.IsNull("taxexcamt") ? decimal.Zero : row.Field <decimal>("taxexcamt");
            entity.taxsalert   = row.IsNull("taxsalert") ? decimal.Zero : row.Field <decimal>("taxsalert");
            entity.taxusert    = row.IsNull("taxusert") ? decimal.Zero : row.Field <decimal>("taxusert");
            entity.taxtransrt  = row.IsNull("taxtransrt") ? decimal.Zero : row.Field <decimal>("taxtransrt");
            entity.taxexcrt    = row.IsNull("taxexcrt") ? decimal.Zero : row.Field <decimal>("taxexcrt");
            entity.rowidArett  = row.Field <byte[]>("rowid-arett").ToStringEncoded();
            entity.rectydesc   = row.IsNull("rectydesc") ? string.Empty : row.Field <string>("rectydesc");
            entity.statedesc   = row.IsNull("statedesc") ? string.Empty : row.Field <string>("statedesc");
            entity.countydesc  = row.IsNull("countydesc") ? string.Empty : row.Field <string>("countydesc");
            entity.citydesc    = row.IsNull("citydesc") ? string.Empty : row.Field <string>("citydesc");
            entity.otherdesc   = row.IsNull("otherdesc") ? string.Empty : row.Field <string>("otherdesc");
            return(entity);
        }
Пример #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOetaxdetail(ref DataRow row, Oetaxdetail entity)
 {
     row.SetField("recty", entity.recty);
     row.SetField("statecd", entity.statecd);
     row.SetField("countycd", entity.countycd);
     row.SetField("citycd", entity.citycd);
     row.SetField("othercd", entity.othercd);
     row.SetField("taxsalebase", entity.taxsalebase);
     row.SetField("taxsaleamt", entity.taxsaleamt);
     row.SetField("taxuseamt", entity.taxuseamt);
     row.SetField("taxtransamt", entity.taxtransamt);
     row.SetField("taxexcamt", entity.taxexcamt);
     row.SetField("taxsalert", entity.taxsalert);
     row.SetField("taxusert", entity.taxusert);
     row.SetField("taxtransrt", entity.taxtransrt);
     row.SetField("taxexcrt", entity.taxexcrt);
     row.SetField("rowid-arett", entity.rowidArett.ToByteArray());
     row.SetField("rectydesc", entity.rectydesc);
     row.SetField("statedesc", entity.statedesc);
     row.SetField("countydesc", entity.countydesc);
     row.SetField("citydesc", entity.citydesc);
     row.SetField("otherdesc", entity.otherdesc);
 }