public override string ToString() { return("Loaded :" + TransactionDate.ToString("yyyy/MM/dd") + Environment.NewLine + "Supplier : " + Supplier + Environment.NewLine + "Amount :R" + Amount.ToString("###,##0.00") + Environment.NewLine + "Reference :" + Reference); }
private void saveTransactionButton_Click(object sender, RoutedEventArgs e) { Shop selectedShop = shopComboBox.SelectedItem as Shop; transactionController.Add(TransactionDate.ToString(), amountTextBox.Text, selectedShop, descriptionTextBox.Text); ClearForm(); RefreshTransactionsTable(); }
public override string ToString()//Override ToString which is used to format the send file statement { string username = Username; Thread.CurrentThread.CurrentCulture = new CultureInfo("el-gr"); var transactiondateformat = TransactionDate.ToString("yyyy-MM-dd HH:mm:ss.FFF", CultureInfo.InvariantCulture); var amount = Amount.ToString("C2", CultureInfo.CurrentCulture); return($"Your transaction was successful {username}, " + $"it took place on {transactiondateformat} and your current BALANCE is: {amount}"); }
public string this[string columnName] { get { if (columnName == "VehicleId") { if (null == VehicleId || VehicleId == 0) { return("Vehicle is required"); } } if (columnName == "DriverName") { if (string.IsNullOrEmpty(DriverName)) { return("Driver is required"); } } if (columnName == "TransactionDate") { if (null == TransactionDate || string.IsNullOrEmpty(TransactionDate.ToString())) { return("Filled date is required"); } } if (columnName == "CashAmount") { if (null == CashAmount || CashAmount <= 0) { return("Cash amount is required"); } } if (columnName == "ValueAmount") { if (null == ValueAmount || ValueAmount <= 0) { return("Value amount is required"); } } if (columnName == "LeafNo") { if (string.IsNullOrEmpty(LeafNo)) { return("Leaf# is required"); } } return(string.Empty); } }
public override string ToString() { var sb = new StringBuilder(); sb.Append("From" + " | ").Append("Transaction Type | ") .Append(" " + "To" + " | ").Append(" " + "Amount" + " |") .AppendLine("\t " + "\tDate" + "\t\t |") .Append(AccountHolder).Append("\t " + $"{TransactionType}" + " ") .Append(" " + LoggedUser + " ").Append(" " + $"{Amount.ToString("C", new CultureInfo("el-Gr"))}" + " ") .Append(" " + $"{TransactionDate.ToString("yyyy-MM- dd HH:mm:ss.FFF")}") .AppendLine(); return(sb.ToString()); }
public bool Equals(DealerPositionInfo another) { if (null == another) { return(false); } if (this == another) { return(true); } string tmpDate1 = TransactionDate.ToString(GlobalDefinition.DateFormat, GlobalDefinition.FormatProvider); string tmpDate2 = another.TransactionDate.ToString(GlobalDefinition.DateFormat, GlobalDefinition.FormatProvider); return(tmpDate1.Equals(tmpDate2) && Commodity.Equals(another.Commodity) && Month.Equals(another.Month) && VolumeDealers.Equals(another.VolumeDealers) && BuyDealers.Equals(another.BuyDealers) && SellDealers.Equals(another.SellDealers)); }
public bool Equals(ContractTransactionInfo another) { if (null == another) { return(false); } if (this == another) { return(true); } string dateString1 = TransactionDate.ToString(GlobalDefinition.DateFormat, GlobalDefinition.FormatProvider); string dateString2 = another.TransactionDate.ToString(GlobalDefinition.DateFormat, GlobalDefinition.FormatProvider); return(dateString1.Equals(dateString2) && Commodity.Equals(another.Commodity) && DoubleUtility.Equals(OpenPrice, another.OpenPrice) && DoubleUtility.Equals(HighPrice, another.HighPrice) && DoubleUtility.Equals(LowPrice, another.LowPrice) && DoubleUtility.Equals(ClosePrice, another.ClosePrice) && DoubleUtility.Equals(SettlePrice, another.SettlePrice) && Volume == another.Volume && Position == another.Position); }
public bool ExistIn(DealerPositionInfo another) { if (null == another) { return(false); } string date1 = TransactionDate.ToString(GlobalDefinition.DateFormat, GlobalDefinition.FormatProvider); string date2 = another.TransactionDate.ToString(GlobalDefinition.DateFormat, GlobalDefinition.FormatProvider); bool result = date1.Equals(date2) && Commodity.Equals(another.Commodity) && Month.Equals(another.Month); string dealerList = ""; if (result) { switch (DealerInformationType) { case InformationType.VolumeInfo: dealerList = another.VolumeDealers; break; case InformationType.BuyInfo: dealerList = another.BuyDealers; break; case InformationType.SellInfo: dealerList = another.SellDealers; break; } string dealer; int amount; ExtractDealer(Rank, dealerList, out dealer, out amount); result = DealerName.Equals(dealer) && Amount == amount; } return(result); }
public override string ToString() { return($"{TransactionDate.ToString(Formats.DateFormat)} {MerchantName.PadRight(10)} {string.Format(Formats.DecimalFormat, Fee)}"); }
public override string ToString() { return(String.Format("{0,-10}{1,20}{2,25}{3,30}", TransactionDate.ToString("MM/dd/yyyy hh:mm:ss tt"), Action, ChangeInBalance.ToString("C"), CurrentBalance.ToString("C"))); //return $"{TransactionDate.ToString("MM/dd/yyyy hh:mm:ss tt")} {Action} {ChangeInBalance.ToString("C")} {CurrentBalance.ToString("C")}"; }