示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSasglcopy(ref DataRow row, Sasglcopy entity)
 {
     row.SetField("fromstate", entity.fromstate);
     row.SetField("fromtaxauth", entity.fromtaxauth);
     row.SetField("tostate", entity.tostate);
     row.SetField("totaxauth", entity.totaxauth);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Sasglcopy BuildSasglcopyFromRow(DataRow row)
        {
            Sasglcopy entity = new Sasglcopy();

            entity.fromstate   = row.IsNull("fromstate") ? string.Empty : row.Field <string>("fromstate");
            entity.fromtaxauth = row.IsNull("fromtaxauth") ? string.Empty : row.Field <string>("fromtaxauth");
            entity.tostate     = row.IsNull("tostate") ? string.Empty : row.Field <string>("tostate");
            entity.totaxauth   = row.IsNull("totaxauth") ? string.Empty : row.Field <string>("totaxauth");
            entity.rowid       = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }