Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSasoprofilelist(ref DataRow row, Sasoprofilelist entity)
 {
     row.SetField("profilename", entity.profilename);
     row.SetField("descrip", entity.descrip);
     row.SetField("opercount", entity.opercount);
     row.SetField("pvuserrowid", entity.pvuserrowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Sasoprofilelist BuildSasoprofilelistFromRow(DataRow row)
        {
            Sasoprofilelist entity = new Sasoprofilelist();

            entity.profilename = row.IsNull("profilename") ? string.Empty : row.Field <string>("profilename");
            entity.descrip     = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.opercount   = row.IsNull("opercount") ? 0 : row.Field <int>("opercount");
            entity.pvuserrowid = row.Field <byte[]>("pvuserrowid").ToStringEncoded();
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }