Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSastatetaxlookupresults(ref DataRow row, Sastatetaxlookupresults entity)
 {
     row.SetField("state", entity.state);
     row.SetField("descrip", entity.descrip);
     row.SetField("taxid", entity.taxid);
     row.SetField("glno", entity.glno);
     row.SetField("ecsales", entity.ecsales);
     row.SetField("rowid-sasgs", entity.rowidSasgs.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Sastatetaxlookupresults BuildSastatetaxlookupresultsFromRow(DataRow row)
        {
            Sastatetaxlookupresults entity = new Sastatetaxlookupresults();

            entity.state      = row.IsNull("state") ? string.Empty : row.Field <string>("state");
            entity.descrip    = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.taxid      = row.IsNull("taxid") ? string.Empty : row.Field <string>("taxid");
            entity.glno       = row.IsNull("glno") ? string.Empty : row.Field <string>("glno");
            entity.ecsales    = row.Field <bool>("ecsales");
            entity.rowidSasgs = row.Field <byte[]>("rowid-sasgs").ToStringEncoded();
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }