示例#1
0
        // ----------------------- ApplyPromptErrorMessage ---------------------
        private void ApplyPromptErrorMessage( )
        {
            // make the error row visible depending on if an error message to display.
            AcHtmlTableRow row = FindTableRowControl("ErrorRow1");

            if (row != null)
            {
                if (PromptErrorMessage == "")
                {
                    row.Visible = false;
                }
                else
                {
                    row.Visible = true;
                }
            }

            // apply the error text to the error text cell.
            AcHtmlTableCell cell = FindTableCellControl("ErrorText1");

            if (cell != null)
            {
                cell.InnerHtml = PromptErrorMessage;

                // clear the error message after writing it to the prompt.
                SetPromptErrorMessage(null);
            }
        }
示例#2
0
        // ----------------------- ApplyPromptTitle ---------------------
        private void ApplyPromptTitle( )
        {
            // make the title row visible depending on if a PromptTitle is spcfd.
            AcHtmlTableRow row = FindTableRowControl("PromptTitleRow");

            if (row != null)
            {
                if (PromptTitle == "")
                {
                    row.Visible = false;
                }
                else
                {
                    row.Visible = true;
                }
            }

            // apply the error text to the error text cell.
            AcHtmlTableCell cell = FindTableCellControl("PromptTitleCell");

            if (cell != null)
            {
                cell.InnerHtml = PromptTitle;
            }
        }
示例#3
0
        // ----------------------- ApplyNewAccountText ---------------------
        private void ApplyNewAccountText( )
        {
            // make the title row visible depending on if a PromptTitle is spcfd.
            AcHtmlTableCell cell = FindTableCellControl("NewAccountTitle");

            if (cell != null)
            {
                cell.InnerHtml = PromptNewAccountLinkTitle;
            }

            // apply the error text to the error text cell.
            AcAspLinkButton link = FindLinkButtonControl("Link2");

            if (link != null)
            {
                link.Text = PromptNewAccountLinkText;
            }
        }
示例#4
0
        // --------------------------- CreateChildControls -------------------------
        // called after OnInit, but before LoadPostData.
        // After this method returns, asp.net will apply the posted values of the controls
        // from viewstate. ( so only if not postback do control value have to be set )
        protected override void CreateChildControls( )
        {
            // main table to hold two sub area tables. ( want the sub area tables to align
            // one under the other. )
            AcHtmlTable     alignTable = AddNewTableControl( );
            AcHtmlTableCell slot1      = alignTable.AddNewRow( )
                                         .AddNewCell( );
            AcHtmlTable subTable1 = slot1.AddNewTable( )
                                    .SetWidth("100%")
                                    .SetClass(LoginCssClass);

            AcHtmlTableCell slot2 = alignTable.AddNewRow( )
                                    .AddNewCell( );
            AcHtmlTable subTable2 = slot2.AddNewTable( )
                                    .SetWidth("100%")
                                    .SetClass(NewAccountCssClass);

            // create the HtmlTable control which will hold all the login controls.
            if (LoginCssClass == "")
            {
                subTable1.AddStyle("border", "1px black solid");
            }
            CreateTable1ChildControls(subTable1);

            // prompt to create a new account in the second table ( below the first ).
            if (NewAccountCssClass == "")
            {
                subTable2.AddStyle("border", "1px black solid");
            }
            CreateTable2ChildControls(subTable2);

            // apply the prompt error message text to the error message controls.
            ApplyPromptErrorMessage( );
            ApplyPromptTitle( );
            ApplyNewAccountText( );
        }