Курсовая работа: Магазин побутової техніки
складBindingSource.Filter = "[" + "Дата производства" + "]" + " >= '" + dateTimePicker1.Value + "' AND " + "[" + "Дата производства" + "]" + "<= '" + dateTimePicker2.Value + "'";
}
private void toolStripButton1_Click(object sender, EventArgs e)
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "Текстовые документы|*.txt";
String filename = null;
if (sfd.ShowDialog() == DialogResult.OK)
{
filename = sfd.FileName;
}
try
{
StreamWriter sw = new StreamWriter(filename);
foreach (DataRow dr in складDataSet.Tables["Склад"].Rows)
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i < 9; i++)
{
sb.Append(dr[i]);
sb.Append(" ");
}
sb.Append("\r\n");
sw.Write(sb);
}
sw.Close();
}
catch (Exception exc)
{