protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                bal.Recipes obj = new bal.Recipes();

                if (Request.QueryString["recipeid"] == null)
                {
                    GridView1.DataSource = obj.list();
                    GridView1.DataBind();
                }
                else
                {
                    obj.catid = Int32.Parse(Request.QueryString["recipeid"].ToString());

                    if (obj.remove() > 0)
                    {
                        Response.Redirect("~/admin/menuitemlist.aspx");
                    }
                    else
                    {
                        Response.Write("Data couldnot Removed !!");
                    }
                }
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (list.Count <= 0)
                {
                    bal.Recipes obj = new bal.Recipes();
                    list = obj.list();
                }
                //BannerImage.ImageUrl = "~/images/" + list[0].image;
                Literal1.Text = "<div style='background-image : url(/images/" + list[0].image + ");height:300px;width:1000px'>" +
                                " </div>";


                bal.Category        cobj  = new bal.Category();
                List <bal.Category> cList = new List <bal.Category>();
                cList = cobj.list();

                String CategoryList = String.Empty;
                for (int i = 0; i < cList.Count; i++)
                {
                    CategoryList += "<div id='downContent'>" +
                                    "<div id='downMenu'>" +
                                    "<a href='menuitemlist.aspx?catid=" + cList[i].catid + "'>" + cList[i].categoryname + " </a> " +
                                    "</div>" +

                                    " <div id='downImage'> <img src='images/" + cList[i].image + "' alt=' " + cList[i].categoryname + "'/>  </div>" +

                                    "</div>";
                }

                Literal2.Text = CategoryList;
            }
        }
Ejemplo n.º 3
0
        protected void Timer_Tick(object sender, EventArgs e)
        {
            if (list.Count <= 0)
            {
                bal.Recipes obj = new bal.Recipes();
                list = obj.list();
            }
            Random rand = new Random();
            int    i    = rand.Next(0, list.Count);

            Literal1.Text = "<div style='background-image : url(/images/" + list[i].image + ");height:300px;width:1000px'>" +
                            "</div>";
        }