protected void OnChange(object sender, EventArgs e)
        {
            Outage outage = (Outage)Session["Outage"];

            if (outage == null)
            {
                return;
            }

            String    platform  = this.platformSelect.Items[platformSelect.SelectedIndex].Text;
            DateTime? start     = (!String.IsNullOrEmpty(this.startTime.Text)) ? DateTime.Parse(this.startTime.Text) : (DateTime?)null;   //DateTime.Now;
            DateTime? end       = (!String.IsNullOrEmpty(this.returnTime.Text)) ? DateTime.Parse(this.returnTime.Text) : (DateTime?)null; // DateTime.Now;
            Locations locations = GetLocationStatus(outage.Locations.EnabledImage, outage.Locations.DisabledImage);
            String    services  = this.servicesImpacted.Text;
            String    summary   = this.problemSummary.Text;

            outage.Platform        = platform;
            outage.Start           = start;
            outage.Return          = end;
            outage.Locations       = locations;
            outage.ServiceImpacted = services;
            outage.ProblemSummary  = summary;

            // Session["Outage"] = outage;
            // OutageObject = outage;

            // fire event
            if (ChangeEvent != null)
            {
                ChangeEvent(outage);
            }
        }
예제 #2
0
        private void OutageChange(Outage outage)
        {
            String outageType = this.Outage_RadioButtonList.SelectedValue;

            Session[outageType] = Session["Outage"] = outage;
            RefreshPreviewContent();
        }
        //public Outage OutageObject;

        internal void Refresh(Outage outage)
        {
            platformSelect.Items[platformSelect.SelectedIndex].Text = outage.Platform;
            startTime.Text  = (outage.Start != null) ? ((DateTime)outage.Start).ToString("yyyy-MM-ddTHH:mm:ss") : String.Empty;
            returnTime.Text = (outage.Return != null) ? ((DateTime)outage.Return).ToString("yyyy-MM-ddTHH:mm:ss") : String.Empty;
            SetLocationStatus(outage);
            servicesImpacted.Text = outage.ServiceImpacted;
            problemSummary.Text   = outage.ProblemSummary;
        }
        private void SetLocationStatus(Outage outage)
        {
            Locations locations = outage.Locations;

            string[] keys = locations.Keys;
            foreach (string key in keys)
            {
                bool isChecked = locations[key];
                locationsCheckbox.Items.FindByText(key).Selected = isChecked;
            }
        }
예제 #5
0
        private void RefreshOutageContent()
        {
            Outage outage = null;
            String value  = this.Outage_RadioButtonList.SelectedValue.ToLower();

            switch (value)
            {
            case "ongoing": outage = (OutageOngoing)Session["Ongoing"]; break;

            case "update": outage = (OutageUpdate)Session["Update"]; break;

            case "recovery": outage = (OutageRecovery)Session["Recovery"]; break;

            default: return;
            }
            this.OutageControl.Refresh(outage);
            Session["Outage"] = outage;
            ///this.OutageFrame.Attributes["src"] = "Outage_.aspx";
        }
예제 #6
0
        private OutageUpdate(String Platform, Outage Ongoing) : base(Platform, "Update")
        {
            this._Outage = Ongoing;

            OutageHeader     = "Information update for outage on";
            OpeningStatement = "Hello, please be aware of the following update information:";
            ReturnTimeHeader = "New Est. <br>Return Time";
            Icon             = "images/smallIconRed.png";
            DSIcon           = "images/kb_update.jpg";
            SummaryHeaderKB  = "Update";

            if (Ongoing != null)
            {
                base.Start           = Ongoing.Start;
                base.Return          = Ongoing.Return;
                base.ServiceImpacted = Ongoing.ServiceImpacted;
                base.ProblemSummary  = Ongoing.ServiceImpacted;
                base.Locations       = Ongoing.Locations;
            }
        }
예제 #7
0
        private OutageRecovery(String Platform, Outage Update) : base(Platform, "Recovery")
        {
            this._Outage = Update;

            OutageHeader       = "Outage recovered on";
            OpeningStatement   = "Hello, please be aware the following incident is now closed:";
            ReturnTimeHeader   = "Recovery<br>Time";
            Icon               = "images/smallIconGreen.png";
            DSIcon             = "images/kb_recovery.jpg";
            OpeningStatementKB = "Please be aware that the following issue with the <b>3D</b>EXPERIENCE platform has been resolved:";
            SummaryHeaderKB    = "Restoring Description";

            if (Update != null)
            {
                base.Start           = Update.Start;
                base.Return          = Update.Return;
                base.ServiceImpacted = Update.ServiceImpacted;
                base.ProblemSummary  = Update.ServiceImpacted;
                base.Locations       = Update.Locations;
            }
        }
예제 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Outage outage = null;

            if (!IsPostBack)
            {
                IsOngoingInit = false;
                outage        = new OutageOngoing("Customers")
                {
                    Start           = DateTime.Now,
                    Return          = DateTime.Now,
                    ProblemSummary  = String.Empty,
                    ServiceImpacted = String.Empty
                };

                Locations location = outage.Locations;
                location["Europe"]    = false;
                location["China"]     = false;
                location["Hong-Kong"] = false;
                location["Singapore"] = false;
                location["Korea"]     = false;
                location["Tokyo"]     = false;
                location["US-West"]   = false;
                location["US-East"]   = false;

                SetTabDefaults();

                Session["Outage"] = Session["Ongoing"] = outage;
                ReplicateOutage(outage);
                //OutageMenuItemsEnabled(false);
                this.OutageControl.Refresh(outage);
                RefreshPreviewContent();


                this.CurrentUserLabel.Text = (System.Web.HttpContext.Current.User.Identity.IsAuthenticated) ?
                                             "Welcome, " + System.Web.HttpContext.Current.User.Identity.Name : Page.User.Identity.Name;
            }
        }
예제 #9
0
        private void RefreshPreviewContent()
        {
            String value     = this.Preview_RadioButtonList.SelectedValue;
            String page      = String.Empty;
            Outage outage    = (Outage)Session["Outage"];
            String ExcelPath = Server.MapPath("~/excel/Blog.xlsx");

            switch (value.ToLower())
            {
            case "email": page            = "Customers.aspx";
                this.EmailControl.Visible = true;
                this.KBControl.Visible    = false;
                this.ExcelControl.Visible = false;
                EmailControl.Refresh(outage);
                break;

            case "kb": page = "Knowledgebase.aspx";
                this.EmailControl.Visible = false;
                this.KBControl.Visible    = true;
                this.ExcelControl.Visible = false;
                KBControl.Refresh(outage);
                break;

            case "excel": page            = "Excel.aspx";
                this.EmailControl.Visible = false;
                this.KBControl.Visible    = false;
                OutageRecovery or          = GetOutages();
                String         newFilePath = new ExcelMarshall(or, ExcelPath, 5).Marshall();
                ExcelControl.Refresh("~/excel/" + newFilePath);
                this.ExcelControl.Visible = true;
                break;

            default: return;
            }
            ///this.PreviewFrame.Attributes["src"] = page;
        }
예제 #10
0
 public OutageRecovery(Outage update) : this(update.Platform, update)
 {
 }
예제 #11
0
 public OutageUpdate(Outage Ongoing) : this(Ongoing.Platform, Ongoing)
 {
 }
예제 #12
0
 private void ReplicateOutage(Outage outage)
 {
     Session["Update"]   = new OutageUpdate(outage);
     Session["Recovery"] = new OutageRecovery(outage);
 }