コード例 #1
0
 private static string GetDetailsString(Transaction transaction)
 {
     if (transaction.IsInbound) {
         return transaction.Sender.ToString();
     } else {
         return transaction.Receiver.ToString ();
     }
 }
コード例 #2
0
ファイル: FinancerModel.cs プロジェクト: nirinchev/Financer
 public static int AddOrUpdate(Transaction transaction)
 {
     if (transaction.Id == 0) {
         return DB.Insert (transaction);
     } else {
         return DB.Update (transaction);
     }
 }
コード例 #3
0
        public void UpdateCell(Transaction transaction)
        {
            if (transaction == null) {
                return;
            }

            this.DirectionImage.Image = GetDirectionImage(transaction);
            this.DescriptionLabel.Text = transaction.Description;
            this.AmountLabel.Text = transaction.Amount.ToString ("0.00") + " лв.";
            this.AmountLabel.TextColor = GetAmountColor (transaction);
            this.DetailsLabel.Text = GetDetailsString (transaction);
        }
コード例 #4
0
 private static UIImage GetDirectionImage(Transaction transaction)
 {
     return null;
 }
コード例 #5
0
 private static UIColor GetAmountColor(Transaction transaction)
 {
     return transaction.IsInbound ? Sys.GreenColor : Sys.RedColor;
 }
コード例 #6
0
        private void SetupTableView()
        {
            if (this.Person == null) {
                return;
            }

            this.transactions = FinancerModel.GetTransactions ().Where (t => t.ReceiverId == this.Person.Id || t.SenderId == this.Person.Id).ToTransactionDictionary ();
            this.transactionsSource = new TransactionsSource (this.transactions);
            this.transactionsSource.Callback = (transaction) => {
                this.selectedTransaction = transaction as Transaction;
                this.PerformSegue(App.OldSegueIdentifier, this);
            };
            this.TransactionsTableView.Source = this.transactionsSource;
        }
コード例 #7
0
ファイル: FinancerModel.cs プロジェクト: nirinchev/Financer
 public static int Delete(Transaction transaction)
 {
     return DB.Delete (transaction);
 }