public ActionResult AjaxTest(string email, string report) { string test = "test"; //string alreadyUrl = CheckSharedReport(email, report); //if (alreadyUrl != null) { // return PartialView((object)alreadyUrl); //} if (CheckShareTime(email) is true) { test = "generating"; Guid stamp = GenerateShareStamp(); ShareReport share = NewShare(stamp, email, report); WriteShareRecord(share); string url = "http://localhost:52013/AceReport/Show/" + report + "?sharestamp=" + stamp.ToString(); return(PartialView((object)url)); } else { test = "limited"; } return(PartialView((object)test)); }
public ShareReport NewShare(Guid stamp, string email, string reportname) { ShareReport share = new ShareReport(); share.Id = stamp; share.Email = email; share.ReportName = reportname; return(share); }
public void WriteShareRecord(ShareReport share) { db.ShareReports.Add(share); db.SaveChanges(); }