making IsDirty to true

making IsDirty to true

Old forum URL: forums.lhotka.net/forums/t/661.aspx


yh_ink posted on Tuesday, July 18, 2006

Hey guys,

Please help me out with this.I have two classes.what i am trying to do is get the data from my first class in to the form.then i try to use save method in the form to save some data.what happens is that my webform dosent got to the class which i am trying to call.I found that IsDiry is set to false.What should i do to go to my class by using Save Method only.

thanks

david.wendelken replied on Tuesday, July 18, 2006

Web or Windows?

What are you doing differently from the sample project, ProjectTracker?

 

yh_ink replied on Tuesday, July 18, 2006

i am not doing anything different.But what i am trying to do is call my class parent class in my webform and  through it  trying to update the child.

let me explain in detail.

first my webforn calls the parent get method.I have set a property of child in the parent object.Both parent and child here work on two different thing.entirely different.

Assume _parent(parent)&_child (child)

this is the wave i call from the form

//call get   _parent.get();

if(_parent._child.login != null)  //here it checks for login in the child if exists

_parent._child.login= _parent.login;//gets parent login and sets to child

_parent._child.password = _parent.password //sets password

_Parent.save();//call parent.save

things are set in the parent object as they have to be set

problem here is when i call save it dosent go to the parent class

there r several ways of working with it instead of working with save method...but i got to use it that way

this is not the code but thats flow of it.i am new to it.

thanks

 

 

I am not knowing what to be done exactly how i should call i guess...

RockfordLhotka replied on Tuesday, July 18, 2006

Are you using CSLA .NET 1.53 or 2.0.3?

If you are using 2.0, I'd suggest that you use the CslaDataSource control and use data binding rather than manually updating all the controls.

If you are using 1.0, then you kind of do need to update the controls manually.

From your example I assume you are creating some sort of system to record usernames and passwords? Or are you trying to create a custom principal object - which is a whole other thing, and then you are totally on the wrong track with you code.

Copyright (c) Marimer LLC