
Untitled
By: a guest on
Jul 15th, 2012 | syntax:
None | size: 1.54 KB | hits: 12 | expires: Never
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Usfi.MetroPcs.Website.assets.v3.controls
{
public partial class DCTest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string notificationType = "error";
string titleText = "Testing Title Text";
List<string> paragraphList = new List<string>();
paragraphList.Add("Paragraph one.");
paragraphList.Add("Paragraph two.");
paragraphList.Add("Paragraph three.");
List<string> itemList = new List<string>();
itemList.Add("Item one.");
itemList.Add("Item two.");
itemList.Add("Item three.");
SetNotification(notificationType, titleText, paragraphList, itemList);
SetNotification("info", titleText, paragraphList, itemList);
SetNotification("confirm", titleText, paragraphList, itemList);
}
private void SetNotification(string type, string msg, List<string> paras, List<string> items)
{
SystemErrorMessage sem = (SystemErrorMessage)LoadControl("~/assets/v3/controls/SystemErrorMessage.ascx");
sem.Type = type;
sem.Message = msg;
sem.ParagraphList = paras;
sem.ItemList = items;
sem.buildNotification();
phMessage.Controls.Add(sem);
}
}
}