private void operationAttrDeleteButton_Click(object sender, EventArgs e) { DB_objects.Attribute a = new DB_objects.Attribute(operationAttributeType.Text, operationAttributeValue.Text, operationAttributeLanguage.Text); a.attribute_code = selectedOperationAttributeView; try { operationAttributeDao.delete(a); fillOperationAttributes(selectedOperationView); } catch (SqlException ex) { toolStripStatusLabel1.Text = "Unable to delete attribute!"; } }
private void scenarioAttrSaveButton_Click(object sender, EventArgs e) { DB_objects.Attribute a = new DB_objects.Attribute(); a.type = scenarioAttributeType.Text; a.value = scenarioAttributeValue.Text; a.language = scenarioAttributeLanguage.Text; if (selectedScenarioAttributeView == -1) { scenarioAttributeDao.create(selectedScenarioView, a); } else { a.attribute_code = selectedScenarioAttributeView; scenarioAttributeDao.update(a); } fillScenarioAttributes(selectedScenarioView); }
private void operationAttrSaveButton_Click(object sender, EventArgs e) { DB_objects.Attribute a = new DB_objects.Attribute(); a.type = operationAttributeType.Text; a.value = operationAttributeValue.Text; a.language = operationAttributeLanguage.Text; if (selectedOperationAttributeView == -1) { DB_objects.Operation o = new DB_objects.Operation(); o.operation_code = selectedOperationView; o.name = operationName.Text; o.description = operationDesc.Text; operationAttributeDao.create(o, a); } else { a.attribute_code = selectedOperationAttributeView; operationAttributeDao.update(a); } fillOperationAttributes(selectedOperationView); }