protected override void OnLoad(EventArgs e) { base.OnLoad(e); GuidPoolLiteral.Text = TheHelper.JsSerializer.Serialize(TheGuidPool.CreateGuids(500)); var taskTypes = TheHelper.TypesImplementingInterface(typeof(IWorkflowTask)); var tasks = taskTypes.Select(taskType => TheWorkflowTaskFactory.CreateTask(taskType)).ToList(); var adapter = new WorkflowTaskCollectionUiAdapter(tasks); TaskInfoLiteral.Text = TheHelper.JsSerializer.Serialize(adapter); TaskRepeater.DataSource = adapter.Tasks.Values; TaskRepeater.DataBind(); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); GuidPoolLiteral.Text = TheHelper.JsSerializer.Serialize(TheGuidPool.CreateGuids(500)); var taskTypes = TheHelper.TypesImplementingInterface(typeof(IWorkflowTask)); Log.Debug(string.Format("Found {0} types implementing IWorkflowTask", taskTypes.Count())); var tasks = taskTypes.Select(taskType => TheWorkflowTaskFactory.CreateTask(taskType)).ToList(); var adapter = new WorkflowTaskCollectionUiAdapter(tasks); TaskInfoLiteral.Text = TheHelper.JsSerializer.Serialize(adapter); var data = adapter.Tasks.Values.OrderBy(v => v.Name); TaskRepeater.DataSource = data; TaskRepeater.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { LoginInfo login = (LoginInfo)Session["login"]; List <TaskInfo> task = TaskDAO.GetTask(login.UserName); TaskRepeater.DataSource = task; TaskRepeater.DataBind(); if (task.Count == 0) { lblNoTask.Text = "No Task has been assigned by or to You!"; } else { lblNoTask.Text = "Following are tasks assigned by or to You!"; } } ddlAssignTo.DataSource = TaskDAO.userList(); ddlAssignTo.DataTextField = "FullName"; ddlAssignTo.DataValueField = "UserName"; ddlAssignTo.DataBind(); }