Exemplo n.º 1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (!Configuration.HelpDeskEnabled)
            {
                throw new Mediachase.Ibn.LicenseRestrictionException();
            }

            if (IncidentId < 0)
            {
                Response.Redirect("../Common/NotExistingID.aspx?IncidentID=1");
            }

            string path = PortalConfig.IssueShortInfoControlDefaultValue;

            if (File.Exists(Server.MapPath(PortalConfig.IssueShortInfoControl)))
            {
                path = PortalConfig.IssueShortInfoControl;
            }
            System.Web.UI.Control control = LoadControl(path);
            InfoPlaceHolder.Controls.Add(control);

            if (SharedID > 0)
            {
                apShared.Visible   = true;
                lblEntryOwner.Text = Util.CommonHelper.GetUserStatus(SharedID);
            }
            else
            {
                apShared.Visible = false;
            }

            BindToolbar();
            BindTabs();
            if (!IsPostBack)
            {
                ViewState["CurrentTab"] = pc["IncidentView_CurrentTab"];
                try
                {
                    Incident.AddHistory(IncidentId, Incident.GetTitle(IncidentId));
                }
                catch
                {
                    Response.Redirect("../Common/NotExistingID.aspx?IncidentId=1");
                }
            }

            if (!Security.CurrentUser.IsExternal)
            {
                CommandManager cm = CommandManager.GetCurrent(this.Page);
                cm.AddCommand("Incident", "", "IncidentView", "MC_HDM_RelatedIssAdd");
                cm.AddCommand("Incident", "", "IncidentView", "MC_HDM_Redirect");
            }
        }