protected void Page_Load(object sender, EventArgs e)
        {
            BLL.ClientHelper clientHelper = new BLL.ClientHelper();
            if (Session["User"] != null)
            {
                LoggedInUser = Session["User"] as Entities.User;
                if (LoggedInUser != null)
                {
                    if (!IsPostBack)
                    {
                        NewDeseaseClient.DataSource     = clientHelper.GetClientList(LoggedInUser);
                        NewDeseaseClient.DataTextField  = "FirstName";
                        NewDeseaseClient.DataValueField = "BsnNumber";
                        NewDeseaseClient.DataBind();



                        NewDeseaseTherapist.Text = LoggedInUser.FirstName + " " + LoggedInUser.LastName;
                    }
                }
                else
                {
                    Response.Redirect("/SignIn");
                }
            }
            else
            {
                Response.Redirect("/SignIn");
            }
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BLL.ClientHelper clientHelper = new BLL.ClientHelper();
            if (Session["User"] != null)
            {
                LoggedInUser = Session["User"] as Entities.User;
                if (LoggedInUser != null)
                {
                    if (!IsPostBack)
                    {
                        UserFiles = null;
                        List <User> clients = new List <User>();
                        clients.Add(new User()
                        {
                            FirstName = "geen", ID = 0
                        });
                        var dbusers = clientHelper.GetClientList(LoggedInUser);
                        clients.AddRange(dbusers);
                        NewDeseaseClient.DataSource = clients;

                        NewDeseaseClient.DataTextField  = "FirstName";
                        NewDeseaseClient.DataValueField = "ID";
                        NewDeseaseClient.DataBind();

                        SortBy.Items.Add(new ListItem()
                        {
                            Text = "Datum aflopend", Value = File.Sortby.dateDESC.ToString()
                        });
                        SortBy.Items.Add(new ListItem()
                        {
                            Text = "Datum oplopend", Value = File.Sortby.dateASC.ToString()
                        });
                        SortBy.Items.Add(new ListItem()
                        {
                            Text = "Beschrijving aflopend", Value = File.Sortby.descDESC.ToString()
                        });
                        SortBy.Items.Add(new ListItem()
                        {
                            Text = "Beschrijving oplopend", Value = File.Sortby.descASC.ToString()
                        });
                    }
                }
                else
                {
                    Response.Redirect("/SignIn");
                }
            }
            else
            {
                Response.Redirect("/SignIn");
            }
        }