private async Task DeleteDebit(Guid debitId)
        {
            await DebitService.Delete(debitId);

            MessageBox.Show(Messages.DebitDeleted);
            await LoadDebitList();
        }
Пример #2
0
        public DebitServiceTests()
        {
            service = new DebitService(new PorticoConfig {
                SecretApiKey = "skapi_cert_MaePAQBr-1QAqjfckFC8FTbRTT120bVQUlfVOjgCBw"
            });

            card = new DebitTrackData {
                Value          = "<E1050711%B4012001000000016^VI TEST CREDIT^251200000000000000000000?|LO04K0WFOmdkDz0um+GwUkILL8ZZOP6Zc4rCpZ9+kg2T3JBT4AEOilWTI|+++++++Dbbn04ekG|11;4012001000000016=25120000000000000000?|1u2F/aEhbdoPixyAPGyIDv3gBfF|+++++++Dbbn04ekG|00|||/wECAQECAoFGAgEH2wYcShV78RZwb3NAc2VjdXJlZXhjaGFuZ2UubmV0PX50qfj4dt0lu9oFBESQQNkpoxEVpCW3ZKmoIV3T93zphPS3XKP4+DiVlM8VIOOmAuRrpzxNi0TN/DWXWSjUC8m/PI2dACGdl/hVJ/imfqIs68wYDnp8j0ZfgvM26MlnDbTVRrSx68Nzj2QAgpBCHcaBb/FZm9T7pfMr2Mlh2YcAt6gGG1i2bJgiEJn8IiSDX5M2ybzqRT86PCbKle/XCTwFFe1X|>",
                PinBlock       = "32539F50C245A6A93D123412324000AA",
                EncryptionData = EncryptionData.Version1()
            };
        }
        private async Task AddDebit()
        {
            DebitForAddDto debitForAddDto = new DebitForAddDto()
            {
                DateDebit   = dtpDateDebit.Value.Date,
                Description = txtDescription.Text,
                FixtureId   = _selectedFixtureId,
                UserId      = _selectedUserId
            };

            await DebitService.Add(debitForAddDto);

            MessageBox.Show(Messages.DebitAdded);
            await LoadDebitList();
        }
        private async Task LoadDebitList()
        {
            dgvObjectList.Rows.Clear();
            dgvObjectList.Refresh();
            ClearInputs();

            var debits = await DebitService.GetList();

            debits.ForEach(debitDto =>
            {
                string dateReturn = debitDto.Debit.IsReturn ? debitDto.Debit.DateReturn.ToShortDateString() : "-";
                dgvObjectList.Rows.Add(debitDto.Debit.Id, debitDto.Debit.Description, debitDto.FixtureName, debitDto.UserFullName, debitDto.DepartmentName, debitDto.Debit.DateDebit.Date, debitDto.Debit.IsReturn, dateReturn, debitDto.Debit.UpdatedAt, "Delete");
            });
            dgvObjectList.Sort(dgvObjectList.Columns[nameof(clmUpdatedAt)], System.ComponentModel.ListSortDirection.Descending);
        }
Пример #5
0
 public DebitController(DebitService debitService)
 {
     _debitService = debitService;
 }