Insert Gridview data to database using Anjularjs and Web API
I have Created an Approval screen using AnjularJS and Web API,The Entire functionility i have implemented
Issue: I have gridview with checkbox having 4 to 5 records i want to insert these records to database on clicking submit button data is not inserting.
Anjular Js Code :
$scope.SendData = function (ddlclient) {
//var GetSelectedPaymentDetails = new Object();
var GetAll = [];
for (var i = 1; i < $scope.ChequeDetails.PaymentID.length; i++) {
GetAll.push({
LoginID: Loginid,
ClientID: ddlclient,
PaymentID: $scope.ChequeDetails.PaymentID[i]
});
}
$http({
headers: { 'Content-Type': 'application/json' },
method: 'Post',
url: mainurlpath + 'ChequeReIssue/ChequeReIssueInsertion',
data: JSON.stringify(GetAll)
}).then(
/* success function */
function (responce) {
var data = responce.data;
// alert(data[0]);
succesAlert(data[0])
}
);
}