示例#1
0
 protected void ddlPageTypes_SelectedIndexChanged( object sender, EventArgs e )
 {
     clearForm( this.Controls );
     int pageTypeId = int.Parse( ddlPageTypes.SelectedValue );
     if ( pageTypeId > 0 )
     {
         BHLProvider bp = new BHLProvider();
         PageType pageType = bp.PageTypeSelectAuto( pageTypeId );
         if ( pageType != null )
         {
             idLabel.Text = pageType.PageTypeID.ToString();
             nameTextBox.Text = pageType.PageTypeName;
             descriptionTextBox.Text = TypeHelper.EmptyIfNull( pageType.PageTypeDescription );
             ddlPageTypes.SelectedValue = pageType.PageTypeID.ToString();
         }
     }
 }