public void clearAll() { formBay.Source = birthCertificate.Source = studentImage.Source = null; totalKids.Text = ""; StudentNameText.Clear(); PlaceOfBirthText.Clear(); FirstLanguageText.Clear(); FatherNameText.Clear(); FatherCNICText.Clear(); MotherNameText.Clear(); MotherCNICText.Clear(); HomeAddressText.Clear(); PhoneText.Clear(); EmergencyText.Clear(); MobileText.Clear(); FatherOccupationText.Clear(); FatherDesignation.Clear(); FatherAdress.Clear(); MotherOccupationText.Clear(); MotherDesignation.Clear(); MotherAddress.Clear(); GuardianNameText.Clear(); RelationText.Clear(); GuardianAddress.Clear(); PreviousSchoolText.Clear(); FromToText.Clear(); ReasonText.Clear(); }
private void MotherCNICText_KeyUp(object sender, KeyEventArgs e) { if (MotherCNICText.Text.Length == 5) { MotherCNICText.AppendText("-"); MotherCNICText.Focus(); //MotherCNICText.SelectionStart = MotherCNICText.Text.Length; MotherCNICText.CaretIndex = MotherCNICText.Text.Length; } else if (MotherCNICText.Text.Length == 13) { MotherCNICText.AppendText("-"); MotherCNICText.Focus(); //MotherCNICText.SelectionStart = MotherCNICText.Text.Length; MotherCNICText.CaretIndex = MotherCNICText.Text.Length; } }