Skip to content

Instantly share code, notes, and snippets.

@A2H111
Created July 2, 2017 03:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save A2H111/f3315467aead6983fde5aeb5e0f3529e to your computer and use it in GitHub Desktop.
Save A2H111/f3315467aead6983fde5aeb5e0f3529e to your computer and use it in GitHub Desktop.
$scope.AddCustomer = function () {
//Assign the updated value to Customer object
$scope.Customer.customerID = $scope.txtCustomerNameVal;
$scope.Customer.companyName = $scope.txtCompanyNameVal;
$scope.Customer.contactName = $scope.txtContactNameVal;
$scope.Customer.contactTitle = $scope.txtContactTitleVal;
//Call the factory function to insert the customer
CustomerService.AddCustomer($scope).then(function (d) {
alert(d.data);
}, function (d) {
alert(d);
});
//calling the function to close the modal popup
$scope.closeModalWindow();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment