Could anyone help how to set different conditions for different clients lets take one example
Class Test
{
public int Age{get;set;}
public int Salary{get;set;}
}
Main()
{
Test _test=new Test();
if(_test.Age>10)
{
//some code
}
}
Lets see here I have written one condition _test.Age>10 if it is true, then the following code will execute. But here I have hard coded the condition. If some client want the condition like if _test.Salary>1000 then the following code will execute. So I
want some thing the condition will change according to the client. For this type of scenario what I will do could anyone help me.
The way that most systems do this is to provide the user with a way to specify the tests (search criteria) and then the system will be designed to dynamically generate SQL to search a database for records that match the specified criteria.
Member
78 Points
54 Posts
Different conditions for different clients
Feb 23, 2016 10:07 AM|prohitkumar893|LINK
Hi,
Could anyone help how to set different conditions for different clients lets take one example
Class Test
{
public int Age{get;set;}
public int Salary{get;set;}
}
Main()
{
Test _test=new Test();
if(_test.Age>10)
{
//some code
}
}
Lets see here I have written one condition _test.Age>10 if it is true, then the following code will execute. But here I have hard coded the condition. If some client want the condition like if _test.Salary>1000 then the following code will execute. So I want some thing the condition will change according to the client. For this type of scenario what I will do could anyone help me.
All-Star
194428 Points
28074 Posts
Moderator
Re: Different conditions for different clients
Feb 23, 2016 02:21 PM|Mikesdotnetting|LINK
The way that most systems do this is to provide the user with a way to specify the tests (search criteria) and then the system will be designed to dynamically generate SQL to search a database for records that match the specified criteria.