Click here to Skip to main content
15,912,756 members
Home / Discussions / C#
   

C#

 
AnswerRe: SOAP Pin
Guffa15-Sep-06 15:38
Guffa15-Sep-06 15:38 
QuestionIterate through form controls C# Pin
Kasic Slobodan15-Sep-06 11:00
Kasic Slobodan15-Sep-06 11:00 
AnswerRe: Iterate through form controls C# Pin
ystl15-Sep-06 11:11
ystl15-Sep-06 11:11 
GeneralRe: Iterate through form controls C# [modified] Pin
Kasic Slobodan15-Sep-06 11:29
Kasic Slobodan15-Sep-06 11:29 
QuestionPort 80 Pin
AAndrews15-Sep-06 10:21
AAndrews15-Sep-06 10:21 
AnswerRe: Port 80 Pin
User 665815-Sep-06 11:21
User 665815-Sep-06 11:21 
AnswerRe: Port 80 [modified] Pin
AAndrews16-Sep-06 1:46
AAndrews16-Sep-06 1:46 
QuestionCalling Method Problem, using this in Methods-calls, HELP pls Pin
blackoasis@googlemail.com15-Sep-06 9:57
blackoasis@googlemail.com15-Sep-06 9:57 
Hello everyone!

I'm trying to capsulate Data-Access from the Model using different classes and NHibernate.
The problem is the following...
Calling the Methods down to the Database are ok. But when the result should come back in 'this' (see the comments in the Appointment-Class) no data is given, though in the AppointmentData-Class (see comment there) I can see them!!

First on the Form the user triggers the Button3, therefore one Appointment with Id "1" should be read.

private void button3_Click(object sender, EventArgs e)
{
Appointment app = new Appointment();
app.GetItem("1");
}

Calling the GetItem-Method of the instance of the Class Appointment.

public void GetItem(String Id)
{
this.Id = Id;
AppointmentData appData = new AppointmentData();
appData.GetAppointment(this);
//when the method-call comes back 'this' is empty except the field Id
}

Calling the GetAppointment-Method of the instance of the Class AppointmentData.

public void GetAppointment(Appointment app)
{
ISession session = null;
String appId = app.Id;

try
{
//using NHibernate
session = factory.OpenSession();
app = (Appointment)session.Load(typeof(Appointment), appId);
//here app is filled with correct data
}
catch (Exception ex)
{
Console.Write(ex);
session.Disconnect();
// handle exception
}
}


Perhaps someone could be me a little bit. Sorry for my bad language!
If something is unclear, I can explain it more detailed.

Many thx
Jochen Schneider Laugh | :laugh:


AnswerRe: Calling Method Problem, using this in Methods-calls, HELP pls Pin
Stefan Troschuetz15-Sep-06 20:40
Stefan Troschuetz15-Sep-06 20:40 
QuestionHow to Create a Custom Line Object Control Pin
ystl15-Sep-06 9:35
ystl15-Sep-06 9:35 
AnswerRe: How to Create a Custom Line Object Control Pin
mav.northwind15-Sep-06 21:56
mav.northwind15-Sep-06 21:56 
GeneralRe: How to Create a Custom Line Object Control Pin
ystl18-Sep-06 4:58
ystl18-Sep-06 4:58 
Questionactive directory "DirectorySearcher" security Pin
WetRivrRat15-Sep-06 9:06
WetRivrRat15-Sep-06 9:06 
QuestionError installing COM component in system32 Pin
Abbas8215-Sep-06 8:21
Abbas8215-Sep-06 8:21 
QuestionWebservice C# [modified] Pin
acardeiradias15-Sep-06 8:00
acardeiradias15-Sep-06 8:00 
AnswerRe: Webservice C# Pin
Stefan Troschuetz15-Sep-06 20:44
Stefan Troschuetz15-Sep-06 20:44 
GeneralRe: Webservice C# Pin
acardeiradias15-Sep-06 23:28
acardeiradias15-Sep-06 23:28 
Questionerratic NaN's in a C# program Pin
davidmakovoz15-Sep-06 6:26
davidmakovoz15-Sep-06 6:26 
AnswerRe: erratic NaN's in a C# program Pin
Not Active15-Sep-06 6:40
mentorNot Active15-Sep-06 6:40 
AnswerRe: erratic NaN's in a C# program Pin
leppie15-Sep-06 12:42
leppie15-Sep-06 12:42 
QuestionModeless Form Pin
zaboboa15-Sep-06 6:16
zaboboa15-Sep-06 6:16 
AnswerRe: Modeless Form Pin
Not Active15-Sep-06 6:31
mentorNot Active15-Sep-06 6:31 
GeneralRe: Modeless Form Pin
zaboboa15-Sep-06 6:37
zaboboa15-Sep-06 6:37 
GeneralRe: Modeless Form Pin
Not Active15-Sep-06 6:42
mentorNot Active15-Sep-06 6:42 
GeneralRe: Modeless Form Pin
zaboboa15-Sep-06 6:44
zaboboa15-Sep-06 6:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.