Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 15th, 2012  |  syntax: None  |  size: 1.54 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7.  
  8. namespace Usfi.MetroPcs.Website.assets.v3.controls
  9. {
  10.     public partial class DCTest : System.Web.UI.Page
  11.     {
  12.         protected void Page_Load(object sender, EventArgs e)
  13.         {
  14.  
  15.             string notificationType = "error";
  16.  
  17.             string titleText = "Testing Title Text";
  18.  
  19.             List<string> paragraphList = new List<string>();
  20.             paragraphList.Add("Paragraph one.");
  21.             paragraphList.Add("Paragraph two.");
  22.             paragraphList.Add("Paragraph three.");
  23.  
  24.             List<string> itemList = new List<string>();
  25.             itemList.Add("Item one.");
  26.             itemList.Add("Item two.");
  27.             itemList.Add("Item three.");
  28.  
  29.             SetNotification(notificationType, titleText, paragraphList, itemList);
  30.  
  31.             SetNotification("info", titleText, paragraphList, itemList);
  32.             SetNotification("confirm", titleText, paragraphList, itemList);
  33.  
  34.         }
  35.  
  36.  
  37.         private void SetNotification(string type, string msg, List<string> paras, List<string> items)
  38.         {
  39.             SystemErrorMessage sem = (SystemErrorMessage)LoadControl("~/assets/v3/controls/SystemErrorMessage.ascx");
  40.  
  41.             sem.Type = type;
  42.             sem.Message = msg;
  43.             sem.ParagraphList = paras;
  44.             sem.ItemList = items;
  45.  
  46.             sem.buildNotification();
  47.  
  48.             phMessage.Controls.Add(sem);
  49.         }
  50.  
  51.     }
  52. }