1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| var Prenom = $('#' + '<%= txtPrenom.ClientID %>').val()
var MotDePasse = $('#' + '<%= txtPassword.ClientID %>').val()
var EstActif = $('#' + '<%= chkEstActif.ClientID %>').is(':checked');
var EstAdmTot = $('#' + '<%= chkadmtotal.ClientID %>').is(':checked');
var EstAdmSoc = $('#' + '<%= chkAdmSoc.ClientID %>').is(':checked');
var EstModArt = $('#' + '<%= chkModifArt.ClientID %>').is(':checked');
var myData = {};
myData.Nom = Nom;
myData.Prenom = Prenom;
myData.Email = Mail;
myData.MotDePasse = MotDePasse;
myData.EstActif = EstActif;
myData.EstAdmTot = EstAdmTot;
myData.EstAdmSoc = EstAdmSoc;
myData.EstModArt = EstModArt;
myData.PageEnCours = document.location.href;
$.ajax({
type: "POST",
url: "Edit_Personne.aspx/EnrPerson",
data: "{MesDonnees:" + JSON.stringify(myData) + "}",
contentType: 'application/json; charset=utf-8',
dataType: "json",
success: function (msg) {
AfficheMsgRetour(msg.d)
},
error: function () {
var Ret = new function () {
this.Reussi = false;
this.Msg = "Erreur accès validation";
}
AfficheMsgRetour(Ret)
}
}); |