Exemple #1
0
        private async Task Load_Datagridview2_Data_By_Date()
        {
            try
            {
                pbxCreditDeposit.Visible = true;
                DateTime dt    = Convert.ToDateTime(dtpCreditDeposit.Value);
                String   s1    = dt.ToString("yyyy-MM-dd");
                DateTime dtnew = Convert.ToDateTime(s1);

                var source = new BindingSource();
                source.DataSource = await _borrowRepository.GetAllDepositedByDate(dtnew);

                dgvBorrowingBalance.AutoGenerateColumns        = true;
                dgvCreditDeposit.DataSource                    = source;
                dgvCreditDeposit.Columns["Id"].Visible         = false;
                dgvCreditDeposit.Columns["IsReturned"].Visible = false;
                pbxCreditDeposit.Visible = false;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }