Ejemplo n.º 1
0
        private OutageRecovery GetOutages()
        {
            OutageOngoing  oo = (OutageOngoing)Session["Ongoing"];
            OutageUpdate   ou = (OutageUpdate)Session["Update"];
            OutageRecovery or = (OutageRecovery)Session["Recovery"];

            ou._Outage = oo;
            or._Outage = ou;

            return(or);
        }
Ejemplo n.º 2
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;
        }
Ejemplo n.º 3
0
 public ExcelMarshall(OutageRecovery outage, String excelPath, int startRow)
 {
     this.ExcelPath = excelPath;
     this.outage    = outage;
     this.startRow  = startRow;
 }
Ejemplo n.º 4
0
 private void ReplicateOutage(Outage outage)
 {
     Session["Update"]   = new OutageUpdate(outage);
     Session["Recovery"] = new OutageRecovery(outage);
 }