示例#1
0
 private bool We_have_an_empty_essential_field()
 {
     return(Date == Convert.ToDateTime("9/9/9999", StringHelper.Culture()) ||
            Unreconciled_amount.Double_equals(0) ||
            string.IsNullOrEmpty(Type) ||
            string.IsNullOrEmpty(Description));
 }
 public ConsoleLine To_console(int index = -1)
 {
     return(new ConsoleLine
     {
         Index = index,
         Date_string = Date.ToString(@"dd\/MM\/yyyy"),
         Amount_string = Unreconciled_amount.To_csv_string(true),
         Description_string = Description
     });
 }
示例#3
0
 private String To_string(char separator, bool encase_description_in_quotes = true, bool format_currency = true)
 {
     return(Date.ToString(@"dd\/MM\/yyyy") + separator.ToString()
            + (Unreconciled_amount == 0 ? "" : Unreconciled_amount.To_csv_string(format_currency)) +
            separator.ToString()
            + (Matched ? "x" : "") + separator.ToString()
            + (encase_description_in_quotes ? Description.Encase_in_escaped_quotes_if_not_already_encased() : Description) + separator.ToString()
            + (Reconciled_amount == 0 ? "" : Reconciled_amount.To_csv_string(format_currency)) + separator.ToString()
            + (Match != null ? separator.ToString() + separator.ToString() + Match.To_csv(format_currency) : ""));
 }
 private String To_string(char separator, bool encase_description_in_quotes = true, bool format_currency = true)
 {
     return((Date.ToOADate() == 0 ? "" : Date.ToString(@"dd\/MM\/yyyy")) + separator
            + (Unreconciled_amount == 0 ? "" : Unreconciled_amount.To_csv_string(format_currency)) + separator
            + Code + separator
            + (Reconciled_amount == 0 ? "" : Reconciled_amount.To_csv_string(format_currency)) + separator
            + (Date_paid.ToOADate() == 0 ? "" : Date_paid.ToString(@"dd\/MM\/yyyy")) + separator
            + (Total_paid == 0 ? "" : Total_paid.To_csv_string(format_currency)) + separator
            + (string.IsNullOrEmpty(Description)
                 ? ""
                 : (encase_description_in_quotes ? Description.Encase_in_escaped_quotes_if_not_already_encased() : Description)));
 }