示例#1
0
 private void btnExcluir_Click(object sender, EventArgs e)
 {
     if (lstData.SelectedItems.Count > 0)
     {
         frmConfirmaSenha objConfirmarSenha = new frmConfirmaSenha();
         objConfirmarSenha.objPrincipal = this;
         objConfirmarSenha.Form         = 1;
         objConfirmarSenha.ShowDialog();
         if (SenhaCerta)
         {
             Excluir();
             CarregarSessoes(Data);
         }
     }
 }
示例#2
0
 private void btnExcluir_Click(object sender, EventArgs e)
 {
     if (lstPesquisa.SelectedItems.Count > 0)
     {
         if (MessageBox.Show("Você possui certeza absoluta que deseja excluir a tatuagem? Isso eliminará todos os agendamentos feitos/abertos com a tatuagem.", "Atenção", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
         {
             frmConfirmaSenha objConfirmarSenha = new frmConfirmaSenha();
             objConfirmarSenha.objTatuagem = this;
             objConfirmarSenha.Form        = 4;
             objConfirmarSenha.ShowDialog();
             if (SenhaCerta)
             {
                 int ID_TAT = Convert.ToInt16(lstPesquisa.SelectedItems[0].SubItems[1].Text);
                 ExcluIr(ID_TAT);
                 if (qual == 1)
                 {
                     CarregarTatuagensTODASNOME(txtNome.Text);
                 }
                 else
                 if (qual == 2)
                 {
                     ConsultaTatuagemFINALIZADASNOME(txtNome.Text);
                 }
                 else
                 if (qual == 3)
                 {
                     ConsultaTatuagemNAOFINALIZADASNOME(txtNome.Text);
                 }
                 else
                 if (qual == 4)
                 {
                     CarregarTatuagensTODAS();
                 }
                 else
                 if (qual == 5)
                 {
                     CarregarTatuagensFINALIZADAS();
                 }
                 else
                 {
                     CarregarTatuagensNAOFINALIZADAS();
                 }
             }
         }
     }
 }
示例#3
0
 private void btnExcluir_Click(object sender, EventArgs e)
 {
     if (lstData.SelectedItems.Count > 0)
     {
         if (MessageBox.Show("Realmente deseja excluir este agendamento? (Não haverá volta)", "Atenção", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
         {
             frmConfirmaSenha objConfirmarSenha = new frmConfirmaSenha();
             objConfirmarSenha.objAgendamento = this;
             objConfirmarSenha.Form           = 5;
             objConfirmarSenha.ShowDialog();
             if (SenhaCerta)
             {
                 Excluir();
             }
         }
     }
 }
示例#4
0
 private void btnExcluir_Click(object sender, EventArgs e)
 {
     if (lstPesquisa.SelectedItems.Count > 0)
     {
         if (MessageBox.Show("Realmente deseja excluir esse funcionário?", "Atenção", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
         {
             frmConfirmaSenha objConfirmarSenha = new frmConfirmaSenha();
             objConfirmarSenha.objFuncionario = this;
             objConfirmarSenha.Form           = 3;
             objConfirmarSenha.ShowDialog();
             if (SenhaCerta)
             {
                 Excluir();
             }
         }
         CarregarDadosFuncionario();
     }
 }
示例#5
0
 private void btnExcluir_Click_1(object sender, EventArgs e)
 {
     if (lstPesquisa.SelectedItems.Count > 0)
     {
         if (MessageBox.Show("Realmente deseja excluir este Cliente? Isso excluirá todo o histórico dele. (Não haverá volta)", "Atenção", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
         {
             frmConfirmaSenha objConfirmarSenha = new frmConfirmaSenha();
             objConfirmarSenha.objCliente = this;
             objConfirmarSenha.Form       = 2;
             objConfirmarSenha.ShowDialog();
             if (SenhaCerta)
             {
                 Excluir();
                 MessageBox.Show("Cliente excluido com sucesso");
                 CarregarDadosClientes();;
             }
         }
     }
 }
示例#6
0
        private void btnRestaurarBackup_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Possui certerza que deseja restaurar o sistema?", "Atenção", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
            {
                if (MessageBox.Show("Isso excluirá o atual banco e irá restaurar o backup, certeza disso?", "Atenção", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                {
                    frmConfirmaSenha objfrmConfirmaSenha = new frmConfirmaSenha();
                    objfrmConfirmaSenha.objBackup = this;
                    objfrmConfirmaSenha.Form      = 6;
                    objfrmConfirmaSenha.ShowDialog();
                    if (SenhaCerta)
                    {
                        MessageBox.Show("Para restauração do sistema, você será redirecionado a outra tela.");

                        System.Diagnostics.Process.Start(Application.StartupPath + "\\Restore.exe");
                        Application.ExitThread();
                    }
                }
            }
        }