private void getTask(Panel categoryPnl, Guid guid) { var taskBussinessObj = new BusinessLayer.TaskBusinessObjects(); _task = taskBussinessObj.GetTaskByCategoryId(guid); count = _task.Count(); foreach (var task in _task) { Panel TaskContentPanel = new Panel(); TaskContentPanel.CssClass = "tile-content bg-color-green"; categoryPnl.Controls.Add(TaskContentPanel); TaskContentPanel.ID = "" + count; //string taskCategoryIdString = "" + (Guid)task.categoryId; //Literal descTask = new Literal(); //descTask.Text = "<p class=\"fg-color-white\">" + task.description + "</p>"; //TaskContentPanel.Controls.Add(descTask); taskDescription = "<p class=\"fg-color-white\">" + task.description + "</p>"; getUsersTask(TaskContentPanel, task.taskId); System.Diagnostics.Debug.Write("\nTask Description" + task.description + "\n"); } }
private void getCategory(string parentCategory, Panel parPnl) { var taskBussinessObj = new BusinessLayer.TaskBusinessObjects(); foreach (var Category in _category) { categoryTask = taskBussinessObj.GetTaskByCategoryId(Category.categoryId); //foreach (var catTask in categoryTask) //{ if ((parentCategory == Category.parent) && categoryTask != null) { Panel categoryPnl = new Panel(); categoryPnl.ID = "" + (Guid)Category.categoryId; categoryPnl.CssClass = "tile double bg-color-ubuoy border-color-LightGrey"; categoryPnl.Attributes.Add("data-param-period", "3000"); categoryPnl.Attributes.Add("data-param-direction", "up"); categoryPnl.Attributes.Add("data-role", "tile-slider"); System.Diagnostics.Debug.Write("category" + Category.Name); HyperLink taskLink = new HyperLink(); //~/Demo.aspx?+_projectOrganization.orginizationId + ProjectId taskLink.NavigateUrl = "~/tasksCategory.aspx?id=" + Category.categoryId; parPnl.Controls.Add(taskLink); parPnl.Controls.Add(categoryPnl); taskLink.Controls.Add(categoryPnl); //Panel TaskContentPanel = new Panel(); //TaskContentPanel.CssClass = "tile-content bg-color-green"; //categoryPnl.Controls.Add(TaskContentPanel); // // getTask(TaskContentPanel, Category.categoryId); getTask(categoryPnl, Category.categoryId); Panel brandPanel = new Panel(); brandPanel.CssClass = "brand bg-color-darken fg-color-white"; categoryPnl.Controls.Add(brandPanel); Label categoryNameLabel = new Label(); categoryNameLabel.CssClass = "text fg-color-white"; categoryNameLabel.Text = Category.Name; brandPanel.Controls.Add(categoryNameLabel); Panel taskCount = new Panel(); taskCount.CssClass = "badge fg-color-white"; Literal taskCountText = new Literal(); taskCountText.Text = "" + count; brandPanel.Controls.Add(taskCount); taskCount.Controls.Add(taskCountText); //} } } }