public static void AssignIssueEvent(string projectkey, string who, string asignee, string summary, string evkey) { var wholink = "<a href = \"/User/UserCenter?username="******"\" >" + who.Split(new char[] { '@' })[0] + "</a>"; var aslink = "<a href = \"/User/UserCenter?username="******"\" >" + asignee.Split(new char[] { '@' })[0] + "</a>"; var projectlink = "<a href = \"/Project/ProjectDetail?ProjectKey=" + projectkey + "\" >[" + projectkey + "] </a>"; var issuelink = "<a href = \"/Issue/UpdateIssue?issuekey=" + evkey + "\" >" + summary + "</a>"; var vm = new ProjectEvent(); vm.Event = projectlink + issuelink + " is assigned to " + aslink + " by " + wholink; UpdateEvent(evkey, vm.dbEvent); }
private static void BuildProjectEvent(string who, string projectkey, string projectname, string operate) { var wholink = "<a href = \"/User/UserCenter?username="******"\" >" + who.Split(new char[] { '@' })[0] + "</a>"; var projectlink = "<a href = \"/Project/ProjectDetail?ProjectKey=" + projectkey + "\" >" + projectname + "</a>"; var vm = new ProjectEvent(); vm.ProjectKey = projectkey; vm.EventKey = GetUniqKey(); vm.Event = wholink + " " + operate + " " + projectlink; vm.UpdateDate = DateTime.Now; vm.StoreEvent(); }
public static void CreateIssueEvent(string projectkey, string reporter, string asignee, string summary, string evkey) { var reportlink = "<a href = \"/User/UserCenter?username="******"\" >" + reporter.Split(new char[] { '@' })[0] + "</a>"; var asigneelink = "<a href = \"/User/UserCenter?username="******"\" >" + asignee.Split(new char[] { '@' })[0] + "</a>"; var projectlink = "<a href = \"/Project/ProjectDetail?ProjectKey=" + projectkey + "\" >[" + projectkey + "] </a>"; var issuelink = "<a href = \"/Issue/UpdateIssue?issuekey=" + evkey + "\" >" + summary + "</a>"; var vm = new ProjectEvent(); vm.ProjectKey = projectkey; vm.EventKey = evkey; vm.Event = projectlink + issuelink + " is created by " + reportlink + " and asigned to " + asigneelink; vm.UpdateDate = DateTime.Now; vm.StoreEvent(); }
public static List <ProjectEvent> RetrieveEvent(int topnum) { var ret = new List <ProjectEvent>(); var sql = "select top <num> ProjectKey,EventKey,Event,UpdateDate from ProjectEvent order by UpdateDate DESC"; sql = sql.Replace("<num>", Convert.ToString(topnum)); var dbret = DBUtility.ExeLocalSqlWithRes(sql, null); foreach (var item in dbret) { var e = new ProjectEvent(Convert.ToString(item[0]), Convert.ToString(item[1]), Convert.ToString(item[2]) , Convert.ToString(item[3])); ret.Add(e); } return(ret); }