コード例 #1
0
ファイル: StructureInspectorForm.cs プロジェクト: NKulas/DBUI
        private async void btnClose_Click(object sender, EventArgs e)
        {
            Close();

            object existingObject = typeof(ConnectionProfile).GetProperties().FirstOrDefault(x => x.Name == structureObject.ObjectType.ToString()).GetValue(profile);

            string oldName = ((StructureObject)existingObject).InternalName;

            if (txtName.Text != oldName)
            {
                bool result = await StructureManager.UpdateName((StructureObject)existingObject, txtName.Text, profile);

                if (!result)
                {
                    new MessageForm("Alert", "Data could not be updated.").ShowDialog();
                }
            }
        }