예제 #1
0
        private void pictureBox8_Click(object sender, EventArgs e)
        {
            if (Global.Margem.ConfiguraçãoSistema != "adm")
            {
                MessageBox.Show("Acesso não autorizado");

                return;
            }
            if (String.IsNullOrEmpty(textBox1.Text) == false && String.IsNullOrEmpty(textBox2.Text) == false)
            {
                string temp = "";
                if (checkBox1.Checked == true)
                {
                    temp = "sim";
                }
                if (checkBox1.Checked == false)
                {
                    temp = "não";
                }
                DALCadastro.Insere_Banco(textBox1.Text, textBox2.Text, temp);
                MessageBox.Show("Banco incluído com sucesso");
                if (Global.Margem.ConfiguraçãoSistemaLOGs == "sim")
                {
                    Ferramentas.CriaLog("config", "Incluiu novo Banco : " + "Código : " + textBox1.Text +
                                        " Nome : " + textBox2.Text);
                }
                textBox1.ReadOnly = true;
                textBox2.ReadOnly = true;
                textBox1.Text     = "";
                textBox2.Text     = "";
                checkBox1.Visible = false;
            }
        }