コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWebnotelistcriteria(ref DataRow row, Webnotelistcriteria entity)
 {
     row.SetField("tablename", entity.tablename);
     row.SetField("primarykey", entity.primarykey);
     row.SetField("secondarykey", entity.secondarykey);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("webnotelistuserfield", entity.webnotelistuserfield);
     row.SetField("userfield", entity.userfield);
     row.SetField("selectedcategories", entity.selectedcategories);
 }
コード例 #2
0
        public static Webnotelistcriteria BuildWebnotelistcriteriaFromRow(DataRow row)
        {
            Webnotelistcriteria entity = new Webnotelistcriteria();

            entity.tablename            = row.IsNull("tablename") ? string.Empty : row.Field <string>("tablename");
            entity.primarykey           = row.IsNull("primarykey") ? string.Empty : row.Field <string>("primarykey");
            entity.secondarykey         = row.IsNull("secondarykey") ? string.Empty : row.Field <string>("secondarykey");
            entity.recordcountlimit     = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.webnotelistuserfield = row.IsNull("webnotelistuserfield") ? string.Empty : row.Field <string>("webnotelistuserfield");
            entity.userfield            = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            entity.selectedcategories   = row.IsNull("selectedcategories") ? string.Empty : row.Field <string>("selectedcategories");
            return(entity);
        }