protected void LoadData(BackPersonal pmr)
 {
     if (pmr != null)
     {
         RadEditor1.Content = pmr.Content;
     }
 }
 protected void UnloadData(BackPersonal pmr)
 {
     if (pmr == null)
     {
         pmr = new BackPersonal();
         pmr.Patient = patient;
         ctx.Add(pmr);
         ctx.SaveChanges();
     }
     pmr.Content = RadEditor1.Content;
     ctx.SaveChanges();
     RadWindowManager1.RadConfirm(Resources.GeneralResource.DataStoredOk, "noHaceNada()", null, null, null, Resources.GeneralResource.Warning);
 }
 protected void Page_Init(object sender, EventArgs e)
 {
     ctx = new AriClinicContext("AriClinicContext");
     // security control, it must be a user logged
     if (Session["User"] == null)
         Response.Redirect("Default.aspx");
     else
     {
     }
     if (Request.QueryString["PatientId"] != null)
     {
         patient = CntAriCli.GetPatient(int.Parse(Request.QueryString["PatientId"]), ctx);
         bckp = patient.BackPersonals.FirstOrDefault<BackPersonal>();
         // we load RadEditor with content
         LoadData(bckp);
     }
     else
     {
        // What will it happen here?
     }
 }