protected void Page_Load(object sender, EventArgs e) { var user = Session["User"] as Entities.User; if (user != null) { TherapyCards.InnerHtml = ""; var resultTherapies = DBTherapy.GetAll(user); foreach (var item in resultTherapies) { try { string MedDescription = string.Empty; if (item.Medication != null) { MedDescription = item.Medication.FirstOrDefault().Description; } string DesDescription = string.Empty; if (item.Deseases != null) { DesDescription = item.Deseases.FirstOrDefault().Description; } TherapyCards.InnerHtml += "<div class='card-small'>" + "<div class='card-small-title'>" + (item.date.ToString("dd-MM-yyyy") ?? "") + "</div><hr/>" + (item.description ?? "") + "<br/>" + (item.Location ?? "") + "<br/>Kosten:" + (item.CostsInEuro) + "<hr/>Behandeld door: " + (item.therapistLastName ?? "") + "<br />Aandoening: " + (DesDescription ?? "") + "<br />Medicatie: " + (MedDescription ?? "") + "</div>"; } catch (Exception ex) { } } } }
protected void Page_Load(object sender, EventArgs e) { var user = Session["User"] as Entities.User; if (user != null) { if (!IsPostBack) { therapies = DBTherapyConnection.GetAll(user) ?? throw new Exception("DBTherapyConnection.GetAll()->null exception"); TherapiesGrid.DataSource = therapies; TherapiesGrid.DataBind(); FilterTherapyClient.DataSource = clientHelper.GetClientList(user) ?? throw new Exception("clientHelper.GetClientList()->null exception"); FilterTherapyClient.DataTextField = "FirstName"; FilterTherapyClient.DataValueField = "BsnNumber"; FilterTherapyClient.DataBind(); Filtername_date.InnerHtml = ""; Messaging.InnerHtml = ""; string woonplaats = "nieuw-lekkerland"; DAL.DBDeseaseConnection dBDeseaseConnection = new DAL.DBDeseaseConnection(); } } }