Exemple #1
0
        private void btnIncluir_Click(object sender, EventArgs e)
        {
            FormManExcel frmManExcel = new FormManExcel();

            frmManExcel.sTipo = "Incluir";
            frmManExcel.Inicializa();
            frmManExcel.ShowDialog();

            if (frmManExcel.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                GeraTemp();
            }
        }
Exemple #2
0
        private void btnAlterar_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
            {
                MessageBox.Show("Selecione um registro !", "Informação", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            FormManExcel frmManExcel = new FormManExcel();

            frmManExcel.sTipo   = "Alterar";
            frmManExcel.iCodigo = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells["COD_EXCEL"].Value.ToString());

            frmManExcel.Inicializa();
            frmManExcel.ShowDialog();

            if (frmManExcel.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                GeraTemp();
            }
        }