Inheritance: INotifyPropertyChanging, INotifyPropertyChanged
Ejemplo n.º 1
0
 partial void DeleteIssue(Issue instance);
Ejemplo n.º 2
0
        public void CreateIssue(Guid issueKey, Guid issueTypeKey, Guid? issueThreadKey, string sessionKey, DateTime clientTime, IDictionary<string, string> data, DateTime serverTime)
        {
            using (var context = GetDataContext())
            {
                var issue = new Issue
                {
                    IssueKey = issueKey,
                    IssueTypeId = context.IssueTypes.Single(x => x.IssueTypeKey == issueTypeKey).IssueTypeId,
                    CreationClientTime = clientTime,
                    CreationServerTime = serverTime,
                    SessionId = context.Sessions.Single(x => x.SessionKey == sessionKey).SessionId,
                    IssueThreadKey = issueThreadKey,
                };

                context.Issues.InsertOnSubmit(issue);
                context.SubmitChanges();

                if (data != null)
                {
                    foreach (var d in data)
                    {
                        var issueData = new IssueData
                        {
                            IssueId = issue.IssueId,
                            Name = d.Key,
                            Value = d.Value,                             
                        };

                        context.IssueDatas.InsertOnSubmit(issueData);
                    }
                }

                context.SubmitChanges();
            }
        }
Ejemplo n.º 3
0
 partial void UpdateIssue(Issue instance);
Ejemplo n.º 4
0
 partial void InsertIssue(Issue instance);
Ejemplo n.º 5
0
		private void detach_Issues(Issue entity)
		{
			this.SendPropertyChanging();
			entity.IssueType = null;
		}
Ejemplo n.º 6
0
		private void attach_Issues(Issue entity)
		{
			this.SendPropertyChanging();
			entity.IssueType = this;
		}
Ejemplo n.º 7
0
        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);
        }