private void btnOK_Click(object sender, EventArgs e) { string paramData = numDias.Value + ";" + numSemanas.Value + ";" + numMeses.Value; frmPai.NovaDataInserida(paramData, data1, strData1); this.Close(); }
private void btnOK_Click(object sender, EventArgs e) { try { string strData = txtAno.Text + "-" + txtMes.Text.PadLeft(2, '0') + "-" + txtDia.Text.PadLeft(2, '0'); if (!Utilidades.ValidarData(strData)) { return; } formPai.NovaDataInserida(strData, data1, strData1); this.Close(); } catch (Exception error) { MessageBox.Show(error.Message, "Erro!", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }