This topic is locked

SESSION and FILTER

3/10/2009 12:50:07 PM
ASPRunner.NET General questions
K
kevinator author

Hi everybody,
we are evaluating ASPRUNNER.net and we face a problem (not a really one, in fact we don't know how to use the variables Session["dbGrid_ShortTableName_SearchSQL"] and Session["dbGrid_ShortTableName_SearchParams"] .
Documentation will be appriciate.
This is the final test between ASPRUNNER.NET and IRON SPEED. I'm sure that if we can solve that probleme, our final choice will be for ASPRUNNER.NET.
Thanks to all.

Admin 3/10/2009

Session["dbGrid_##@TABLE.strShortTableName##SearchSQL"] keeps the

name of the select method an object data source will call to get the

data from the database. The possible names are: "FetchByParameter" for

one column search and "FetchByAllParameters" for search by all columns

of the table.
Session["dbGrid
##@TABLE.strShortTableName##_SearchParams"] keeps a

collection of parameters for the search method "FetchByParameter" or

"FetchByAllParameters"
These methods belong to a controller class that is bound to an object

data source.
Let's say we have a "Orders" table and a list page for it that has a

data grid on it. This data grid is bound to OrdersObjectDataSource.

This object data source is bound to an instance of OrdersController

class that is a data access layer for the page.
On a simple search request SelectMethod property of the

OrdersObjectDataSource assigned a name of the method of the controller

that needs to be called to get the data that matches the search

criteria and SelectParameters property of the OrdersObjectDataSource

gets the collection of the arguments for the SelectMethod.

K
kevinator author 3/11/2009

hi sergey,
Thank you for your answer, but i'm not sure to have understand everything (my english isn't so fluent, i'm french).

Let me explain what I want to do.

I have 3 tables :

  • USERS with an IdUser as Integer
  • CATEGORY with an IdCategory as Integer
  • SALES with an IdSale as Integer and IdUser, IdCategory refering to precedent tables.

    With ASPRUNNER.NET, we can easily match the Users with the sale using IdUser. The filter level we want to add now it's to, only show to the Users the sales belonging to him, AND WITH AN IdCategory EQUAL TO 2.
    I have make some test this morning but it was a flop !
    Hope you can help me.
    Best regards.

Admin 3/12/2009

If you'd like to do that in the source code then I would suggest to do

it this way:
create a method MyBuildDataSource() on a sales list page:

private void MyBuildDataSource()

{

// get controller

Data.SalesController ctrl = new Data.SalesController();

// create query that gets sales by user id and category id

SubSonic.Query qry = new SubSonic.Query(Data.Sales.Schema).

AddWhere("IdUser", SubSonic.Comparison.Equals, 1).

AddWhere("IdCategory ", SubSonic.Comparison.Equals, 2);

// create collection of sales

Data.SalesCollection sales = new Data.SalesCollection();

// get sales

sales.LoadAndCloseReader(qry.ExecuteReader());

// remove previous binding source otherwise you'll get a run-time error

dbGrid_Sales.DataSourceID = null;

// bind 'em to the grid

dbGrid_Sales.DataSource = sales;

dbGrid_Sales.DataBind();

}


And replace BuildDataSource() method call with MyBuildDataSource().
Actual class names can be different from what you have in you project

depending on the real table names.

S
Slashu 3/25/2009

Hello,
I want to know if it's possible an user assign to other user allow access to his own profile?
Let's say that the user "A" is requesting classified information to User "C" but don't want to show that information to all other users (B,D,E,F...).

So the user "A" as a specified field(Dropdownlist) where he can select the second ownerID Name in way to assign his own security privileges to user "C".

User "C" will be able to see that information will answer and save. Both of users "A","C" will keep have access tho this information but not other users.
The objective is to share the same information between only two User entities.
Tables will be something like this:
User1

-----------------

User1ID

FName

LName

Username

Password
User2

-----------------

User2ID

FName

LName

Username

Password
SharedInformation

----------------------

SharedinfoID

Description

Request

Answer

UploadFile

User1ID (FK Reference User1(User1ID)

User2ID (FK Reference User2(User2ID)

Admin 3/26/2009

Slashu,
I see what you up to.
I'm afraid this won't be possible without custom coding.

S
Slashu 4/13/2009

Slashu,

I see what you up to.
I'm afraid this won't be possible without custom coding.


Well, I solved the problem creating Views in SQL 2005 DataBase of the same table.

This Works Well for asprunner.net 4, but not works in asprunner.net 5.
How I did it?
Create a table "Orders"
Create a SQL View "vOrders_Customers"

Create a SQL View "vOrders_Team"
Create two columns in "Orders" table. [CustomersID] and [TeamID].
Now with the advanced security options in asprunner.net 4 I can configure the View as:
"vOrders_Customers"

Users Table: UserID Main Table: CustomersID
"vOrders_Team"

Users Table: UserID Main Table: TeamID
Then I need to create a litlle custom Code that only writes the UserID in the CustomersID and TeamID accordingly, and writes in GoupID Customer or Team, accordingly.

When User Login.
Thanks.

S
Slashu 4/13/2009

I Found some BUGs.
When Searching by "AnyField" "Contains" = "a".

The user can see all the information By GroupID and Not By OwerID.

So this user can see data that he is not the owner.
I only have more 4 days trial version.
I see that this application still have lots bugs, and appears not have too much support.

Help file not contains so much information and this forum only have more PHP or ASP information.
I describe here two bugs:

To Upload Files and images, I needed to remove the Exclamation point (!) in Check.Permission function in GetFile.aspx.cs and imager.aspx.cs.
On some files I have to remove "&field="

Other files, remove question point (?). (error: because cant convert type int? in int)
I found this bugs using Visual Studio 2008.
But I still working on it and in the final if every thing Works Well I will buy this application.

I aleready integrate the Captcha found in version 5.
If SomeOne is available to help me on this work I'll appreciate, I can pay for the good work.

The most wanted objective is to put the version 5 interface working (relations between "Customer" and "Team") without Bugs, but version 4 do the needed work, with some corrections.
e-mail: leopardos@gmail.com

Admin 4/14/2009

I recommend to post your application to Demo Account (use 'Demo Account' button on the last screen in program). Then open a ticket at http://support.xlinesoft.com sending your Demo Account URL for investigation. We'll help you with this.

E
excini 6/21/2009

In your base class, make each method virtual, then in the child class, override it and call the base method if you still need it to do something:

Csharp Code:public class Application : HttpApplication protected virtual void Session_OnStart public class ApplicationImpl : Application protected override void Session_OnStart // Do what you need base.Session_OnStart;