Пример #1
0
        public JsonResult GetValidSapId(string SAPID)
        {
            string userkey   = ConfigurationManager.AppSettings["userkey"];
            string uid       = ConfigurationManager.AppSettings["uid"];
            string LoginUser = (string)Session["LoginSAPID"];

            try
            {
                string ipaddress   = Request.UserHostAddress;
                string BrowserUsed = Request.UserAgent;

                Employer.Employer employer = new Employer.Employer();
                var validDetails           = employer.ADAuth(SAPID, BrowserUsed, ipaddress, "", userkey, uid);
                var sapDetails             = validDetails.Split('~');
                return(Json(new { data = sapDetails }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                LogError logerror = new LogError();
                logerror.ErrorLog("", LoginUser, "", "Admin/GetValidSapId", "Admin", "GetValidSapId", "ADAuth Error", ex.Message.ToString(), 0);
                throw new Exception(ex.Message.ToString());
            }
        }