partial void DeleteHelpDesk_TaskCategory(HelpDesk_TaskCategory instance);
Ejemplo n.º 2
0
        private void SaveTags(int intTaskID)
        {
            HelpDeskDALDataContext objHelpDeskDALDataContext = new HelpDeskDALDataContext();

            var ExistingTaskCategories = from HelpDesk_TaskCategories in objHelpDeskDALDataContext.HelpDesk_TaskCategories
                                         where HelpDesk_TaskCategories.TaskID == intTaskID
                                         select HelpDesk_TaskCategories;

            // Delete all existing TaskCategories
            if (ExistingTaskCategories != null)
            {
                objHelpDeskDALDataContext.HelpDesk_TaskCategories.DeleteAllOnSubmit(ExistingTaskCategories);
                objHelpDeskDALDataContext.SubmitChanges();
            }

            // Add TaskCategories
            TreeView objTreeView = (TreeView)TagsTreeExistingTasks.FindControl("tvCategories");
            if (objTreeView.CheckedNodes.Count > 0)
            {
                // Iterate through the CheckedNodes collection 
                foreach (TreeNode node in objTreeView.CheckedNodes)
                {
                    HelpDesk_TaskCategory objHelpDesk_TaskCategory = new HelpDesk_TaskCategory();

                    objHelpDesk_TaskCategory.TaskID = intTaskID;
                    objHelpDesk_TaskCategory.CategoryID = Convert.ToInt32(node.Value);

                    objHelpDeskDALDataContext.HelpDesk_TaskCategories.InsertOnSubmit(objHelpDesk_TaskCategory);
                    objHelpDeskDALDataContext.SubmitChanges();
                }
            }
        }
 partial void UpdateHelpDesk_TaskCategory(HelpDesk_TaskCategory instance);
 partial void InsertHelpDesk_TaskCategory(HelpDesk_TaskCategory instance);
		private void detach_HelpDesk_TaskCategories(HelpDesk_TaskCategory entity)
		{
			this.SendPropertyChanging();
			entity.HelpDesk_Task = null;
		}
		private void attach_HelpDesk_TaskCategories(HelpDesk_TaskCategory entity)
		{
			this.SendPropertyChanging();
			entity.HelpDesk_Category = this;
		}
Ejemplo n.º 7
0
        private void SaveTags(int intTaskID)
        {
            HelpDeskDALDataContext objHelpDeskDALDataContext = new HelpDeskDALDataContext();

            TreeView objTreeView = (TreeView)TagsTree.FindControl("tvCategories");
            if (objTreeView.CheckedNodes.Count > 0)
            {
                // Iterate through the CheckedNodes collection 
                foreach (TreeNode node in objTreeView.CheckedNodes)
                {
                    HelpDesk_TaskCategory objHelpDesk_TaskCategory = new HelpDesk_TaskCategory();

                    objHelpDesk_TaskCategory.TaskID = intTaskID;
                    objHelpDesk_TaskCategory.CategoryID = Convert.ToInt32(node.Value);

                    objHelpDeskDALDataContext.HelpDesk_TaskCategories.InsertOnSubmit(objHelpDesk_TaskCategory);
                    objHelpDeskDALDataContext.SubmitChanges();
                }
            }
        }