private void SubmitPayment() { ParentInfoDB parentInfoDB = new ParentInfoDB(); Double num; if (Double.TryParse(txt_PaymentAmount.Text, out num)) { if (num.ToString().Contains('.')) { if (num.ToString().Split('.')[1].Length < 3) { parentInfoDB.UpdateCurBalance(this.guardianID, num); this.callingWindow.UpdateCurDue(this.guardianID); this.Close(); } else { MessageBox.Show("You must enter a valid dollar number in the Payment Amount box."); } } else { parentInfoDB.UpdateCurBalance(this.guardianID, num); this.callingWindow.UpdateCurDue(this.guardianID); this.Close(); } } else { MessageBox.Show("You must enter a valid dollar number in the Payment Amount box."); } }
private void InitializeCurrentBalance() { ParentInfoDB parentInfoDB = new ParentInfoDB(); lbl_CurrentBalance.Content += " " + parentInfoDB.GetCurrentDue(guardianID); }