private void DetailedInformation(object sender, EventArgs e) { int id = GetIdInformationGridView(); string information = CargosDB.SelectAllDetailed(id); MessageBox.Show(information, "Подробная информация", MessageBoxButtons.OK); }
private void DetailedInformation(object sender, EventArgs e) { int line = dataGridView1.CurrentRow.Index; int id = Convert.ToInt32(dataGridView1.Rows[line].Cells[0].Value); string information = CargosDB.SelectAllDetailed(id); MessageBox.Show(information, "Просмотр", MessageBoxButtons.OK); }
public void SelectAllDetailedTest_inCorrectId_ReturnNull() { string expectResult = ""; string factResult; int id = 33; factResult = CargosDB.SelectAllDetailed(id); Assert.AreEqual(expectResult, factResult); }
public void SelectAllDetailedTest_CorrectId_ReturnDetailedInformation() { string expectResult = "Название: Чипсы \nСтоимость: 1900 \nВес: 4 \nОбъём: 86 \n" + "Тип кузова: Крытый \nДата загрузки: 20.12.2019 0:00:00 \nСтатус заказа: Не доставлен \nМесто загрузки: " + "Брест \nМесто разгрузки: Витебск \nРасстояние: 630\n"; string factResult; int id = 12; factResult = CargosDB.SelectAllDetailed(id); Assert.AreEqual(expectResult, factResult); }