public override List <BankTransfer> GetBankTransfers() { BankFileOperation = new FileOperationFoonesh(); var lines = BankFileOperation.GetFileContent(UserPath.find() + "\\SuperBank.txt").Split(new[] { "\n" }, StringSplitOptions.None); return(lines.Select(GetTransferEntry).ToList()); }
//private string path = protected override bool Send(BankTransfer transfer) { // FindFile(); StreamWriter sw; KsebalBankTransfer tr = (KsebalBankTransfer)transfer; if (File.Exists(UserPath.find() + "\\raport.txt")) { using (sw = File.AppendText(UserPath.find() + "\\raport.txt")) { sw.WriteLine(tr.SenderTransferSurname + " to " + tr.ConsumerTransferSurname); sw.Close(); tr.IsTransferSuccessful = true; } } else { sw = new StreamWriter(UserPath.find() + "\\raport.txt"); sw.WriteLine(tr.SenderTransferSurname + " to " + tr.ConsumerTransferSurname); sw.Close(); tr.IsTransferSuccessful = true; } return(true); }