1
I’m working with windows form . net c# but I don’t have much practice and would like a help...
I have a calendar component in a Form1 and after running the application, a date is selected which is stored in a var. So far so good. I created a class as shown below: In this Class I need to receive the value of the chosen date in Form1 and I don’t know how to do it...
Form1
private void btnBuscar_Click(object sender, EventArgs e)
{
if (validaPeriodo() == true)
{
btnValidar.Enabled = true;
btnGerar.Enabled = false;
btnVisualizarFalha.Enabled = false;
NewDb openDb = new NewDb();
DataTable resultado = new DataTable();
using (MySqlConnection db = openDb.AbrirConexaoMySql())
{
try
{
db.Open();
if (CESDI.SelectedTab.Text == "CESDI")
{
MySqlCommand sqlCommand = MamData.MySql.CESDI.SelectCESDI(db, dtaDataInicio.Text, dtaDataFinal.Text);
txtNAtos.Text = MamData.MySql.CESDI.SelectAtosCesdi(db, dtaDataInicio.Text, dtaDataFinal.Text);
inicializarGrids(sqlCommand, gridCESDI);
}
}
}
}
}
Class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Drawing;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
using MamData;
using System.Net;
using Comunicacao.Dal;
using System.Data;
using System.ComponentModel;
using MySql.Data.MySqlClient;
namespace Comunicacao.XML.CENSEC
{
public class GeraSEFAZ
{
public static string dataInicial;
public static string dataFinal;
static public string geraXmlSEFAZ(List<DataGridViewRow> registros)
{
}
}
}
Dude, improve your question, it got badly formatted in relation to the code and also the code is incomplete and kind of confusing.
– Richard Dias