public void addEmployee() { Employee emp = new Employee(); emp.First_name = firstNameText.Text; emp.Last_name = lastNameText.Text; emp.Username = usernameText.Text; emp.Password = passwordText.Text; emp.Dob = Convert.ToDateTime(dobText.Text); emp.Mobile = mobileText.Text; emp.Email = emailText.Text; emp.Admin = Convert.ToBoolean(adminText.Text); emp.Status = statusText.Text; emp.Remark = remarkText.Text; InsertSQL add = new InsertSQL(); int editrecord = add.addNewEmployee(emp); MessageBox.Show(" Your seccusful"); this.Close(); }