Esempio n. 1
0
 protected override void OnAddInvoice(object obj)
 {
     PaymentNotice = new PaymentNoticeDTO
     {
         PaymentNoticeId = RandomHelper.Next(),
         CreateDate = DateTime.Now,
         DeadLine = DateTime.Now,
         Status = 0,
     };
     var firstOrDefault = Suppliers.FirstOrDefault();
     if (firstOrDefault != null)
     {
         PaymentNotice.SupplierId = firstOrDefault.SupplierId;
         var bankAccount = firstOrDefault.BankAccounts.FirstOrDefault();
         if (bankAccount != null)
         {
             PaymentNotice.BankAccountName = bankAccount.Account + "/" + bankAccount.Bank + bankAccount.Branch;
             PaymentNotice.BankAccountId = bankAccount.BankAccountId;
         }
     }
     var currencyDto = Currencies.FirstOrDefault();
     if (currencyDto != null) PaymentNotice.CurrencyId = currencyDto.Id;
     PaymentNotices.AddNew(PaymentNotice);
 }
Esempio n. 2
0
 public void InitData(PaymentNoticeDTO paymentNotice)
 {
     _paymentNotice = paymentNotice;
     Currencies.Load(true);
     Suppliers.Load(true);
     _supplierFilter.Value = paymentNotice.SupplierId;
     Invoices.Load(true);
 }