Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSasgscriteria(ref DataRow row, Sasgscriteria 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("sasgm-rowid", entity.sasgmRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Sasgscriteria BuildSasgscriteriaFromRow(DataRow row)
        {
            Sasgscriteria entity = new Sasgscriteria();

            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.sasgmRowid = row.Field <byte[]>("sasgm-rowid").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }