예제 #1
0
        private IsOrderAlreadyInPaymentsResponse IsOrderAlreadyInPayments()
        {
            foreach (DataGridViewRow dgvOrdersSelectedRow in dgvOrders.SelectedRows)
            {
                if (_paymentsService.CheckPaymentsList((int)dgvOrdersSelectedRow.Cells[0].Value))
                {
                    return new IsOrderAlreadyInPaymentsResponse {
                               IsOrderAlreadyInPayments = true,
                               OrderId = (int)dgvOrdersSelectedRow.Cells[0].Value
                    }
                }
                ;
            }

            return(new IsOrderAlreadyInPaymentsResponse {
                IsOrderAlreadyInPayments = false
            });
        }