Example #1
0
        private async void AddData()
        {
            Author author = new Author();

            author.FullName = txtFullName.Text;
            author.Address  = txtAddress.Text;

            bool x = await _authorRepository.AddNewAuthorAsync(author);

            if (x)
            {
                XtraMessageBox.Show("Add New successfully !", "Success", MessageBoxButtons.OK);
                LoadDataToGridView();
            }
            else
            {
                XtraMessageBox.Show("Add New failed (not null)!", "Fail", MessageBoxButtons.OK);
            }
        }