Example #1
0
        /// <summary>
        /// Self Approval CheckBox - Check this box to allow users who are both
        /// approvers and submitters to approve their own expense
        /// </summary>


        /// <summary>
        /// ExpenseWebAdministration Group Panel - Container for all of the administrative
        /// UI controls on the page
        /// </summary>


        /// <summary>
        /// Maximum Number of Transactions
        /// The max number of transactions that can occur in the demo
        /// before the tranasction are deleted and the demo is restarted
        /// </summary>


        /// <summary>
        /// OK Button - Submits the changes made on the form and
        /// redirects to the main page
        /// </summary>


        /// <summary>
        /// Cancel Button - Cancels any changes made on the form and
        /// redirects to the main page
        /// </summary>


        /// <summary>
        /// Logo Hyperlink - A picture of the company logo which links
        /// back to the main page
        /// </summary>


        /// <summary>
        /// Administration Label - Title of the page, Administration
        /// </summary>


        /// <summary>
        /// Message Label - Displays any messages to the user
        /// </summary>


        /// <summary>
        /// Maximum Number of Transactions Label - Identifies the
        /// max trans textbox
        /// </summary>
        #endregion

        /// <summary>
        /// Page Load - This is executed when the page is first requested
        /// by the user and additionally when the user clicks a button on
        /// the form
        /// </summary>
        protected void Page_Load(object sender, System.EventArgs e)
        {
            //
            //	To prevent users from by-passing the portal page (index.aspx)
            //	and going directly to this page, use URL Authorization
            //	See <url> for details.
            //

            //
            //	Check for this is the first time the page is being loaded
            //	only fill in the form if this is the first time otherwise
            //	any user changes will be lost
            //
            if (!Page.IsPostBack)
            {
                //
                //	Lock the application to ensure settings integrity
                //
                Application.Lock();

                //
                //	Show the admin UI controls
                //
                AdminGroup.Visible = true;

                //
                //	Load application settings
                //

                //
                //	Load the Self Approval setting
                //
                self_approval.Checked = ExpenseCommon.GetSelfApproval();

                //
                //	Load the Maximum Number of Transactions setting
                //
                max_trans.Text = ExpenseCommon.GetMaxTransaction().ToString();
            }
        }