Inheritance: INotifyPropertyChanging, INotifyPropertyChanged
示例#1
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();
            }
        }
示例#2
0
 partial void DeleteIssueData(IssueData instance);
示例#3
0
 partial void UpdateIssueData(IssueData instance);
示例#4
0
 partial void InsertIssueData(IssueData instance);
示例#5
0
		private void detach_IssueDatas(IssueData entity)
		{
			this.SendPropertyChanging();
			entity.Issue = null;
		}
示例#6
0
		private void attach_IssueDatas(IssueData entity)
		{
			this.SendPropertyChanging();
			entity.Issue = this;
		}