function GetConfirmMedicine() {
var PharmacyProductList = new Array();
var medObj = JSON.parse(localStorage.getItem("phrmacyCart"));
for (var i = 0; i < medObj.length; i++) {
PharmacyProductList.push({
ProductID: medObj[i].ProductID,
ProductTitle: medObj[i].ProductTitle,
Quantity: medObj[i].Quantity,
TotalPrice: medObj[i].MedicinTotalPrice
});
}
model = {
FullName: $('#FullNametxt').val(),
ContactNumber: $('#ContactNumbertxt').val(),
Address: $('#Addresstxt').val(),
// ImagePhath: $('#uploadFiletxxt')[0],
PharmacyProductList: PharmacyProductList
};
return model;
}
function ConfirmOrder() {
var file = $('#uploadFiletxxt')[0];
var data = GetConfirmMedicine();
//var data = JSON.stringify({ 'model': model });
$.ajax({
type: 'POST',
url: baseUrl + 'Home/PostPharmcyData',
data: { imagePath: file, model: data },
//contentType: 'application/json; charset=utf-8',
//dataType: 'json',
//contentType: false,
//processData: false,
success: function (response) {
}
})
}
[HttpPost]
public ActionResult PostPharmcyData(HttpPostedFileBase[] imagePath, PharmacyViewModel model)
}