при использовании 3-уровневой архитектуры мне нужно ввести идентификатор и вывести таблицу данных для вывода в excel.Я работаю над интерфейсом, и мне нужно знать, как запрашивать проекты для определенного идентификатора, который вводится на уровне приложения.
I have tried code like string SapId = orojectmanagerInfo.getsapID();
string sapID = requesttypes.ProjectSummary.toString();
private void ConnectButton_Click(object sender, RibbonControlEventArgs e)
{
/* if the SAP ID length is not between 4-12 characters, a message box pops up to tell user that they must enter a valid SAP ID number, the
"Connect" button is enabled, and the "Disconnect" and "Generate Files" buttons are disabled
*/
if (SapIdBox.Text.Length < 4)
{
MessageBox.Show("you must enter a valid SAP ID number");
ConnectButton.Enabled = true;
DisconnectButton.Enabled = false;
GenerateFilesButton.Enabled = false;
filterButton.Enabled = false;
}
else
{
ConnectButton.Enabled = false;
DisconnectButton.Enabled = true;
GenerateFilesButton.Enabled = true;
filterButton.Enabled = true;
using (var client = new SapWorkerClient())
{
ConnectionInfo info = new ConnectionInfo();
info.SapIdentifier = SapIdBox.Text;
//Send connection request to the server
var retVal = client.EstablishConnection(info);
retVal.ConnectionSuccessful = true;
//Update UI based on return message from the server
if (retVal.ConnectionSuccessful)
{
client.EstablishConnectionAsync(info);
//Update UI based on return message from the server
MessageBox.Show(retVal.Message, "Connected");
}
else
{
MessageBox.Show(retVal.Message, "Error Occured");
}
}
}
ConnectionStatus.Open();
{
string SapId = ProjectManagerInfo.getsapID();
string SapID = RequestTypes.ProjectSummary.ToString();
}
}
I want to be able to enter an ID and have the application layer get data from teh database adn send it to the front end to put into an excel sheet.enter code here