Guest User

Untitled

a guest
Jun 19th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. <authentication mode="Windows"/>
  2. <membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
  3. <providers>
  4. <add name="AspNetActiveDirectoryMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider,&#xA; System.Web, Version=2.0.3600.0, Culture=neutral,&#xA; PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ADConnString" connectionUsername="" connectionPassword=""/>
  5. </providers>
  6. </membership>
  7.  
  8. $("form#frmCurrentLineItems").submit(function() {
  9. submitView(this);
  10. return false;
  11. });
  12.  
  13. function submitView(form) {
  14. $.ajax(
  15. {
  16. type: form.method,
  17. url: form.action,
  18. data: $(form).serialize(),
  19. dataType: "html",
  20. error: function(error) {
  21. alert(error);
  22. }
  23. }
  24. );
  25. }
  26.  
  27. [AcceptVerbs(HttpVerbs.Post)]
  28. public ActionResult CurrentLineItems(FormCollection thisForm)
  29. // Get the forecast from the session
  30. BusinessLogic.ForecastBL thisForecast = (BusinessLogic.ForecastBL)HttpContext.Session["ForecastMetaData"];
  31.  
  32. if (thisForecast != null)
  33. {
  34. // Run the save to db stuff here
  35. return View("CurrentLineItems", ViewData["LineItemSummary"]);
  36. }
  37. else
  38. {
  39. return Redirect("../Shared/Error");
  40. }
  41.  
  42. [HandleError]
  43. [Authorize]
  44. public class ForecastController : Controller
  45. {
Add Comment
Please, Sign In to add comment