Пример #1
0
    /***************************************** Common Functions *******************************/
    public void ManageDataApps_SelectedIndexChanged(object sender, EventArgs e)
    {
        Util util = new Util();
        Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
        if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;

        ClearMessages();

         State["ManageDataType"] = null;
        string app_name = Request.Form.Get("ManageDataApps");
        if (!app_name.Contains("->"))
        {
             State["SelectedApp"] = app_name;
            ManageDataApps.SelectedValue = app_name;
            InitDataTrees(app_name);
            ViewStoryBoard.Style.Value = "";
            ManageDataType.Style.Value = "";
            ManageDataTypeLabel.Style.Value = "";
        }
        else
        {
            ManageDataType.Style.Value = "display:none";
            ManageDataTypeLabel.Style.Value = "display:none";
            ViewStoryBoard.Style.Value = "display:none";
            util.ResetAppStateVariables(State);
            ContentMultiPage.SelectedIndex = 0;
            ShouldRefreshStoryBoard.Text = "close";
            Init init = new Init();
            init.InitManageDataAppsList(State);
            DataMultiPage.SelectedIndex = 3;
        }
    }
    protected void UpdateAppLists()
    {
        try
        {
            Init init = new Init();
            Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
            init.InitAppsList(State, CurrentApp);

            RadComboBox ProvisionApps = (RadComboBox) State["ProvisionApps"];
            init.InitAppsList(State, ProvisionApps);

            init.InitManageDataAppsList(State);
            SetAllAppNames();
        }
        catch (Exception ex)
        {
            Util util = new Util();
            Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
            util.LogError(State, ex);
            Message.Text = "Internal Error: " + ex.Message + ": " + ex.StackTrace;
        }
    }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Util util = new Util();
        Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
        if (util.CheckSessionTimeout(State,Response,"Default.aspx")) return;
         try
        {
            if (!IsPostBack)
            {
                CopyRight.InnerText = HttpRuntime.Cache["CopyRight"].ToString();
                UserLabel.Text = State["Username"].ToString();
            }

            if ( HttpRuntime.Cache["TechSupportEmail"] != null)
            {
                util.AddEmailToButton(SupportButton,  HttpRuntime.Cache["TechSupportEmail"].ToString(), "Email To Tech Support");
            }

            util.UpdateSessionLog(State, "post", "ManageData");

            State["DatabaseEvents"] = DatabaseEvents;
            State["SpreadSheetEvents"] = SpreadSheetEvents;
            State["WebServiceEvents"] = WebServiceEvents;
            State["ManageDataApps"] = ManageDataApps;
            ManageDataType.Attributes.Add("onclick", "checkChangingManageDataType(this);");
            string attr = "javascript: NamedPopUp('Dialogs/Design/StoryBoard.aspx', 'StoryBoardPopup','height=900, width=460, left=0, top=400, menubar=no, status=no, location=no, toolbar=no, scrollbars=yes, resizable=yes');return false;";
            ViewStoryBoard.Attributes.Add("onclick", attr);

            ClearMessages();

            if (DataMultiPage.SelectedIndex == 2)
                return;

            WebServiceEventMappingStatus.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
                "Dialogs/ManageData/EventMappingStatus.aspx", 500, 500, false, false, false, true));

            Init init = new Init();
            if (State["ResetManageDataApps"] != null)
            {
                State["SelectedApp"] = null;
                init.InitManageDataAppsList(State);
                State["ResetManageDataApps"] = null;
            }

            if (ManageDataApps.Items.Count == 0 || ManageDataApps.SelectedValue.Contains("->"))
            {
                init.InitManageDataAppsList(State);
                ManageDataType.Style.Value = "display:none";
                ManageDataTypeLabel.Style.Value = "display:none";
                ViewStoryBoard.Style.Value = "display:none";
                ShouldRefreshStoryBoard.Text = "close";
                ManageTypeMultiPage.SelectedIndex = Constants.BLANK_PAGE;
                State["ManageDataType"] = null;
            }

            if (ManageDataApps.SelectedIndex > 0)
            {
                ViewStoryBoard.Style.Value = "";
                ManageDataType.Style.Value = "";
                ManageDataTypeLabel.Style.Value = "";

                string target = Request.Form.Get("__EVENTTARGET");
                if (target != "SaveDataRequestMap" &&
                    target != "SaveDataResponseMap" &&
                    target != "WebServiceResponseTreeView")
                    PrepareAppDisplay(target);
                if (target == "ViewConnectionString")
                {
                    DatabaseCommandsView.Nodes.Clear();
                    DatabaseEvents.SelectedIndex = 0;
                    SpreadsheetCommandsView.Nodes.Clear();
                    SpreadSheetEvents.SelectedIndex = 0;
                }
            }
        }
        catch (Exception ex)
        {
            util.ProcessMainExceptions(State, Response, ex);
        }
    }