I have the following code:
private void button3_Click(object sender, EventArgs e)
{
dataGridView1.Refresh();
dataGridView1.Columns.Clear();
clsMSSQL.clsMSSQL mssql = new clsMSSQL.clsMSSQL(2);
string sql = ("select CCase.RefNo AS Az, EventTemplate.EventCode AS Vorgang from ikaros.CCase join ikaros.Event on CCase.ID = Event.CCaseID join ikaros.EventTemplate on Event.EventTemplateID = EventTemplate.ID where EventTemplate.EventCode='IRVB' and Event.EventDate ='date' order by CCase.RefNo ASC");
mssql.Query(sql);
mssql.Fetch();
dataGridView1.ColumnCount = 2;
dataGridView1.Columns[0].Name = "Aktenzeichen";
dataGridView1.Columns[1].Name = "Vorgang";
while (!mssql.eof)
{
string[] arr_row = new string[2];
arr_row[0] = mssql.GetString("Az");
arr_row[1] = mssql.GetString("Vorgang");
dataGridView1.Rows.Add(arr_row);
mssql.Fetch();
}
dataGridView1.EndEdit();
dataGridView1.Refresh();
}
now I want to make a textbox where someone can put a datetime in and it gets the table of that datetime which was given in the textbox. I did my research and I found out that I need to make the following task a class:
and Event.EventDate ='date'
So 'date' should be the class which should get the information from the textbox and put it into the SQL Statement. I tried to make my textbox do it but I always make the programm freeze.
Thank you.