private void UpdateRecipientLabelContent() { Bill bill = (Bill)RecipientList.SelectedItem; Customer customer = UsersORM.GetCustomerByGuid(bill.CustomerId); int updatedBillBalance = BillORM.GetBillbyBillNumber(bill.BillNumber).Balance; RecipientLabel.Content = String.Format("Recipient: {0} {1} \nBalance: {2:n} Kč", customer.Name, customer.SurName, updatedBillBalance); }
private void SetDefaultSettings() { customer = UsersORM.GetCustomerByGuid(activeBill.CustomerId); address = UsersORM.SelectAddressById(customer.Address.Id); BillNumberLabel.Content = activeBill.BillNumber; string partialSSN = customer.SSN.Substring(0, 6) + "XXXX"; UserInfo1.Content = String.Format("Name: {0} {1}, SSN: {2}", customer.SurName, customer.Name, partialSSN); UserInfo2.Content = String.Format("Address: {0}", address.ToString()); UserInfo3.Content = String.Format("Contact: {0}, {1}", customer.Phone, customer.Mail); BillInfo1.Content = String.Format("Bill Number: {0}", activeBill.BillNumber); BillInfo2.Content = String.Format("Balance: {0:n} Kč", activeBill.Balance); AllPaymentsRadioButton.IsChecked = true; NewestToOldest.IsChecked = true; GetAllTransactionBySelectedCriterias(); }