protected void Page_Load(object sender, EventArgs e)
    {
        // ----------------------------- //
        // -- Permission - References -- //
        // ----------------------------- //
        AdminBusinessFunctionPermissionClassBLL _businessFunctionPermission = new AdminBusinessFunctionPermissionClassBLL();

        // Check Permission
        if (Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 10010)) == false)
        {
            // No permissions - redirect to Sign In page
            Response.Redirect("SignIn.aspx?Page=" + Page.Request.Url.Segments[Page.Request.Url.Segments.Length - 1]);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        // ----------------------------- //
        // -- Permission - References -- //
        // ----------------------------- //
        AdminBusinessFunctionPermissionClassBLL _businessFunctionPermission = new AdminBusinessFunctionPermissionClassBLL();

        // Check Permission
        if (Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 8000)) == false)
        {
            // No permissions - redirect to Sign In page
            Response.Redirect("SignIn.aspx?Page=" + Page.Request.Url.Segments[Page.Request.Url.Segments.Length - 1]);
        }

        // Set Permission
        //hiddenFieldAllowAdd.Value = Convert.ToString(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 8000));
        //gridViewUserList.AutoGenerateEditButton = Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 8010));
        //gridViewUserList.AutoGenerateDeleteButton = Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 8020));
        gridViewUserList.AutoGenerateDeleteButton = false;
        gridViewUserList.AutoGenerateEditButton = false;
        gridViewUserList.AutoGenerateSelectButton = false;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        // ----------------------------- //
        // -- Permission - References -- //
        // ----------------------------- //
        AdminBusinessFunctionPermissionClassBLL _businessFunctionPermission = new AdminBusinessFunctionPermissionClassBLL();

        // Check Permission
        if (Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 8880)) == false)
        {
            // No permissions - redirect to Sign In page
            Response.Redirect("SignIn.aspx?Page=" + Page.Request.Url.Segments[Page.Request.Url.Segments.Length - 1]);
        }

        if (!IsPostBack)
        {
            // ----------------------- //
            // -- Smart Search Line -- //
            // ----------------------- //
            // Enable SearchField Dropdown 1
            dropDownListSmartSearchLine1.Enabled = true;

            // Disable SearchField Dropdown 2
            dropDownListSmartSearchLine2.Enabled = false;

            // Disable SearchField Dropdown 3
            dropDownListSmartSearchLine3.Enabled = false;

            // Disable SearchField Dropdown 4
            dropDownListSmartSearchLine4.Enabled = false;

            // Disable SearchField Dropdown 5
            dropDownListSmartSearchLine5.Enabled = false;

            // Disable SearchField Dropdown 6
            dropDownListSmartSearchLine6.Enabled = false;

            // ------------------------ //
            // -- Smart Search value -- //
            // ------------------------ //
            // Disable SearchValue Fields 1
            textBoxSearchValue1.Enabled = false;
            dropDownListSearchValue1.Visible = false;

            // Disable Searchvalue Fields 2
            textBoxSearchValue2.Enabled = false;
            dropDownListSearchValue2.Visible = false;

            // Disable Searchvalue Fields 3
            textBoxSearchValue3.Enabled = false;
            dropDownListSearchValue3.Visible = false;

            // Disable Searchvalue Fields 4
            textBoxSearchValue4.Enabled = false;
            dropDownListSearchValue4.Visible = false;

            // Disable Searchvalue Fields 5
            textBoxSearchValue5.Enabled = false;
            dropDownListSearchValue5.Visible = false;

            // Disable Searchvalue Fields 6
            textBoxSearchValue6.Enabled = false;
            dropDownListSearchValue6.Visible = false;

            // ----------------- //
            // -- Comparisons -- //
            // ----------------- //
            // Disable all Comparisons - Line 1
            radioSearchComparison1_1.Disabled = true;
            radioSearchComparison1_2.Disabled = true;
            radioSearchComparison1_3.Disabled = true;
            radioSearchComparison1_4.Disabled = true;
            radioSearchComparison1_5.Disabled = true;
            radioSearchComparison1_6.Disabled = true;
            radioSearchComparison1_7.Disabled = true;

            // Disable all Comparisons - Line 2
            radioSearchComparison2_1.Disabled = true;
            radioSearchComparison2_2.Disabled = true;
            radioSearchComparison2_3.Disabled = true;
            radioSearchComparison2_4.Disabled = true;
            radioSearchComparison2_5.Disabled = true;
            radioSearchComparison2_6.Disabled = true;
            radioSearchComparison2_7.Disabled = true;

            // Disable all Comparisons - Line 3
            radioSearchComparison3_1.Disabled = true;
            radioSearchComparison3_2.Disabled = true;
            radioSearchComparison3_3.Disabled = true;
            radioSearchComparison3_4.Disabled = true;
            radioSearchComparison3_5.Disabled = true;
            radioSearchComparison3_6.Disabled = true;
            radioSearchComparison3_7.Disabled = true;

            // Disable all Comparisons - Line 4
            radioSearchComparison4_1.Disabled = true;
            radioSearchComparison4_2.Disabled = true;
            radioSearchComparison4_3.Disabled = true;
            radioSearchComparison4_4.Disabled = true;
            radioSearchComparison4_5.Disabled = true;
            radioSearchComparison4_6.Disabled = true;
            radioSearchComparison4_7.Disabled = true;

            // Disable all Comparisons - Line 5
            radioSearchComparison5_1.Disabled = true;
            radioSearchComparison5_2.Disabled = true;
            radioSearchComparison5_3.Disabled = true;
            radioSearchComparison5_4.Disabled = true;
            radioSearchComparison5_5.Disabled = true;
            radioSearchComparison5_6.Disabled = true;
            radioSearchComparison5_7.Disabled = true;

            // Disable all Comparisons - Line 6
            radioSearchComparison6_1.Disabled = true;
            radioSearchComparison6_2.Disabled = true;
            radioSearchComparison6_3.Disabled = true;
            radioSearchComparison6_4.Disabled = true;
            radioSearchComparison6_5.Disabled = true;
            radioSearchComparison6_6.Disabled = true;
            radioSearchComparison6_7.Disabled = true;

            // --------------- //
            // -- Operators -- //
            // --------------- //
            // Disable all Operators - Line 1
            radioButtonOperator1_1.Enabled = false;
            radioButtonOperator1_2.Enabled = false;

            // Disable all Operators - Line 2
            radioButtonOperator2_1.Enabled = false;
            radioButtonOperator2_2.Enabled = false;

            // Disable all Operators - Line 3
            radioButtonOperator3_1.Enabled = false;
            radioButtonOperator3_2.Enabled = false;

            // Disable all Operators - Line 4
            radioButtonOperator4_1.Enabled = false;
            radioButtonOperator4_2.Enabled = false;

            // Disable all Operators - Line 5
            radioButtonOperator5_1.Enabled = false;
            radioButtonOperator5_2.Enabled = false;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        // ----------------------------- //
        // -- Permission - References -- //
        // ----------------------------- //
        AdminBusinessFunctionPermissionClassBLL _businessFunctionPermission = new AdminBusinessFunctionPermissionClassBLL();

        // Set Permission
        hiddenFieldAllowAdd.Value = Convert.ToString(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6100));
        hiddenFieldAllowEdit.Value = Convert.ToString(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6110));
        hiddenFieldAllowDelete.Value = Convert.ToString(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6120));

        // --------------------------------- //
        // -- Format Gridview Permissions -- //
        // --------------------------------- //
        gridViewPartsMaintenanceTabBillOfMaterial.AutoGenerateEditButton = Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6110));
        gridViewPartsMaintenanceTabBillOfMaterial.AutoGenerateDeleteButton = Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6120));

        // ------------------------------- //
        // -- Determine Control Columns -- //
        // ------------------------------- //
        if (Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6100)))
        {
            // Edit Permissions - Accomodate for Edit/Delete Column
            columnCorrection = 1;
        }

        // ------------------ //
        // -- Query String -- //
        // ------------------ //
        // Check Querystring Value
        if (Request.QueryString["PartID"] != null)
        {
            // Store PartID from Query String as AssemblyID
            hiddenFieldAssemblyID.Value = Convert.ToString(Request.QueryString["PartID"]);
        }
        else
        {
            // Store Zero when no record
            hiddenFieldAssemblyID.Value = "0";
        }

        // -------------------- //
        // -- OnClick Events -- //
        // -------------------- //
        //[Span]  gridViewPartsMaintenanceTabBillOfMaterial.FindControl("spanExport").Attributes.Add("OnClick", "fnExportData();");
        //gridViewPartsMaintenanceTabBillOfMaterial_spanExport
    }
Exemple #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // ----------------------------- //
        // -- Permission - References -- //
        // ----------------------------- //
        AdminBusinessFunctionPermissionClassBLL _businessFunctionPermission = new AdminBusinessFunctionPermissionClassBLL();

        // Check Permission
        if (Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6060)) == false)
        {
            // No permissions - redirect to Sign In page
            Response.Redirect("SignIn.aspx?Page=" + Page.Request.Url.Segments[Page.Request.Url.Segments.Length - 1]);
        }

        // Set Permission
        try
        {
            // User - Check Permission
            if (Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6000)))
            {
                // Enable Add Parts
                tdPartsMaintenanceAdd.Attributes.Add("class", "styleResearchMenuBlue");
                tdPartsMaintenanceAdd.Attributes.Add("onclick", "javascript:fnPartsMaintenanceAdd();");
                tdPartsMaintenanceAdd.Attributes.Add("title", "Click to Add a new Part");
            }
            else
            {
                // No Permission - Disable Add Parts
                tdPartsMaintenanceAdd.Attributes.Add("class", "styleResearchMenuBlueDisabled");
                tdPartsMaintenanceAdd.Attributes.Add("onclick", null);
                tdPartsMaintenanceAdd.Attributes.Add("title", "");
            }
        }
        catch
        {
            // Guest - Disable Add Parts
            tdPartsMaintenanceAdd.Attributes.Add("class", "styleResearchMenuBlueDisabled");
            tdPartsMaintenanceAdd.Attributes.Add("onclick", null);
            tdPartsMaintenanceAdd.Attributes.Add("title", "");
        }

        // --------------- //
        // -- Re-Search -- //
        // --------------- //
        // Lookup
        if ((Session["SearchValue"] ?? "").ToString() != "")
        {
            // Restore Hidden Value
            hiddenFieldFilterLookupValueOld.Value = Convert.ToString((Session["SearchValue"] ?? "").ToString());
            // Enable ReSearch - Lookup
            tdPartsMaintenanceReSearch.Attributes.Add("class", "styleResearchMenuBlue");
            tdPartsMaintenanceReSearch.Attributes.Add("onclick", "javascript:fnLookupPartsMaintenanceReSearch();");
            tdPartsMaintenanceReSearch.Attributes.Add("title", "Click to redo last search: '" + Convert.ToString((Session["SearchValue"] ?? "").ToString()) + "'");
            // Enable ReSearch - Where Used
            tdPartsMaintenanceWhereUsedReSearch.Attributes.Add("class", "styleResearchMenuBlue");
            tdPartsMaintenanceWhereUsedReSearch.Attributes.Add("onclick", "javascript:fnLookupPartsMaintenanceWhereUsedReSearch();");
            tdPartsMaintenanceWhereUsedReSearch.Attributes.Add("title", "Click to redo last search: '" + Convert.ToString((Session["SearchValue"] ?? "").ToString()) + "'");
            // Enable ReSearch - Drawings
            tdPartsMaintenanceDrawingsReSearch.Attributes.Add("class", "styleResearchMenuBlue");
            tdPartsMaintenanceDrawingsReSearch.Attributes.Add("onclick", "javascript:fnLookupPartsMaintenanceDrawingsReSearch();");
            tdPartsMaintenanceDrawingsReSearch.Attributes.Add("title", "Click to redo last search: '" + Convert.ToString((Session["SearchValue"] ?? "").ToString()) + "'");
            // Enable ReSearch - TreeView
            tdPartsMaintenanceTreeViewReSearch.Attributes.Add("class", "styleResearchMenuBlue");
            tdPartsMaintenanceTreeViewReSearch.Attributes.Add("onclick", "javascript:fnLookupPartsMaintenanceTreeViewReSearch();");
            tdPartsMaintenanceTreeViewReSearch.Attributes.Add("title", "Click to redo last search: '" + Convert.ToString((Session["SearchValue"] ?? "").ToString()) + "'");
        }
        else
        {
            // Disable ReSearch - Lookup
            tdPartsMaintenanceReSearch.Attributes.Add("class", "styleResearchMenuBlueDisabled");
            tdPartsMaintenanceReSearch.Attributes.Add("onclick", null);
            tdPartsMaintenanceReSearch.Attributes.Add("title", "");
            // Disable ReSearch - Where Used
            tdPartsMaintenanceWhereUsedReSearch.Attributes.Add("class", "styleResearchMenuBlueDisabled");
            tdPartsMaintenanceWhereUsedReSearch.Attributes.Add("onclick", null);
            tdPartsMaintenanceWhereUsedReSearch.Attributes.Add("title", "");
            // Disable ReSearch - Drawings
            tdPartsMaintenanceDrawingsReSearch.Attributes.Add("class", "styleResearchMenuBlueDisabled");
            tdPartsMaintenanceDrawingsReSearch.Attributes.Add("onclick", null);
            tdPartsMaintenanceDrawingsReSearch.Attributes.Add("title", "");
            // Disable ReSearch - TreeView
            tdPartsMaintenanceTreeViewReSearch.Attributes.Add("class", "styleResearchMenuBlueDisabled");
            tdPartsMaintenanceTreeViewReSearch.Attributes.Add("onclick", null);
            tdPartsMaintenanceTreeViewReSearch.Attributes.Add("title", "");
        }
        // Add OnEnter Function
        textBoxPartsMaintenance.Attributes.Add("onkeypress", "if(event.keyCode==13){javascript:fnLookupPartsMaintenance(); return false;};");
        textBoxPartsMaintenanceDrawings.Attributes.Add("onkeypress", "if(event.keyCode==13){javascript:fnLookupPartsMaintenanceDrawings(); return false;};");
        textBoxPartsMaintenanceWhereUsed.Attributes.Add("onkeypress", "if(event.keyCode==13){javascript:fnLookupPartsMaintenanceWhereUsed(); return false;};");
        textBoxPartsMaintenanceTreeView.Attributes.Add("onkeypress", "if(event.keyCode==13){javascript:fnLookupPartsMaintenanceTreeView(); return false;};");

        // Set Focus
        textBoxPartsMaintenance.Focus();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        // --------------------------- //
        // - Permission - References - //
        // --------------------------- //
        AdminBusinessFunctionPermissionClassBLL _businessFunctionPermission = new AdminBusinessFunctionPermissionClassBLL();

        // Check Edit Permissions
        if (Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 7110)) == false)
        {
            // No permissions - redirect to Sign In page
            Response.Redirect("SignIn.aspx?Page=SecureAdminIssueMaintenance.aspx");
        }

        // Check Permission - Edit
        hiddenFieldAllowAdd.Value = Convert.ToString(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 7100));
        gridViewIssueMaintenance.AutoGenerateEditButton = Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 7110));
        gridViewIssueMaintenance.AutoGenerateDeleteButton = Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 7120));
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        // ----------------------------- //
        // -- Permission - References -- //
        // ----------------------------- //
        AdminBusinessFunctionPermissionClassBLL _businessFunctionPermission = new AdminBusinessFunctionPermissionClassBLL();

        // Check Permission
        if (Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6050)) == false)
        {
            // No permissions - redirect to Sign In page
            Response.Redirect("SignIn.aspx?Page=" + Page.Request.Url.Segments[Page.Request.Url.Segments.Length - 1]);
        }

        // Add OnClick Events
        tdTreeViewCollapseAll.Attributes.Add("onclick", "fnTreeViewCollapseAll();");
        tdTreeViewExpandAll.Attributes.Add("onclick", "fnTreeViewExpandAll();");

        // ----------------------------- //
        // -- Check QueryString Value -- //
        // ----------------------------- //
        if (Request.QueryString["searchValue"] != "" && Request.QueryString["searchValue"] != null)
        {
            // Clear SmartSearch Filter
            Session["SmartFilter"] = "";

            // Remember Value for Re-Search
            Session["SearchValue"] = Convert.ToString(Request.QueryString["searchValue"]);

            // Store Query String
            hiddenFieldSearchType.Value = Convert.ToString(Request.QueryString["searchType"]);
            hiddenFieldSearchValue.Value = Convert.ToString(Request.QueryString["searchValue"]);
            hiddenFieldSearchValueRaw.Value = Convert.ToString(Request.QueryString["searchValue"]);
        }
        else
        {
            // No Active Filter - Display Text
            //labelFilter.Text = "Filter: No active filter";

            // Clear SmartSearch Filter
            Session["SmartFilter"] = "";

            // Store Query String
            hiddenFieldSearchValue.Value = "";
        }

        // -- ----------- -- //
        // -- Expand Flag -- //
        // -- ----------- -- //
        if (Request.QueryString["Expand"] != "" && Request.QueryString["Expand"] != null)
        {
            // Set Expand to True
            hiddenFieldExpand.Value = "true";
        }

        // -- --------------------------------------- -- //
        // -- Only Load Data in to TreeView Initially -- //
        // -- --------------------------------------- -- //
        if (!IsPostBack)
        {
            try
            {
                // Display TreeView
                objectDataSourceLookupTreeView.Select();
            }
            catch
            {
                // Problem Displaying TreeView - Add a filter
                labelMessage.Text = "Problem Displaying TreeView. Try adding a filter.";
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        // ----------------------------- //
        // -- Permission - References -- //
        // ----------------------------- //
        AdminBusinessFunctionPermissionClassBLL _businessFunctionPermission = new AdminBusinessFunctionPermissionClassBLL();

        // Check Permission
        if (Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6040)) == false)
        {
            // No permissions - redirect to Sign In page
            //Response.Redirect("SignIn.aspx?Page=" + Page.Request.Url.Segments[Page.Request.Url.Segments.Length - 1]);
            //Response.Redirect("SignIn.aspx?Page=" + Page.Request.Url.Segments[2] + Page.Request.Url.Query);
            Response.Redirect("SignIn.aspx?Page=" + Page.Request.Url.Segments[Page.Request.Url.Segments.Length - 1] + Page.Request.Url.Query);
        }

        // Set Permission
        try
        {
            // Format Insert/Update Buttons
            buttonInsert.Enabled = false;
            buttonUpdate.Enabled = Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6010));
            buttonDelete.Enabled = Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6020));

            // Format Insert/Update Buttons
            tdInsert.Attributes.Add("class", "styleStatusBarMenuBlueDisabled");
            if (Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6010))) { tdUpdate.Attributes.Add("class", "styleStatusBarMenuBlue"); } else { tdUpdate.Attributes.Add("class", "styleStatusBarMenuBlueDisabled"); }
            if (Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6020))) { tdDelete.Attributes.Add("class", "styleStatusBarMenuBlue"); } else { tdDelete.Attributes.Add("class", "styleStatusBarMenuBlueDisabled"); }
            if (Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6050))) { tdTreeView.Attributes.Add("class", "styleStatusBarMenuBlue"); } else { tdTreeView.Attributes.Add("class", "styleStatusBarMenuBlueDisabled"); }
        }
        catch
        {
            // Format Insert/Update Buttons
            buttonInsert.Enabled = false;
            buttonUpdate.Enabled = false;
            buttonDelete.Enabled = false;

            // Format Insert/Update Buttons
            tdInsert.Attributes.Add("class", "styleStatusBarMenuBlueDisabled");
            tdUpdate.Attributes.Add("class", "styleStatusBarMenuBlueDisabled");
            tdDelete.Attributes.Add("class", "styleStatusBarMenuBlueDisabled");
            tdTreeView.Attributes.Add("class", "styleStatusBarMenuBlueDisabled");
        }

        // ---------------- //
        // - Query String - //
        // ---------------- //
        // Check Querystring Value
        if (Request.QueryString["PartID"] != null && Request.QueryString["PartID"] != "")
        {
            // Check for New Part
            if (Request.QueryString["PartID"] == "New")
            {
                // New Part - Set PartID = 0
                hiddenFieldPartID.Value = "0";

                // Format Insert/Update Buttons
                buttonInsert.Enabled = Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6000));
                buttonUpdate.Enabled = false;
                buttonDelete.Enabled = false;

                // Format Insert/Update Buttons
                if (Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6000))) { tdInsert.Attributes.Add("class", "styleStatusBarMenuBlue"); } else { tdInsert.Attributes.Add("class", "styleStatusBarMenuBlueDisabled"); }
                tdUpdate.Attributes.Add("class", "styleStatusBarMenuBlueDisabled");
                tdDelete.Attributes.Add("class", "styleStatusBarMenuBlueDisabled");
            }
            else
            {
                // Existing Part - Transfer PartID
                hiddenFieldPartID.Value = Convert.ToString(Request.QueryString["PartID"]);

                // Format Insert/Update Buttons
                buttonInsert.Enabled = false;
                buttonUpdate.Enabled = Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6010));
                buttonDelete.Enabled = Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6020));

                // Format Insert/Update Buttons
                tdInsert.Attributes.Add("class", "styleStatusBarMenuBlueDisabled");
                if (Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6010))) { tdUpdate.Attributes.Add("class", "styleStatusBarMenuBlue"); } else { tdUpdate.Attributes.Add("class", "styleStatusBarMenuBlueDisabled"); }
                if (Convert.ToBoolean(_businessFunctionPermission.GetAdminBusinessFunctionPermission((Session["UserName"] ?? "").ToString(), 6020))) { tdDelete.Attributes.Add("class", "styleStatusBarMenuBlue"); } else { tdDelete.Attributes.Add("class", "styleStatusBarMenuBlueDisabled"); }
            }
            // Store Query String Information
            hiddenFieldLookupFilter.Value = Convert.ToString(Request.QueryString["SearchValue"]);
            hiddenFieldPartsMaintenanceFilter.Value = Convert.ToString(Request.QueryString["PartsMaintenanceFilter"]);

            // Format BreadCrumbs
            switch (Request.QueryString["Type"])
            {
                case "TreeView":
                    // Show TreeView Breadcrumb Option
                    aCookie.Visible = false;
                    aCookieTreeView.Visible = true;

                    // Format Return URL
                    if (hiddenFieldLookupFilter.Value != "")
                    {
                        // Set Return URL
                        hiddenFieldReturnURL.Value = "LookupTreeView.aspx?Type=TreeView&searchValue=" + Convert.ToString(hiddenFieldLookupFilter.Value) + "&SearchType=1";
                        aCookieTreeView.HRef = "LookupTreeView.aspx?Type=TreeView&searchValue=" + Convert.ToString(hiddenFieldLookupFilter.Value) + "&SearchType=1";
                    }
                    else
                    {
                        // Set Return URL
                        hiddenFieldReturnURL.Value = "LookupTreeView.aspx";
                        aCookieTreeView.HRef = "LookupTreeView.aspx";
                    }
                    break;
                default:
                    // Show Lookup Breadcrumb Option
                    aCookie.Visible = true;
                    aCookieTreeView.Visible = false;

                    // Format Return URL
                    if (hiddenFieldLookupFilter.Value != "")
                    {
                        // Set Return URL
                        hiddenFieldReturnURL.Value = "LookupPartsMaintenance.aspx?SearchValue=" + Convert.ToString(hiddenFieldLookupFilter.Value) + "&SearchType=1";
                        aCookie.HRef = "LookupPartsMaintenance.aspx?SearchValue=" + Convert.ToString(hiddenFieldLookupFilter.Value) + "&SearchType=1";
                    }
                    else
                    {
                        // Set Return URL
                        hiddenFieldReturnURL.Value = "LookupPartsMaintenance.aspx";
                        aCookieTreeView.HRef = "LookupPartsMaintenance.aspx";
                    }
                    break;
            }

            // Format Tabs
            iFrameTabBillOfMaterial.Attributes["src"] = "PartsMaintenanceTabBillOfMaterial.aspx?PartID=" + Convert.ToString(hiddenFieldPartID.Value);
            iFrameTabRevisions.Attributes["src"] = "PartsMaintenanceTabRevisions.aspx?PartID=" + Convert.ToString(hiddenFieldPartID.Value);
            iFrameTabAssociatedFiles.Attributes["src"] = "PartsMaintenanceTabAssociatedFiles.aspx?PartID=" + Convert.ToString(hiddenFieldPartID.Value);
            iFrameTabWhereUsed.Attributes["src"] = "PartsMaintenanceTabWhereUsed.aspx?PartID=" + Convert.ToString(hiddenFieldPartID.Value);
            iFrameTabAuditTrail.Attributes["src"] = "PartsMaintenanceTabAudit.aspx?PartID=" + Convert.ToString(hiddenFieldPartID.Value);
        }
        else
        {
            // No Querystring Value - Return to Lookup
            Response.Redirect("LookupPartsMaintenance.aspx");
        }
    }