Exemplo n.º 1
0
        /// <summary>
        /// When the create button is clicked, we inform the world to commit changes.
        /// </summary>
        private void ButtonCreate_Click(object sender, EventArgs e)
        {
            var lProject = new Project();
            lProject.Name = this.mTextBoxTitle.Name;
            lProject.Description = this.mTextPreviewViewBody.Text;
            lProject.CreationDateTIme = DateTime.UtcNow;

            using (var lDataContext = new IssueTrackerDataContext())
            {
                var lProjectUser = new ProjectUser();
                lProjectUser.Project = lProject;
                lProjectUser.User = lDataContext.CurrentUser;

                lDataContext.Projects.InsertOnSubmit(lProject);
                lDataContext.ProjectUsers.InsertOnSubmit(lProjectUser);

                lDataContext.SubmitChanges();
            }

            this.ProjectCreated.Fire(this, ReadOnlyValueEventArgs.Create(lProject));
        }
Exemplo n.º 2
0
		private void detach_ProjectUsers(ProjectUser entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
Exemplo n.º 3
0
		private void attach_ProjectUsers(ProjectUser entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}
Exemplo n.º 4
0
 partial void DeleteProjectUser(ProjectUser instance);
Exemplo n.º 5
0
 partial void UpdateProjectUser(ProjectUser instance);
Exemplo n.º 6
0
 partial void InsertProjectUser(ProjectUser instance);