Ejemplo n.º 1
0
        public void UpdatePlan()
        {
            u.DietPlans = new DietPlanMapper().SelectUserDietPlans(u.Userid, Calendar.SelectedDate.Date);

            DietPlan.DataSource     = u.DietPlans;
            DietPlan.DataValueField = "Dpid";
            DietPlan.DataTextField  = "Showcase";
            Macros.Text             = u.UserMakros();
            DietPlan.DataBind();
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = (int)Session["LoggedId"];

            u = new UsersMapper().Select(id);

            if (!IsPostBack)
            {
                ConsumablesChoice.DataSource     = new ConsumablesMapper().Select();
                ConsumablesChoice.DataValueField = "Cid";
                ConsumablesChoice.DataTextField  = "Name";
                ConsumablesChoice.DataBind();

                u.DietPlans = new DietPlanMapper().SelectUserDietPlans(u.Userid, DateTime.Today.Date); //today

                DietPlan.DataSource = u.DietPlans;
                //DietPlan.DataValueField = "Value";
                DietPlan.DataValueField = "Dpid";
                DietPlan.DataTextField  = "Showcase";
                Macros.Text             = u.UserMakros();
                DietPlan.DataBind();
            }
        }