Robson Amaral

Robson Amaral

  • NA
  • 132
  • 17.3k

Validation field date required

May 21 2018 1:59 PM
Dear fellow users, I'm trying to send an error message to the user, but only my Data logs are not working, could you please help me out? Note, I put breakpoints to compile my
application, but it does not fall within the code referring to Data, it was to work : /
 
This is the part of the code that is not falling on the breakpoint and not displaying the logs for the user:
  1. private void setProcessInter (Process process, Interested party, DataRow line, int i)    
  2. {    
  3.     i = 4;    
  4.     i ++;    
  5.     try    
  6.     {    
  7.         if (! line.ItemArray [17] .ToString ().) Equals (""))    
  8.             processInterested.CodeSep = decimal.Parse (line.ItemArray [17] .ToString ());    
  9.         else    
  10.             processInterested.CodeSep = null;    
  11.         try    
  12.         {    
  13.             DateTime DateSep = DateTime.Parse (line.ItemArray [18] .ToString ());    
  14.             processInterested.DateSep = DateSep;    
  15.         }    
  16.         catch    
  17.         {    
  18.             logErro.Append ("The cell S" + (line ["index"]) + "must be filled with a date.");    
  19.             fileInvalidated = true;    
  20.         }    
  21.         try    
  22.         {    
  23.             DateTime DataEntrySefaz = DateTime.Parse (line.ItemArray [19] .ToString ());    
  24.             processInterested.DateInputSelf = DateEntrySelf;    
  25.         }    
  26.         catch    
  27.         {    
  28.             logErro.Append ("The T cell" + (line ["index"]) + "must be filled with a date.");    
  29.             fileInvalidated = true;    
  30.         }    
  31.         try    
  32.         {    
  33.             DateTime DateRequestPgto = DateTime.Parse (line.ItemArray [0] .ToString ());    
  34.             processInterestedDate  = DateRequisitionoPgto;    
  35.         }    
  36.         catch    
  37.         {    
  38.             logErro.Append ("cell A" + (row ["index"]) + "must be filled with a date.");    
  39.             fileInvalidated = true;    
  40.         }  
  41.         processInterested.Interested = interested;  
  42.         catch (Exception error)    
  43.         {    
  44.             fileInvalidated = true;    
  45.             logErro.Append (error.Message + "<br>");    
  46.         }    
  47.     }  

Answers (7)