|
Make sure this._Session is not null.
This could be throwing the error.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
|
|
|
|
|
..and loose the hugging.
I are Troll
|
|
|
|
|
With:
[ when doing breakpoints,the problem appears in the collection'initiation.How can I solve that? ]
I think you meen this part of you code:
[
// Initiation de la collection
SLSalariesCollectio salaries = new SLSalariesCollection (this._Session);
salaries.Init ();
]
Did you check the value of 'this._Session' before initializing your collection?
|
|
|
|
|
I had problem with tracking some HTTP requests which are sent by browser.
And small investigation defined that no every tool show the truth. Who doesn’t have time to read too many text below – outcome is simple a uri of browser.
Goal
My goal was – send GET request on some click action, and after that immideately show next page,
And here I did not care about response, so goal only – request …
Two options were reviewed:
Send request with using possibility param src :
If you can think then I Can.
|
|
|
|
|
On which side do you want to track the request?
On the browser you would have to write some plugin - of course specific to the user's browser which means lots of work.
A server normally will do some logging for you.
|
|
|
|
|
I am writing an application that I want to give to customers.
What is the best solution to create a trail period of 1 month.My preferred method is to disable parts of the application that are critical to normal use of the program but aren't critical to its evaluation (like the ability to save your work, for example).and then send them an unlocking code unique to their computer when they register the full program.
I was thinking that if they are interested in purchasing the software I will give them a license key or something, to unlock the application.
After all I don't want a "Sorry, this program has expired" message to the user.It should disable some application controls after the period and enable when they register.Please help me someone...Many thanks for any advice
|
|
|
|
|
You could set a key in the registry containing date and time of first use, but this is not very secure.
A more secure method would be to use multiple (encrypted) keys and an encrypted file with the same data.
Activation should be done based on a client-server system, this system should check wether the company+key combination is valid.
After making sure it is valid, the key should be encrypted and stored in the register.
Checking for double activations (multiple pcs/companies/illegal use) is a difficult task, unfortunately I have no experience with this.
|
|
|
|
|
|
Create two versions of your program using conditional compilation - you can use #if PAIDVERSION ... #endif to keep the features you want people to pay for to yourself and your paying customers.
Anything else can be broken, usually quite easily - but if the features aren't there at all, then it obviously can't be "cracked".
Well - it's just a thought ...
Regards
Espen Harlinn
|
|
|
|
|
This is the approach I would use. I'm typically writing custom software for individual clients so this doesn't really apply to my work, but is definitely the approach I would use for a commercial product.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
|
Really thanks for the support everyone.Making two types of apps inside one msi(exe),Is that so professional?
Well,doesn't matter.Still i have a doubt.I thought of storing two ,three variables inside the app by making the settings strings in application properties in Visual Studio.
In VB ,you can simply write 'If(My.Settings == "0")
But how to do that in C#.There is now "my" in there...
|
|
|
|
|
>> Is that so professional?
No - create two different setup projects too, one for the demo, and one for the paying customers
>> 'If(My.Settings == "0")
Oh my, that's not what I proposed. The VB syntax would be
#If PAIDVERSION Then
stuff only available to paying customers
#End If
If you use something like If(My.Settings == "0") everything gets compiled into the executable. The idea was to totally remove those features from the demo version - that way nobody can "crack" your licensing scheme.
>> But how to do that in C#.There is now "my" in there...
in C# you have "this" - a reference to the instance of the current object - and it's also used for .Net extension methods
|
|
|
|
|
I am pretty much happy about the way you helped me.
using the keyword 'this' as in if(this.setting == 0)
{
app.run(TRIAL)
}
Is not at all working.I don't prefer buying an app.but its not so personal.we need to use it as they want it be.One person in Code Project
(Hameed Ji) made an application like this.it was pretty helpful and easy to understand.but still its disabling the whole application that needs to be registered.
>> a reference to the instance of the current object - and it's also used for .Net extension methods.
If you can please give a any example over CP or any where else.
|
|
|
|
|
Sir,
i want to create an application to compress image in c# and save it in a database usually sql server.
|
|
|
|
|
Other then bmp, all popular formats (jpg, png) are already compressed and can't be compressed again. Then just store it as a varbinary(max) column.
-- Modified Friday, February 25, 2011 12:32 PM
|
|
|
|
|
Hello,
I realize that, DatabaseContext class generated by LINQ to SQL / LINQ to ENTITY should not be a part of the Views and so I want to encapsulate the uses of DatabaseContext classes within my Data Access Layer. So, when I need to display a set of records in a GridView in Windows Form, I can simply let my Data Access Layer return the List<Person> of the records and display that records in GridView without any problem. Great!
Here is my Person class
public class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
}
Ok, now, I face the big problem when I need to save the changes back to the database. I may have 1000 records displaying in the Grid view where the GridView is bound to a BindingSource. My user can change only 2-3 records from the GridView and delete some of the records as well. How can I tell the LINQ to SQL / LINQ to Entity (data context) about the changed records so that when I pass the List<Person> object to my Data Access Layer, Data Access Layer can identify which records needs to be updated and finally the Data Context updates those records ?
Can you please show me some pattern for this problem ?
Regards.
|
|
|
|
|
Well, see, the smarter option is not to allow editing in a grid. Have a form that displays and allows updates to one record and if the user clicks the "Save" button, that one record gets saved to the database.
|
|
|
|
|
I see ! So, if I want to expose an Excel Spreadsheet like facility to my User, I cannot follow n tier pattern thats sad. But anyway, thank you for giving me the idea.
|
|
|
|
|
Nadia Monalisa wrote: expose an Excel Spreadsheet like facility
That is rarely a good idea, it's not very user-friendly, but this may be one of those rare times, just be sure, ask potential users for their opinion.
|
|
|
|
|
You need some kind of mapper to map the data properly. After making the changes on the grid, get the currently available Person instances from grid's datasource and compare it against the list that you load from database. You will need some unique identifier on the Person type which can be used to find out the proper domain object. Given the two lists, you can do a diff and find out newly added, updated and deleted records.
Best wishes,
Navaneeth
|
|
|
|
|
Thanks for your reply.
Sounds like a lots of tasks, moreover maintenance can be nightmare if I keep changing my domain model and database table fields. I thought, if I implement INotifyPropertyChanged in my Business Object (Person Class) then, the .NET Framework can notify a data context about dirty rows automatically. I tried and that did not work. Looks like, I will have to compromise either Excel / Spreadsheet functionality or Decoupling of Presentation Layer + Data Access Layer (LINQ to SQL DataContext class)
|
|
|
|
|
Nadia Monalisa wrote: Sounds like a lots of tasks,
Not actually. You have all the information, you just need to match with proper objects. And finding diff, a single line LINQ can do it.
Best wishes,
Navaneeth
|
|
|
|
|
Thank you for showing the light. I will give a try. I just missed the idea about using LINQ to find the diff. now feeling easy
|
|
|
|
|
HOw about a couple of extra properties on your Person Class.
bool IsUpdated;
bool IsDeleted;
Your grid needs to be filtered to omit the IsDeleted items (or just highlight them in some way so the user can change their minds)
Set the IsUpdated when anything is, erm, updated.
Then your DAL just updates where IsUpated, and deletes where IsDeleted.
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|