private void buttonCheckFunction_Click(object sender, EventArgs e) { bool functionExist = TableUtil.FunctionExists("PrepareTextData4"); this.checkBoxFunctionExist.Checked = functionExist; this.buttonCreateFunction.Enabled = !functionExist; }