private void chrgtxt_TextChanged(object sender, EventArgs e) { string s = chrgtxt.Text; if (string.IsNullOrEmpty(s)) { s = "0"; } slr.ChargesPerHrs = int.Parse(s); totaltxt.Text = slr.CalculateTotal().ToString(); paybtn.Enabled = true; }