Ejemplo n.º 1
0
 public bool CheckForm()
 {
     if (Number.ToString().Trim() == string.Empty || Number.ToString().Trim() == "0")
     {
         MessageViewed("Number");
         return(false);
     }
     if (Customer == null)
     {
         MessageViewed("Customer");
         return(false);
     }
     if (Amount.ToString().Trim() == string.Empty || Amount.ToString().Trim() == "0")
     {
         MessageViewed("Amount");
         return(false);
     }
     if (Currency == null)
     {
         MessageViewed("Currency");
         return(false);
     }
     if (Facture != null)
     {
         if (Amount != Facture.TotalAmount(Currency.Id))
         {
             MessageViewed("AmountToTotal");
             return(false);
         }
     }
     return(true);
 }