private void EditFolder() { EWSTreeNode node = (EWSTreeNode)treeViewControl.SelectedNode; PlantStructureFolderForm plantstructurefolderform = new PlantStructureFolderForm(); tblPlantStructure _tblplantstructure = (tblPlantStructure)node.sqlobject; plantstructurefolderform.name = _tblplantstructure.Name; plantstructurefolderform.description = _tblplantstructure.Description; if (plantstructurefolderform.ShowDialog() == DialogResult.OK) { _tblplantstructure.Name = plantstructurefolderform.name; _tblplantstructure.Description = plantstructurefolderform.description; foreach (tblPlantStructure tblplantstructure in tblSolution.m_tblSolution().m_tblPlantStructureCollection) { if ((tblplantstructure.Name.ToUpper() == _tblplantstructure.Name.ToUpper()) && (tblplantstructure.ParentID == _tblplantstructure.ParentID) && (tblplantstructure.ID != _tblplantstructure.ID)) { return; } } int ret = _tblplantstructure.Update(); UpdateTabPage(); } }
private void EditProperty() { EWSTreeNode node = (EWSTreeNode)treeViewControl.SelectedNode; PlantStructurePropertyForm plantstructurepropertyform = new PlantStructurePropertyForm(); tblPlantStructure _tblplantstructure = (tblPlantStructure)node.sqlobject; plantstructurepropertyform.name = _tblplantstructure.Name; plantstructurepropertyform.description = _tblplantstructure.Description; plantstructurepropertyform.type = _tblplantstructure.Type; plantstructurepropertyform.filename = _tblplantstructure.PropertyPath; plantstructurepropertyform.argument = _tblplantstructure.Argument; if (plantstructurepropertyform.ShowDialog() == DialogResult.OK) { _tblplantstructure.Name = plantstructurepropertyform.name; _tblplantstructure.Description = plantstructurepropertyform.description; _tblplantstructure.Type = plantstructurepropertyform.type; _tblplantstructure.PropertyPath = plantstructurepropertyform.filename; _tblplantstructure.Argument = plantstructurepropertyform.argument; foreach (tblPlantStructure tblplantstructure in tblSolution.m_tblSolution().m_tblPlantStructureCollection) { if ((tblplantstructure.Name.ToUpper() == _tblplantstructure.Name.ToUpper()) && (tblplantstructure.ParentID == _tblplantstructure.ParentID) && (tblplantstructure.ID != _tblplantstructure.ID)) { return; } } int ret = _tblplantstructure.Update(); UpdateTabPage(); } }