//public class Audit //{ // public string HostName { get; set; } // public string IpAddress { get; set; } // public string PcName { get; set; } // public string Browser { get; set; } //} //private AuditLog GetAuditLog(HttpRequestBase request) //{ // AuditLog audit = new AuditLog(); // string PCName = Dns.GetHostEntry(Request.ServerVariables["REMOTE_ADDR"]).HostName; //// var userAgent = Request.Headers["User-Agent"]; // if (Request.UserAgent != null) // { // string strUserAgent = Request.UserAgent.ToString().ToLower(); // string browser = Request.Browser.Browser; // audit.Browser = browser; // } // string ip = Request.UserHostAddress; // audit.IpAddress = ip; // audit.PcName = PCName; // return audit; //} public ActionResult SendMessae(Message aObj) { // AuditManager.AuditOperation(); AuditManager.AuditOperation("Send Message"); // var xx = Request.ServerVariables["REMOTE_ADDR"]; //var audit = GetAuditLog(Request); var audit = AuditManager.GetAuditLog(); // string PCName2 = Dns.GetHostEntry(Request.ServerVariables["REMOTE_ADDR"]).HostName; if (_aManager.CheckTodaysQuotaForMessage(audit)) { String returnMessage = "Sorry! Your per day message sending limit are over"; if (audit != null) { returnMessage += ", for your IP" + audit.IpAddress + " and PC Name" + audit.PcName; } return(Json(new { success = false, Message = returnMessage }, JsonRequestBehavior.AllowGet)); } aObj.Ip = audit.IpAddress; aObj.PcName = audit.PcName;// + "--" + PCName2; aObj.Browser = audit.Browser; var aData = _aManager.SendMessae(aObj); return(Json(aData, JsonRequestBehavior.AllowGet)); }
public ActionResult ValidateUserLogin(string loginId, string password) { var selectedUser = _db.Users.FirstOrDefault(a => a.UserName == loginId && a.Password == password); if (selectedUser != null) { Session["CurrentUser"] = selectedUser; //return View("~/Areas/Inventory/Views/Asset/Assets.cshtml"); //return Redirect("http://localhost:22223/"); // return RedirectToAction("index", "Home"); return(Json(Url.Action("Index", "Cms"))); } AuditManager.AuditOperation("Incorrect User Id or Password", true); return(Json(false, JsonRequestBehavior.AllowGet)); //else //{ // dynamic myDynamic = new System.Dynamic.ExpandoObject(); // myDynamic.response = false; // myDynamic.msg = "Please Validate user id and password"; // // return myDynamic; // return Json(myDynamic, JsonRequestBehavior.AllowGet); //} }
public ActionResult GetNextPreviousPortfolio(int flag) { try { AuditManager.AuditOperation("Profile"); int portfolioId = (int)Session["portfolioId"]; var newPortfolioId = _aManager.GetNextPreviousPortfolio(portfolioId, flag); if (newPortfolioId > 0) { Session["portfolioId"] = newPortfolioId; var data = _aManager.GetPortfolioDataFromSeverSession(newPortfolioId); return(Json(new { data = data.Data }, JsonRequestBehavior.AllowGet)); } return(Json(new { resoponse = false }, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(null); } }
public ActionResult GetPortfolioDataDetails(int portfolioId) { AuditManager.AuditOperation("Profile"); Session["portfolioId"] = portfolioId; return(View("~/Views/SinglePage/PortfolioDetails.cshtml")); }
public ActionResult PortfolioList() { AuditManager.AuditOperation("PortfolioList"); return(View("~/Views/LandingPage/_PortfolioList.cshtml")); }
public ActionResult Index() { AuditManager.AuditOperation("Landing Page"); return(View()); }
public ActionResult BlogDetails(int blogId) { AuditManager.AuditOperation("Blog"); Session["blogId"] = blogId; return(View("~/Views/SinglePage/BlogDetails.cshtml")); }
// //GET: /Blogs/ public ActionResult Index() { AuditManager.AuditOperation("Blog List"); return(View()); }