partial void DeleteApplication(Application instance);
partial void InsertApplication(Application instance);
partial void UpdateApplication(Application instance);
private static void AddIssueTypePageIssue(Issue issue, IssueType issueType, Version version, Application application, Project project, Session session, Quilt4DataContext context) { //var dataDictionary = JsonConvert.SerializeObject(issue.IssueDatas.ToDictionary(data => data.Name, data => data.Value)); //var issueTypePageIssue = new IssueTypePageIssue //{ // ProjectKey = project.ProjectKey, // ApplicationKey = application.ApplicationKey, // VersionKey = version.VersionKey, // IssueTypeKey = issueType.IssueTypeKey, // Data = dataDictionary, // Enviroment = session.Enviroment, // ApplicationUserName = session.ApplicationUser != null ? session.ApplicationUser.UserName : "******", // LastUpdateServerTime = issue.CreationServerTime, //}; //context.IssueTypePageIssues.InsertOnSubmit(issueTypePageIssue); }
private void detach_Applications(Application entity) { this.SendPropertyChanging(); entity.Project = null; }
private static void AddUpdateIssueTypePageIssueType(Quilt4DataContext context, IssueType issueType, Version version, Application application, Project project) { //var issueTypePageIssueType = context.IssueTypePageIssueTypes.SingleOrDefault(x => x.IssueTypeKey == issueType.IssueTypeKey); //if (issueTypePageIssueType == null) //{ // var newIssueTypePageIssueType = new IssueTypePageIssueType // { // IssueTypeKey = issueType.IssueTypeKey, // ProjectKey = project.ProjectKey, // ApplicationKey = application.ApplicationKey, // VersionKey = version.VersionKey, // ProjectName = project.Name, // ApplicationName = application.Name, // VersionNumber = version.VersionNumber, // Level = issueType.Level, // Message = issueType.Message, // StackTrace = issueType.StackTrace, // Ticket = issueType.Ticket, // Type = issueType.Type, // }; // context.IssueTypePageIssueTypes.InsertOnSubmit(newIssueTypePageIssueType); //} }
private static void AddUpdateVersionPageIssueType(Quilt4DataContext context, IssueType issueType, Version version, Application application, Project project) { //var versionPageIssueType = context.VersionPageIssueTypes.SingleOrDefault(x => x.IssueTypeKey == issueType.IssueTypeKey); //var issueCount = issueType.Issues.Count; //var lastIssueServerTime = issueType.Issues.Max(x => x.CreationServerTime); //var enviroments = string.Join(";", issueType.Issues.Select(x => x.Session).Select(y => y.Enviroment).Distinct()); //if (versionPageIssueType != null) //{ // versionPageIssueType.IssueCount = issueCount; // versionPageIssueType.LastIssueServerTime = lastIssueServerTime; // versionPageIssueType.Enviroments = enviroments; //} //else //{ // var newVersionPageIssueType = new VersionPageIssueType // { // IssueTypeKey = issueType.IssueTypeKey, // ProjectKey = project.ProjectKey, // ApplicationKey = application.ApplicationKey, // VersionKey = version.VersionKey, // Enviroments = enviroments, // IssueCount = issueCount, // LastIssueServerTime = lastIssueServerTime, // Level = issueType.Level, // Message = issueType.Message, // Ticket = issueType.Ticket, // Type = issueType.Type // }; // context.VersionPageIssueTypes.InsertOnSubmit(newVersionPageIssueType); //} }
private static void AddUpdateVersionPageVersion(Quilt4DataContext context, Version version, Application application, Project project) { //var versionPageVersion = context.VersionPageVersions.SingleOrDefault(x => x.VersionKey == version.VersionKey); //if (versionPageVersion == null) //{ // var newVersionPageVersion = new VersionPageVersion // { // VersionKey = version.VersionKey, // ProjectKey = project.ProjectKey, // ApplicationKey = application.ApplicationKey, // ProjectName = project.Name, // ApplicationName = application.Name, // VersionNumber = version.VersionNumber, // }; // context.VersionPageVersions.InsertOnSubmit(newVersionPageVersion); //} }
private static void AddUpdateProjectPageVersion(Quilt4DataContext context, Version version, Application application, Project project) { //var projectPageVersion = context.ProjectPageVersions.SingleOrDefault(x => x.VersionKey == version.VersionKey); //var sessions = version.Sessions.Count; //var issueTypes = version.IssueTypes.Count; //var issues = version.IssueTypes.SelectMany(x => x.Issues).Count(); //var lastUpdateServerTime = version.IssueTypes.SelectMany(x => x.Issues).Max(x => x.CreationServerTime); //var enviroments = string.Join(";", version.Sessions.Select(x => x.Enviroment).Distinct()); //if (projectPageVersion != null) //{ // projectPageVersion.SessionCount = sessions; // projectPageVersion.IssueTypeCount = issueTypes; // projectPageVersion.IssueCount = issues; // projectPageVersion.LastUpdateServerTime = lastUpdateServerTime; // projectPageVersion.Enviroments = enviroments; //} //else //{ // var newProjectPageVersion = new ProjectPageVersion // { // VersionKey = version.VersionKey, // ProjectKey = project.ProjectKey, // ApplicationKey = application.ApplicationKey, // VersionNumber = version.VersionNumber, // SessionCount = sessions, // IssueTypeCount = issueTypes, // IssueCount = issues, // LastUpdateServerTime = lastUpdateServerTime, // Enviroments = enviroments, // }; // context.ProjectPageVersions.InsertOnSubmit(newProjectPageVersion); //} }
private static void AddUpdateProjectPageApplication(Quilt4DataContext context, Application application, Project project) { //var projectPageApplication = context.ProjectPageApplications.SingleOrDefault(x => x.ApplicationKey == application.ApplicationKey); //var versions = application.Versions.Count; //if (projectPageApplication != null) //{ // projectPageApplication.VersionCount = versions; //} //else //{ // var newProjectPageApplication = new ProjectPageApplication // { // ApplicationKey = application.ApplicationKey, // Name = application.Name, // ProjectKey = project.ProjectKey, // VersionCount = versions // }; // context.ProjectPageApplications.InsertOnSubmit(newProjectPageApplication); //} }