/// <summary> /// Saving into Elastic /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSave_Click(object sender, EventArgs e) { try { //TODO Validation DTO.Customer entity = new DTO.Customer(); entity.Age = int.Parse(nudAge.Value.ToString()); entity.Birthday = dtpBirthday.Value.ToString(DTO.Constants.BASIC_DATE); entity.EnrollmentFee = double.Parse(mskEnrollmentFee.Text); entity.HasChildren = bool.Parse(cboHasChildren.Text); entity.Name = txtName.Text; entity.Opinion = txtOpnion.Text; entity.Id = int.Parse(mskId.Text); if (_customerBll.Index(entity)) { MessageBox.Show("Index saved!", "Ok", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }