TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Robson Amaral
NA
132
17.5k
Compilation does not pass the message log line to the user
Apr 12 2018 10:05 AM
I have the following problem, my Date cell in the excel sheet is a required field, however, leaving unfilled would have to return a message with the log to the user, however, it did not return any log message stating that cell S line 1 should be filled with a date, but it does not appear. Could someone please help me?
Follow my code below:
private
void
setProcInter(Process process, Interested interested , DataRow line)
{
int
i = 0;
try
{
DateTime DateSep = DateTime.Parse(line.ItemArray[18].ToString());
processInterested.DateSep = DateSep;
}
catch
{
i = i + 1;
logErro.Append(
"The S cell"
+ (i) +
" must be completed with a date. <br>"
);
fileInvalidated=
true
;
}
}
private
void
PreliminaryVerification(IEnumerable<DataRow> data)
{
int
i = 0;
bool
imported=
false
;
foreach
(var line
in
data)
{
i = i + 1;
//Verifies that no worksheets with the numSEP entered have not
//already been imported
if
(!line.ItemArray[17].ToString().Equals(
""
))
{
if
(aplProcessinterested.listProcInterPorCodSep(
decimal
.Parse(line.ItemArray[17].ToString())).Count != 0)
{
imported=
true
;
break
;
}
}
else
{
log.Append(
"The S cell for the line "
+ (i) +
" must be completed. <br>"
);
fileInvalidated=
true
;
}
}
I have this method where I close all the processes related to the interested one, and I load the information of the worksheet, just the date, that if it is blank it should appear the log informing the user to fill, but it does not appear, the same thing is in the others validations below, but does not pass the line when compiling. Can you help me?
Reply
Answers (
0
)
Questions with the message log for the user
Message log error for user