0
비즈니스 클래스로 수행 한 작은 응용 프로그램을 만들고 있습니다. 이제 보고서를 만들고 싶습니다. 보고서 뷰어에서 하위 클래스를 표시하는 방법 - VS 2010
public class User
{
public int UserId { get; set; }
public string UserName { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Password { get; set; }
public string PhoneNo { get; set; }
public string Email { get; set; }
가 지금 부동산 클래스를 사용하여 보고서를 만들 또한 사용자 클래스를 보여주고 싶은 :
public class Property
{
public int PropertyId { get; set; }
public int OwnerId { get; set; }
//User is another Class
public User Owner { get; set; }
public int StaffUserId { get; set; }
public Staff StaffPerson { get; set; }
public string Address { get; set; }
public int NoGarage { get; set; }
public int NoRoom { get; set; }
public int NoToilet { get; set; }
public string PropertyType { get; set; }
public string PropertyStatus { get; set; }
public double SalePrice { get; set; }
public double RentPricePerMonth { get; set; }
public bool IsAvailable { get; set; }
...............
그리고 여기 내 사용자 클래스입니다 : 첫째, 여기 내 속성 클래스입니다. 속성 클래스의 개체를 표시 할 수 있지만 사용자 클래스를 표시 할 수 없습니다.
어떻게하면됩니까?
[Serializable]
public class User
{
이
이 2.If는, 경우에 사용자 이름을 표시 할에 "사용자"클래스
Property p = Property.GetPropertyByPropertyId(propertyId);
PropertyBindingSource.DataSource = p;
reportViewer1.RefreshReport();
나는 시도했지만 아무 일도 없을 것 같습니다. –