Пример #1
0
        private void AddProject()
        {
            HEWDataContext context = new HEWDataContext();
            Project projectObj = new Project();
            projectObj.Name = txtName.Text.Trim();
            projectObj.Description = txtDescription.Text.Trim();
            projectObj.IsHome = cbIsHome.Checked;
            projectObj.IsSide = cbIsSideMenu.Checked;
            projectObj.CategoryID = Int16.Parse(ddlCategories.SelectedValue);
            context.Projects.InsertOnSubmit(projectObj);
            context.SubmitChanges();

            Response.Redirect("Default.aspx");
        }
Пример #2
0
		private void detach_Projects(Project entity)
		{
			this.SendPropertyChanging();
			entity.ProjectsCategory = null;
		}
Пример #3
0
		private void attach_Projects(Project entity)
		{
			this.SendPropertyChanging();
			entity.ProjectsCategory = this;
		}
Пример #4
0
 partial void DeleteProject(Project instance);
Пример #5
0
 partial void UpdateProject(Project instance);
Пример #6
0
 partial void InsertProject(Project instance);