private void BindUserInfo(int id) { List <TicketUsersEntity> list = ticketApp.GetListUsersByTicketId(id); if (list != null && list.Count > 0) { foreach (TicketUsersEntity u in list) { if (u.Type == TicketUsersType.PM) { this.lilPmName.Text += BaseWebsitePage.GetClientUserName(u.UserID) + " ; "; } else if (u.Type == TicketUsersType.Dev) { this.lilDevName.Text += BaseWebsitePage.GetClientUserName(u.UserID) + " ; "; } else if (u.Type == TicketUsersType.QA) { this.lilTestName.Text += BaseWebsitePage.GetClientUserName(u.UserID) + " ; "; } else if (u.Type == TicketUsersType.Other) { this.lilOtherName.Text += BaseWebsitePage.GetClientUserName(u.UserID) + " ; "; } } } }
private void BindTicketBaseInfo() { if (null != TicketsEntityInfo) { if (TicketsEntityInfo.Status < TicketsState.Developing) { this.lilEN.Text = TicketsEntityInfo.IsEstimates == true ? "<span style='Color:red;'>YES</span>" : "<span style='Color:red;'>NO</span>"; } else { this.lilEN.Text = TicketsEntityInfo.IsEstimates == true ? "YES" : "NO"; } this.lilIsInternal.Text = TicketsEntityInfo.IsInternal == true ? "IsInternal," : ""; this.lilProjectName.Text = ShowProjectName(TicketsEntityInfo.ProjectID); this.lilTicketCode.Text = TicketsEntityInfo.TicketCode; this.lilTicketPriority.Text = Enum.GetName(typeof(PriorityState), (int)TicketsEntityInfo.Priority); this.lilTicketStatus.Text = GetClientStatusNameBySatisfyStatus((int)TicketsEntityInfo.Status, TicketsEntityInfo.TicketID).Replace("<span style='color:red;'>", "").Replace("</span>", ""); this.lilCreateBy.Text = BaseWebsitePage.GetClientUserName(TicketsEntityInfo.CreatedBy); this.lilCreateTime.Text = ShowFormatTime(TicketsEntityInfo.CreatedOn); if (!TicketsEntityInfo.IsEstimates) { this.trEstLast.Visible = false; } else { this.lilFinalHours.Text = TicketsEntityInfo.Status < TicketsState.Estimation_Approved ? "0" : TicketsEntityInfo.FinalTime.ToString(); } } }
private void BindTicketBaseInfo() { if (null != TicketsEntityInfo) { if (this.TicketsEntityInfo.IsEstimates) { this.rdoEs.Checked = true; } else { this.rdoNotEs.Checked = true; } if (TicketsEntityInfo.ConvertDelete == CovertDeleteState.NotABug) { this.lilQuestion.Text = "<span style='Color:red;'>Not A Bug</span>"; if (UserInfo.Role == RolesEnum.PM || UserInfo.Role == RolesEnum.Leader) { this.lilIsABug.Text = "<input type='button' class='btnthree' id='btnIsABug' value='Is Bug' onclick=\"updateStatusConfirm('isBug',false);return false;\"/>"; } } bool hasPermission = ticketApp.ValidateIsExistUserUnderProject(TicketsEntityInfo.TicketID, UserInfo.UserID); if (!TicketsEntityInfo.IsInternal && (UserInfo.Role == RolesEnum.PM || UserInfo.Role == RolesEnum.ADMIN) && TicketsEntityInfo.Status < TicketsState.PM_Reviewed && TicketsEntityInfo.Status != TicketsState.Cancelled && hasPermission) { this.rdoEs.Enabled = true; this.rdoNotEs.Enabled = true; } else { this.rdoEs.Enabled = false; this.rdoNotEs.Enabled = false; } this.lilIsInternal.Text = TicketsEntityInfo.IsInternal == true ? "IsInternal," : ""; this.lilProjectName.Text = ShowProjectName(TicketsEntityInfo.ProjectID); this.lilTicketCode.Text = TicketsEntityInfo.TicketCode; this.lilTicketPriority.Text = Enum.GetName(typeof(PriorityState), (int)TicketsEntityInfo.Priority); this.lilTicketStatus.Text = ChangeStatus(TicketsEntityInfo.Status, TicketsEntityInfo.TicketID); this.lilCreateBy.Text = BaseWebsitePage.GetClientUserName(TicketsEntityInfo.CreatedBy); this.lilCreateTime.Text = ShowFormatTime(TicketsEntityInfo.CreatedOn); this.lilModify.Text = BaseWebsitePage.GetClientUserName(TicketsEntityInfo.ModifiedBy); this.lilModifyTime.Text = this.lilModify.Text.Length == 0 ? "" : ShowFormatTime(TicketsEntityInfo.ModifiedOn); this.lilDueDate.Text = ShowFormatTime(TicketsEntityInfo.DeliveryDate); this.lilScdDate.Text = ShowFormatTime(TicketsEntityInfo.StartDate); this.lilInitialTime.Text = TicketsEntityInfo.InitialTime.ToString(); this.lilEsUserName.Text = string.Format("({0})", BaseWebsitePage.GetClientUserName(TicketsEntityInfo.EsUserID)); #region Hidden when value is null or access is not satisfy condition if (BaseWebsitePage.GetClientUserName(TicketsEntityInfo.ModifiedBy).Length == 0) { this.updateBy.Visible = false; } if (TicketsEntityInfo.IsEstimates)//Estimation Needed { trEst.Visible = true; if ((int)TicketsState.Cancelled < (int)TicketsEntityInfo.Status && (int)TicketsEntityInfo.Status < (int)TicketsState.PM_Verify_Estimation && TicketsEntityInfo.FinalTime <= 0 && TicketsEntityInfo.EsUserID <= 0) { if (UserInfo.Role == RolesEnum.ADMIN || UserInfo.Role == RolesEnum.PM || UserInfo.Role == RolesEnum.Leader) { btnAssignUser.Visible = true; } } if (TicketsEntityInfo.Status > TicketsState.Waiting_For_Estimation || (TicketsEntityInfo.FinalTime > 0 && TicketsEntityInfo.Status == TicketsState.PM_Reviewed)) { if (TicketsEntityInfo.FinalTime > 0) { this.lilLookFinalEs.Text = "<a onclick=\"LookEsDetail('iushau02u340final');return false;\" style=\"cursor:pointer;\"/><span style='color:blue;'>View Estimation</span></a>"; } else if (TicketsEntityInfo.InitialTime > 0 && TicketsEntityInfo.FinalTime <= 0) { this.lilLookInitialEs.Text = "<a onclick=\"LookEsDetail('fwef654wr432erf12grdge');return false;\" style=\"cursor:pointer;\"/><span style='color:blue;'>View Initial Estimation</span></a>"; } } } else { trEst.Visible = false; this.trEstLast.Visible = false; } this.lilFinalHours.Text = TicketsEntityInfo.FinalTime.ToString(); //final hours #region show value who be assigned if (TicketsEntityInfo.EsUserID == UserInfo.UserID && TicketsEntityInfo.Status == TicketsState.Waiting_For_Estimation) { this.btnEsTime.Visible = true; } if (TicketsEntityInfo.DeliveryDate <= UtilFactory.Helpers.CommonHelper.GetDefaultMinDate()) { this.lilDueDate.Text = "<span style='Color:red;'>waiting for confirm <span>"; } if (TicketsEntityInfo.StartDate <= UtilFactory.Helpers.CommonHelper.GetDefaultMinDate()) { this.lilScdDate.Text = "<span style='Color:red;'>waiting for confirm <span>"; } if (TicketsEntityInfo.InitialTime <= 0) { this.lilInitialTime.Text = "<span style='Color:red;'>waiting<span>"; } if (TicketsEntityInfo.FinalTime <= 0) { this.lilFinalHours.Text = "<span style='Color:red;'>waiting<span>"; } //allow user List <int> listAllowUser = new List <int>(); listAllowUser.Add((int)RolesEnum.PM); listAllowUser.Add((int)RolesEnum.ADMIN); listAllowUser.Add((int)RolesEnum.Leader); if (listAllowUser.Contains(UserInfo.RoleID)) { if (TicketsEntityInfo.IsEstimates) { if (TicketsEntityInfo.Status == TicketsState.PM_Verify_Estimation) { this.btnEsPmTime.Visible = true; } } if (TicketsEntityInfo.Status >= TicketsState.PM_Reviewed && TicketsEntityInfo.Status < TicketsState.Developing && TicketsEntityInfo.Status != TicketsState.Cancelled) { if (!(TicketsEntityInfo.Status == TicketsState.PM_Reviewed && TicketsEntityInfo.InitialTime > 0)) { this.BtnUpdateSc.Visible = true; } } } #endregion #endregion } }
public string GetFeedBackHTML(int createdByID, DateTime createdOn, bool isPublic , string title, string description, string feedbackID, object waitClientFeedback, object waitPMFeedback) { string repley = string.Empty; if (UserInfo.Role == RolesEnum.CLIENT) { if (waitClientFeedback.ToString() == "1") { repley = "Waiting for Client feedback--"; } else if (waitPMFeedback.ToString() == "1") { repley = "Waiting PM feedback--"; } } else if (UserInfo.Role != RolesEnum.CLIENT) { if (waitPMFeedback.ToString() == "1") { repley = "Waiting PM feedback--"; } else if (waitClientFeedback.ToString() == "1") { repley = "Waiting for Client feedback--"; } } StringBuilder stringBuilder = new StringBuilder(); var filesHTML = ShowImageList(feedbackID); if (createdOn.Date != dateCache.Date) { dateCache = createdOn.Date; stringBuilder.Append("<li class=\"fdmessageDate\">" + dateCache.ToString("MM/dd/yyyy") + "</li>"); } if (createdByID != UserInfo.UserID) { stringBuilder.Append("<li class=\"otherbox\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"4\">") .Append("<tbody><tr><td class=\"fdtdLeft\"><div class=\"fdUser\">" + BaseWebsitePage.GetClientUserName(createdByID) + "</div>") .Append("</td>") .Append("<td class=\"fdcontentBox1\" ><div class=\"fdarrowbox1\"><img src=\"/images/fdarrow1.png\"></div><span class=\"fdNotice\">" + repley + "</span>") .Append(description); if (filesHTML.Length > 0) { stringBuilder.Append("<div class=\"fdfileBox\">" + filesHTML + "</div>"); } stringBuilder.Append("</td>") .Append("</tr></tbody></table></li>"); } else { stringBuilder.Append("<li class=\"myselfbox\">") .Append("<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\">") .Append("<tbody><tr><td class=\"fdcontentBox2\"> ") .Append("<div class=\"rightClose\" onclick=\"deleteOwnFeedBack(" + feedbackID + "," + UserInfo.UserID + ")\" title=\"Delete\">×</div>") .Append("<span class=\"fdNotice\">" + repley + "</span>" + description); if (filesHTML.Length > 0) { stringBuilder.Append("<div class=\"fdfileBox\">" + filesHTML + "</div>"); } stringBuilder.Append("</td>") .Append("<td class=\"fdtdright\">") .Append("<div class=\"fdarrowbox2\"><img src=\"/images/fdarrow2.png\"></div>") .Append("<div class=\"fdUser\">" + BaseWebsitePage.GetClientUserName(createdByID) + "</div>") .Append("</td></tr> </tbody></table></li>"); } return(stringBuilder.ToString()); }