Personal, I would like the following information, I have a validation, and in this validation I send a message in the application to the user that the cell G of the line should be filled, my code looks like this:
But when compiling, and trying to import the file, the log message, it looks like this:Import Log:Cell G1 must be filled.
is not G1, it should appear for the user cell g of line 3 for example.
Please, if anyone can help me, thank you! :semi-twins:
But when compiling, and trying to import the file, the log message, it looks like this:Import Log:Cell G1 must be filled.
C#:
private void PreliminaryVerification(IEnumerable<DataRow> data) {
bool imported= false;
foreach(var line in data)
{
//Verifies that no worksheets with the numSEP entered have not already been imported
if (!line.ItemArray[17].ToString().Equals(""))
{
if (aplProcessInterested.listProcInterperCodSep(decimal.Parse(line.ItemArray[17].ToString())).Count != 0)
{
imported= true;
break;
}
}
else
{
log.Append("The cell S" + (1) + " must be completed. <br>"); // [COLOR=#212121][FONT=arial]but this is wrong (1), because I am working with lines, I put in an illustrative way, how to solve this situation in this part of the code?[/FONT][/COLOR]
fileInvalidated = true;
}
if (!imported)
{
//Validation of required fields
if (line.ItemArray[6].ToString().Equals(""))
{
log.Append("The cell G" + ( 1) + " must be completed <br>"); //Here the same situation as the previous comment
arquivoInvalidado = true;
}
But when compiling, and trying to import the file, the log message, it looks like this:Import Log:Cell G1 must be filled.
is not G1, it should appear for the user cell g of line 3 for example.
Please, if anyone can help me, thank you! :semi-twins:
But when compiling, and trying to import the file, the log message, it looks like this:Import Log:Cell G1 must be filled.