Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _messageSender = (Person)Session["CurrentUser"];
            if (!IsPostBack)
            {
                var toList = new List <string>();

                if (_messageSender is Teacher)
                {
                    toList.Add("ילד ספציפי");
                    toList.Add("כל ילדי הגן");
                    toList.Add("מפקחת");
                }
                if (_messageSender is Supervisor)
                {
                    toList.Add("גננת");
                    toList.Add("ילדי המחוז");
                    toList.Add("גננות המחוז");
                }

                Who.DataSource   = toList;
                Who.AutoPostBack = true;
                Who.DataBind();
                if (_messageSender is Child)
                {
                    Who.Visible      = false;
                    WhoLable.Visible = true;
                }
            }
        }