private void CreateEntry_Click(object sender, EventArgs e)
        {
            DonationsController dc = new DonationsController();

            dc.RegisterDonation(textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text);
            Donation D = new Donation();

            this.Hide();
            D.Show();
        }
Example #2
0
        public void ItAcceptsDonationsService()
        {
            // Arrange
            var donationsService = Substitute.For <IDonationService>();

            // Act
            var controller = new DonationsController(donationsService);

            // Assert
            controller.Should().NotBeNull();
        }
        private void UpdateDonation_Load(object sender, EventArgs e)
        {
            Donations D = new Donations();

            dc            = new DonationsController();
            D             = dc.GetDonationsByID(ID);
            textBox5.Text = D.Sno.ToString();
            textBox1.Text = D.Name;
            textBox2.Text = D.Amount;
            textBox3.Text = D.Branch;
            textBox4.Text = D.UsedFor;
        }
Example #4
0
 private void Donation_Load(object sender, EventArgs e)
 {
     dc = new DonationsController();
     dataGridView1.DataSource = dc.GetDonation().Tables[0];
 }
Example #5
0
 public GetTests()
 {
     _donationService = Substitute.For <IDonationService>();
     _donationService.GetAll().Returns(new List <Donation>());
     _sut = new DonationsController(_donationService);
 }