protected void LoadData(BackFamily pmr) { if (pmr != null) { RadEditor1.Content = pmr.Content; } }
protected void UnloadData(BackFamily pmr) { if (pmr == null) { pmr = new BackFamily(); 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); bckf = patient.BackFamilies.FirstOrDefault<BackFamily>(); // we load RadEditor with content LoadData(bckf); } else { // What will it happen here? } }