private void btnAddProperty_Click(object sender, EventArgs e) { AddPropertyForm frmAddProperty = new AddPropertyForm(); frmAddProperty.ShowDialog(); if (frmAddProperty.DialogResult == DialogResult.OK) { schemaObject.AddProperty(frmAddProperty.txtProeprtyName.Text,frmAddProperty.txtDisplayName.Text,frmAddProperty.txtDescription.Text,frmAddProperty.cmbNativeType.Text,(SoType)Enum.Parse(typeof(SoType),frmAddProperty.cmbSmOType.SelectedItem.ToString())); updateGrids(); } }
private void gridProperties_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { K2.PSUK.ServiceObjectSchema.SchemaObject.SchemaProperty property = schemaObject.SchemaProperties[e.RowIndex]; AddPropertyForm frmAddProperty = MapPropertyToform(property); if (frmAddProperty.ShowDialog() == DialogResult.OK) { schemaObject.SchemaProperties[e.RowIndex] = MapPropertyFormToSchemaProperty(frmAddProperty); updateGrids(); } }
private K2.PSUK.ServiceObjectSchema.SchemaObject.SchemaProperty MapPropertyFormToSchemaProperty(AddPropertyForm frmAddProperty) { K2.PSUK.ServiceObjectSchema.SchemaObject.SchemaProperty property = new SchemaObject.SchemaProperty(); property.Description = frmAddProperty.txtDescription.Text; property.DisplayName = frmAddProperty.txtDisplayName.Text; property.Name = frmAddProperty.txtProeprtyName.Text; property.K2Type = (SoType)Enum.Parse(typeof(SoType), frmAddProperty.cmbSmOType.SelectedValue.ToString()); property.TrueType = frmAddProperty.cmbNativeType.Text; return property; }
private void btnAddProperty_Click(object sender, EventArgs e) { AddPropertyForm frmAddProperty = new AddPropertyForm(); frmAddProperty.ShowDialog(); if (frmAddProperty.DialogResult == DialogResult.OK) { schemaObject.AddProperty(frmAddProperty.txtProeprtyName.Text, frmAddProperty.txtDisplayName.Text, frmAddProperty.txtDescription.Text, frmAddProperty.cmbNativeType.Text, (SoType)Enum.Parse(typeof(SoType), frmAddProperty.cmbSmOType.SelectedItem.ToString())); updateGrids(); } }
private AddPropertyForm MapPropertyToform(K2.PSUK.ServiceObjectSchema.SchemaObject.SchemaProperty property) { AddPropertyForm frmAddProperty = new AddPropertyForm(); frmAddProperty.txtDescription.Text = property.Description; frmAddProperty.txtDisplayName.Text = property.DisplayName; frmAddProperty.txtProeprtyName.Text = property.Name; string x = property.K2Type.ToString(); frmAddProperty.cmbSmOType.SelectedItem = x; frmAddProperty.cmbNativeType.Text = property.TrueType; return frmAddProperty; }
private AddPropertyForm MapPropertyToform(K2.PSUK.ServiceObjectSchema.SchemaObject.SchemaProperty property) { AddPropertyForm frmAddProperty = new AddPropertyForm(); frmAddProperty.txtDescription.Text = property.Description; frmAddProperty.txtDisplayName.Text = property.DisplayName; frmAddProperty.txtProeprtyName.Text = property.Name; string x = property.K2Type.ToString(); frmAddProperty.cmbSmOType.SelectedItem = x; frmAddProperty.cmbNativeType.Text = property.TrueType; return(frmAddProperty); }
private K2.PSUK.ServiceObjectSchema.SchemaObject.SchemaProperty MapPropertyFormToSchemaProperty(AddPropertyForm frmAddProperty) { K2.PSUK.ServiceObjectSchema.SchemaObject.SchemaProperty property = new SchemaObject.SchemaProperty(); property.Description = frmAddProperty.txtDescription.Text; property.DisplayName = frmAddProperty.txtDisplayName.Text; property.Name = frmAddProperty.txtProeprtyName.Text; property.K2Type = (SoType)Enum.Parse(typeof(SoType), frmAddProperty.cmbSmOType.SelectedValue.ToString()); property.TrueType = frmAddProperty.cmbNativeType.Text; return(property); }