private void txtMarriedDate_Leave(object sender, EventArgs e) { if (familyId == -1) { familyId = DBAccessStatic.InsertFamily(husbandId, wifeId, txtMarriedDate.Text, txtMariedPlace.Text); } else { DBAccessStatic.UpdateFamilyMarriageDate(familyId, txtMarriedDate.Text); } }