Вход на сайт
Infragistics PropertyBrowser control
217 просмотров
Перейти к просмотру всей ветки
в ответ Simple 05.05.06 15:36
Мог бы - это та самая либа, которую я использую в своем проекте.
Код заполнения формы-редактора строки выглядит так:
Только не спрашивай какой из контролов какого типа...

Код заполнения формы-редактора строки выглядит так:
В ответ на:
private void BindForm(string KeyValue)
{
try
{
// load up the specified row
using(TDb8 db = new TDb8())
{
TPrimaryKey key = new TPrimaryKey( new TFieldName("IDs") );
key.Value = KeyValue;
row = db.Contact_co.GetByPrimaryKey( key );
this.IDs.Text = row.IDs.Value;
this.CompanyID.Text = row.CompanyID.Value;
this.LocationID.Text = row.LocationID.Value;
this.UserID.Text = row.UserID.Value;
this.SalutationID.Text = row.SalutationID.Value;
this.FirstName.Text = row.FirstName.Value;
this.MiddleName.Text = row.MiddleName.Value;
this.Surname.Text = row.Surname.Value;
this.JobTitle.Text = row.JobTitle.Value;
this.ContactTypeID1.Text = row.ContactTypeID1.Value;
this.ContactDetail1.Text = row.ContactDetail1.Value;
this.ContactTypeID2.Text = row.ContactTypeID2.Value;
this.ContactDetail2.Text = row.ContactDetail2.Value;
this.ContactTypeID3.Text = row.ContactTypeID3.Value;
this.ContactDetail3.Text = row.ContactDetail3.Value;
this.ContactTypeID4.Text = row.ContactTypeID4.Value;
this.ContactDetail4.Text = row.ContactDetail4.Value;
this.Comment.Text = row.Comment.Value;
this.PPS.Text = row.PPS.Value;
this.DOB.Text = row.DOB.Value;
this.Nationality.Text = row.Nationality.Value;
this.ManualChange.Text = row.ManualChange.Value;
this.CreatedBy.Text = row.CreatedBy.Value;
this.CreatedOn.Text = row.CreatedOn.Value;
this.ModifiedBy.Text = row.ModifiedBy.Value;
this.ModifiedOn.Text = row.ModifiedOn.Value;
} // using
} // try
catch (Exception ex)
{
SetErrorMessage(ex.Message);
} // try/catch
} // BindForm
private void BindForm(string KeyValue)
{
try
{
// load up the specified row
using(TDb8 db = new TDb8())
{
TPrimaryKey key = new TPrimaryKey( new TFieldName("IDs") );
key.Value = KeyValue;
row = db.Contact_co.GetByPrimaryKey( key );
this.IDs.Text = row.IDs.Value;
this.CompanyID.Text = row.CompanyID.Value;
this.LocationID.Text = row.LocationID.Value;
this.UserID.Text = row.UserID.Value;
this.SalutationID.Text = row.SalutationID.Value;
this.FirstName.Text = row.FirstName.Value;
this.MiddleName.Text = row.MiddleName.Value;
this.Surname.Text = row.Surname.Value;
this.JobTitle.Text = row.JobTitle.Value;
this.ContactTypeID1.Text = row.ContactTypeID1.Value;
this.ContactDetail1.Text = row.ContactDetail1.Value;
this.ContactTypeID2.Text = row.ContactTypeID2.Value;
this.ContactDetail2.Text = row.ContactDetail2.Value;
this.ContactTypeID3.Text = row.ContactTypeID3.Value;
this.ContactDetail3.Text = row.ContactDetail3.Value;
this.ContactTypeID4.Text = row.ContactTypeID4.Value;
this.ContactDetail4.Text = row.ContactDetail4.Value;
this.Comment.Text = row.Comment.Value;
this.PPS.Text = row.PPS.Value;
this.DOB.Text = row.DOB.Value;
this.Nationality.Text = row.Nationality.Value;
this.ManualChange.Text = row.ManualChange.Value;
this.CreatedBy.Text = row.CreatedBy.Value;
this.CreatedOn.Text = row.CreatedOn.Value;
this.ModifiedBy.Text = row.ModifiedBy.Value;
this.ModifiedOn.Text = row.ModifiedOn.Value;
} // using
} // try
catch (Exception ex)
{
SetErrorMessage(ex.Message);
} // try/catch
} // BindForm
Только не спрашивай какой из контролов какого типа...
