Esempio n. 1
0
        // Get /Admin/GetAdminInfo -- call by AdminModel.js through ajax
        public string GetAdminInfo(string AdminId)
        {
            // this would normally call a service to obtain the info.  But hard-coding it for now
            // to demo this GetAdminInfo() can be called by $ajax in AdminModel.js
            PLAdmin adminInfo = new PLAdmin();

            if (AdminId == "1")
            {
                adminInfo.FirstName = "Isaac";
                adminInfo.LastName  = "Chu";
            }
            else
            {
                // use wife's name
                adminInfo.FirstName = "Becky";
                adminInfo.LastName  = "Zhang";
            }
            string adminInfoJson = new JavaScriptSerializer().Serialize(adminInfo);

            return(adminInfoJson);
        }
Esempio n. 2
0
 public string UPdateAdminInfo(PLAdmin adminInfo)
 {
     return("Update admin info successfully");
 }