protected string ChangeStatus(object status, int ticketId, decimal FinalTime, bool Es) { string tmp = string.Empty; try { string statusResult = fbmHandler.GetDashboardStatus(status, ticketId); if (!statusResult.Contains("span")) { int statusToInt = Convert.ToInt32((TicketsState)Enum.Parse(typeof(TicketsState), statusResult)); switch (UserInfo.Role) { case RolesEnum.DEV: case RolesEnum.Contactor: case RolesEnum.Leader: { if (Es) { if (DevAttentionStatusWithEs.Contains(statusToInt) || (statusToInt == (int)TicketsState.PM_Reviewed && FinalTime > 0)) { if (statusToInt == (int)TicketsState.Waiting_For_Estimation) { if (!NotPreChangRed(ticketId)) { tmp = string.Format("<span style='color:red;'>{0}</span>", statusResult.Replace('_', ' ')); } } else { tmp = string.Format("<span style='color:red;'>{0}</span>", statusResult.Replace('_', ' ')); } } } else { if (DevAttentionStatus.Contains(statusToInt)) { tmp = string.Format("<span style='color:red;'>{0}</span>", statusResult.Replace('_', ' ')); } } break; } case RolesEnum.QA: { if (QaAttentionStatus.Contains(statusToInt)) { if (statusToInt == (int)TicketsState.Waiting_For_Estimation) { if (!NotPreChangRed(ticketId)) { tmp = string.Format("<span style='color:red;'>{0}</span>", statusResult.Replace('_', ' ')); } } else { tmp = string.Format("<span style='color:red;'>{0}</span>", statusResult.Replace('_', ' ')); } } break; } case RolesEnum.Sales: { if (SalerAttentionStatus.Contains(statusToInt)) { tmp = string.Format("<span style='color:red;'>{0}</span>", statusResult.Replace('_', ' ')); } break; } case RolesEnum.PM: { if (PmAttentionStatus.Contains(statusToInt)) { if (!(statusToInt == (int)TicketsState.PM_Reviewed && FinalTime > 0)) { tmp = string.Format("<span style='color:red;'>{0}</span>", statusResult.Replace('_', ' ')); } } break; } default: { tmp = statusResult.Replace('_', ' '); break; } } } tmp = statusResult.Replace('_', ' '); tmp += " " + fbmHandler.FeedBackMessage(ticketId, UserInfo.Role); return(tmp); } catch (Exception ex) { WebLogAgent.Write(ex); return(""); } }
protected string FeedBackMessage(object ticketId) { return(fbmHandler.FeedBackMessage(ticketId, UserInfo.Role)); }