private void b_print_Click(object sender, EventArgs e) { if (FillAndSaveTc() >= 0) { WordExportUtil.Print(_auto); } }
/*private void FillPrimech() * { * if (dataGridView1.SelectedRows.Count != 0) * { * if (tb_primech.Text != dataGridView1.SelectedRows[0].Cells[dataGridView1.ColumnCount - 1].Value.ToString()) * { * dataGridView1.SelectedRows[0].Cells[dataGridView1.ColumnCount - 1].Value = tb_primech.Text; * } * } * }*/ private void OpenInWord(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count != 0) { int id = int.Parse(dataGridView1.SelectedRows[0].Cells[0].Value.ToString()); Auto auto = _autoRepository.LoadAuto(id); WordExportUtil.Export(auto); } }
private void button1_Click(object sender, EventArgs e) { if (_auto.IsCanEdit) { if (FillAndSaveTc() >= 0) { WordExportUtil.Export(_auto); } } }