﻿function AddClient() {
    var webMethod = "/Photosesia/WebService.asmx/AddClient";
    var parameters = "{'email':'" + $("#inEmailFirst").val() + "','session':'" + $("#divSession").html() + "'}";
    
    $.ajax({
        type: "POST",
        url: webMethod,
        data: parameters,
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(msg) {
            $("#divContent").show("slow");
            $("#divEmail").css("display", "none");
            $("#ctl00_ContentPlaceHolder1_tbMail").val($("#inEmailFirst").val());
        }
    });
}

function GetGrid() {
    var webMethod = "/Photosesia/WebService.asmx/GetGV";
    var parameters = "{}";

    $.ajax({
        type: "POST",
        url: webMethod,
        data: parameters,
        beforeSend: function(xhr) {
      xhr.setRequestHeader("Content-type", 
                           "application/json; charset=utf-8");
    },
        dataType: "json",
        success: function(msg) {
            $("#divGrid").html(msg.d);
        }
    });
}
