private void btn_Save_Click(object sender, EventArgs e) { TblUsers user = new TblUsers(); user.FirstName = firstNameTextBox.Text; user.LastName = lastNameTextBox.Text; user.UserName = userNameTextBox.Text; user.Password = passwordTextBox.Text; user.RegDate = DateTime.Now; usersService.AddRecord(user); this.DialogResult = DialogResult.OK; }