TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Diviner Chan
NA
7
0
How to bind nested class objects to DataGridView?
Jun 16 2008 6:47 PM
Hi all,
I have 2 classes like this:
namespace NHibernate.Examples.UserDeptModule
{
public class Dept
{
private Guid id;
private String deptName;
private String deptTel;
public virtual Guid Id
{
get { return id; }
set { id = value; }
}
public virtual String DeptName
{
get { return deptName; }
set { deptName = value; }
}
public virtual String DeptTel
{
get { return deptTel; }
set { deptTel = value; }
}
public override String ToString()
{
return deptName;
}
}
}
namespace NHibernate.Examples.UserDeptModule
{
public class User
{
private Guid id;
private Guid dept_id;
private Dept dept;
private string userName;
public User()
{
}
public virtual Guid Id
{
get { return id; }
set { id = value; }
}
public virtual Guid Dept_Id
{
get { return dept_id; }
set { dept_id = value; }
}
public virtual Dept DeptRef
{
get { return dept; }
set
{
if (value != null)
{
this.dept_id = value.Id;
}
dept = value;
}
}
public virtual string UserName
{
get { return userName; }
set { userName = value; }
}
}
}
My project is under NHibernate, and two class is done in many-to-one manner. Now I want to show user information to DataGridView including Dept's deptName and deptTel. How to do this?
Thank you very much.
--
Best regards,
Diviner.
Reply
Answers (
1
)
GraphicsPath curved line problem
i have mysql but i don't How to use