Advertisement
Guest User

Untitled

a guest
Jun 12th, 2012
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.17 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. using System.Net.Mail;
  8.  
  9. using MPads.Common;
  10. using MPads.WebPatientPortal.Interfaces;
  11. using MPads.WebPatientPortal.Presenters;
  12. using MPads.BusinessLogic.Interfaces;
  13. using MPads.Components.Interfaces;
  14. using MPads.DataAccess;
  15.  
  16. using MPads.DataAccess.Interfaces;
  17. using System.Text;
  18. using System.Diagnostics;
  19.  
  20.  
  21. namespace MPads.WebPatientPortal
  22. {
  23.     public partial class Default : System.Web.UI.Page, IDefault
  24.     {
  25.  
  26.  
  27.         private DefaultPresenter _presenter;
  28.  
  29.         protected void Page_Load(object sender, EventArgs e)
  30.         {
  31.             _presenter = new DefaultPresenter();
  32.             _presenter.Init(this);
  33.  
  34.             var fields = Request.QueryString;
  35.  
  36.             if (fields.Count > 0)
  37.             {
  38.                 Trace.Write("Number of fields = " + fields.Count.ToString());
  39.  
  40.                 var passed_patientId = Utilities.GetNvpValue(fields, "patientId");
  41.                 var loadInPage = Utilities.GetNvpValue(fields, "loadInPage");
  42.  
  43.                 Trace.Write("Page to load = " + loadInPage);
  44.  
  45.                 Patient cached_patient = (Patient)Session["patient"];
  46.                 if (cached_patient.PatientId == new Guid(passed_patientId))
  47.                 {
  48.                     Trace.Write("Session matched the supplied GUID!");
  49.                     JavascriptTest();
  50.                 }
  51.                 else
  52.                 {
  53.                     Trace.Write("No Session for this guid!");
  54.                 }
  55.  
  56.  
  57.             }
  58.  
  59.  
  60.         }
  61.  
  62.  
  63.  
  64.         public void LoadContent(string url)
  65.         {
  66.  
  67.  
  68.             Page.RegisterStartupScript("myScript", "loadAjaxContent('Login','POST',null); $('#pannel1').hide();$('#pannel2').hide();$('#pannel3').hide();");
  69.  
  70.  
  71.  
  72.         }
  73.  
  74.         public void JavascriptTest()
  75.         {
  76.  
  77.             string funcCall = "<script language='javascript'>alert('ALERT !!');</script>";
  78.             ClientScript.RegisterStartupScript(this.GetType(), "JSScript", funcCall);
  79.  
  80.         }
  81.  
  82.         public void DisplayMessage(string message)
  83.         {
  84.         }
  85.  
  86.  
  87.  
  88.     }
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement