Some help?
I try this but dont work, no have errors but not read file...please help
- {
- if (documentsDataGridView.SelectedRows.Count > 0)
- {
-
- string id = documentsDataGridView.SelectedRows[0].Cells["dataGridViewTextBoxColumn1"].Value.ToString();
- string number = documentsDataGridView.SelectedRows[0].Cells["dataGridViewTextBoxColumn2"].Value.ToString();
- string count_number = documentsDataGridView.SelectedRows[0].Cells["dataGridViewTextBoxColumn3"].Value.ToString();
- string label = documentsDataGridView.SelectedRows[0].Cells["dataGridViewTextBoxColumn4"].Value.ToString();
- string partner = documentsDataGridView.SelectedRows[0].Cells["dataGridViewTextBoxColumn5"].Value.ToString();
- string tax_number = documentsDataGridView.SelectedRows[0].Cells["dataGridViewTextBoxColumn6"].Value.ToString();
- string file_location = documentsDataGridView.SelectedRows[0].Cells["file_location"].Value.ToString();
-
-
-
- idTextBox.Text = id;
- numberTextBox.Text = number;
- count_numberTextBox.Text = count_number;
- labelTextBox.Text = label;
- partnerComboBox.Text = partner;
- tax_numberTextBox.Text = tax_number;
- dateDateTimePicker.Value = Convert.ToDateTime(documentsDataGridView.SelectedRows[0].Cells["dataGridViewTextBoxColumn7"].Value);
- file_locationTextBox.Text = file_location;
-
-
-
-
- try
- {
- if (documentsDataGridView.SelectedRows[0].Cells["pdf_file"].Value != null)
-
- {
- byte[] ap = (byte[])(documentsDataGridView.SelectedRows[0].Cells["pdf_file"].Value);
- MemoryStream ms = new MemoryStream(ap);
- axAcroPDF1.src = LocalEncoding.GetString(ms.ToArray());
-
-
-
- }
- else
- {
- axAcroPDF1.src = null;
- }
- }
- catch
- {
- axAcroPDF1.src = null;
- }
-
-
- }
- }