Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        GetAlleNyheder();

        Repeater_AsideTilbud.DataSource = db.Tilbuds.Take(3);
        Repeater_AsideTilbud.DataBind();
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Repeater_KontaktOplysninger.DataSource = db.Kontakts;
        Repeater_KontaktOplysninger.DataBind();

        Repeater_AsideTilbud.DataSource = db.Tilbuds.Take(3);
        Repeater_AsideTilbud.DataBind();
    }
Example #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Repeater_Forside.DataSource = db.Forsides;
        Repeater_Forside.DataBind();


        DateTime date = DateTime.Now.Date;

        var result = from x in db.Tilbuds where x.SlutDato >= date && x.StartDato <= date select x;

        Repeater_AsideTilbud.DataSource = result.ToList();
        Repeater_AsideTilbud.DataBind();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Repeater_Maerke.DataSource = db.Maerkes.Where(m => m.Fk_KategoriId.Equals(2));
        Repeater_Maerke.DataBind();

        Repeater_AsideTilbud.DataSource = db.Tilbuds.Take(3);
        Repeater_AsideTilbud.DataBind();

        if (Request.QueryString["maerke_id"] != null)
        {
            Panel_MaerkeVaelg.Visible = false;
            PanelEnkeltMaerke.Visible = true;

            var querystring = Request.QueryString["maerke_id"];



            ListView_EnkeltMaerke.DataSource = db.Vares.Where(v => v.Fk_MaerkeId.Equals(querystring));
            ListView_EnkeltMaerke.DataBind();

            Repeater_MaerkeBeskrivelse.DataSource = db.Maerkes.Where(m => m.M_Id.Equals(querystring));
            Repeater_MaerkeBeskrivelse.DataBind();
        }
        if (Request.QueryString["vare_id"] != null)
        {
            Panel_MaerkeVaelg.Visible = false;
            Panel_EnkeltVare.Visible  = true;
            var querystring = Request.QueryString["vare_id"];

            ListView_EnkeltVare.DataSource = db.Vares.Where(v => v.V_Id.Equals(querystring));
            ListView_EnkeltVare.DataBind();

            Repeater_EnkeltVareMaerkeHeader.DataSource = db.Vares.Where(v => v.V_Id.Equals(querystring));
            Repeater_EnkeltVareMaerkeHeader.DataBind();
        }
    }
Example #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        BindDdl();

        Repeater_AsideTilbud.DataSource = db.Tilbuds.Take(3);
        Repeater_AsideTilbud.DataBind();

        if (Request.QueryString["result"] != null)
        {
            var query = db.Vares.Where(v => v.Navn.Contains(Convert.ToString(Request.QueryString["result"])));
            if (query.Count() > 0)
            {
                Panel_SoegForm.Visible   = false;
                Panel_SoegResult.Visible = true;

                ListView_Result.DataSource = query;
                ListView_Result.DataBind();
            }
            else
            {
                Panel_Fejl.Visible = true;
            }
        }
    }