private void Save_Click(object sender, EventArgs e) { var sfd = new SaveFileDialog() { Filter = "Файлы заказов|*.sushi" }; var result = sfd.ShowDialog(this); if (result == DialogResult.OK) { var dto = GetModelFromUI(); OrderDto.WriteToFile(sfd.FileName, dto); } }