I am creating a windows application showing name date of birth and number of heartbeats from date of birth to a particular targetdate. My program is showing name and date of birth but i cannot get the program to work out the calculations. i have declared the variables at the top as beats per day and beats per week etc, i was wondering if anyone can help me as on how to get the program to calculate all these values once the enter button is pressed? here is my code, many thanks
Expand|Select|Wrap|Line Numbers
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace q3
- {
- public partial class Form1 : Form
- {
- int bpd;
- int bpw;
- int bpm;
- int bpy;
- int bted;
- int enb;
- public Form1()
- {
- InitializeComponent();
- }
- private void btnenter_Click(object sender, EventArgs e)
- {
- bpd = 70 * 23;
- bpw = 1680 * 5;
- bpm = 11760 * 6;
- bpy = 47040 * 13;
- bted = 564480 * 39;
- enb = 22456560 + 16800;
- }
- private void txtheartbeats_TextChanged(object sender, EventArgs e)
- {
- txtheartbeats.Text = "enb";
- }
- private void txtname_TextChanged(object sender, EventArgs e)
- {
- txtname.Text = "John Smith";
- }
- private void txtDob_TextChanged(object sender, EventArgs e)
- {
- txtDob.Text = "05/10/1990";
- }
- private void txtTargetdate_TextChanged(object sender, EventArgs e)
- {
- txtTargetdate.Text = "11/10/2020";
- }
- }
- }