title: Button type button posting data is not saving in DB
body: <p>i added on message Box and i am posting that data but not adding in my DB.</p>
  
  <p>when i am trying to click Confirm button it is not saving in data-base how it will save to data-base can you please help me.</p>
  
  <p><a href="https://i.stack.imgur.com/iNBzZ.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <pre><code>var leaveManagement= {
      leaveData: null,
      showModal: function(data) {
          leaveManagement.leaveData = data;
          $('#adminComment').val("");
          $('#IsPaidLeave').prop('checked', false);
          if ($(data).val() === "Reject") {
              $(".form-check").hide();
          } else {
              var leaveTypeId = $(leaveManagement.leaveData).attr('data-leaveTypeId');
              var userId = $(leaveManagement.leaveData).attr('data-employeeId');
  
              if (leaveTypeId !== "" &amp;&amp; leaveTypeId !== null &amp;&amp; userId !== "" &amp;&amp; userId !== null) {
                  $.ajax({
                      url: "/PayRoll/Leave/GetEmployeeLeaveTypeCount?employeeId=" +userId+"&amp;leaveTypeId=" +leaveTypeId,
                      type: 'GET',
                      async: false,
                      contentType: 'application/json; charset=utf-8',
                      success: function (data) {
                       $('#leaveCount').html('&lt;span class="badge badge-outline badge-primary"&gt;Remaining Leave : '+data+'&lt;/span&gt;');
                      },
                      error: function (e) {
  
                      }
                  });
              }
              $(".form-check").show();
          }
          $('#showCommentModal').modal('show');
      },
      changeRequest: function () {
          if (leaveManagement.leaveData !== null) {
          debugger;
              var leaveId;
              if ($(leaveManagement.leaveData).val() === "Approve") {
                  leaveId = $(leaveManagement.leaveData).attr('data-id');
                  leaveManagement.processRequest(leaveId, true, false);
              } else if ($(leaveManagement.leaveData).val() === "Reject") {
                  leaveId = $(leaveManagement.leaveData).attr('data-id');
                  leaveManagement.processRequest(leaveId, false, true);
              }
  
          }
      },
      processRequest: function(leaveId, isApproved, isRejected) {
          var comment = $('#adminComment').val();
          var isPaidLeave = $('#IsPaidLeave').prop('checked');
          $.ajax({
              url: "/PayRoll/Leave/RespondToLeaveRequest/?leaveId=" +
                  leaveId +
                  "&amp;isApproved=" +
                  isApproved +
                  "&amp;IsRejected=" +
                  isRejected +
                  "&amp;comment=" +
                  comment +
                  "&amp;isPaidLeave=" +
                  isPaidLeave,
              type: "POST",
              async: false,
              contentType: "application/json; charset=utf-8",
              success: function (data) {
                  if (!data.success) {
                      $.notify(data.ResponseText, { position: "top right", className: "success" });
                  } else {
                      $.notify('Updated', { position: "top right", className: "success" });
                  }
                  $("#OpenLeaveRequestGrid").data('kendoGrid').dataSource.read();
                  $("#ClosedLeaveRequestGrid").data('kendoGrid').dataSource.read();
                  $('#adminComment').val("");
                  $('#IsPaidLeave').prop('checked', false);
                  $('#IsPaid').prop('checked', false);
              },
              error: function(data) {
                  console.log(data);
                  $.notify('Error', { position: "top right", className: "error" });
              }
          });
      },
  </code></pre>
  
  <p>this is the button where if i click this button its should be save my comment data.</p>
  
  <pre><code>div class="modal-footer"&gt;
                  &lt;button type="button" class="btn btn-warning" onclick="leaveManagement.changeRequest(this);" data-dismiss="modal" value="Confirm" id="bntconfirm"&gt;Confirm&lt;/button&gt;@*&lt;span class="fa fa-check"&gt; Confirm&lt;/span&gt;*@
              &lt;/div&gt;
  </code></pre>
  
  <p>this is the box where am writing comment.</p>