Beispiel #1
0
        private void DeleteImage(string Name)
        {
            string filename = lbkey.Text + "_img" + Name + ".png";
            string fullPath = Request.MapPath("~/Img/coop/" + filename);

            if (System.IO.File.Exists(fullPath))
            {
                System.IO.File.Delete(fullPath);
            }
            Cooperative_Image_Data.DeleteImg(lbkey.Text + "_" + Name);
            CloseForm();
        }
Beispiel #2
0
        private void loadSlideshow(int id)
        {
            Cooperative_Image_Info Info = new Cooperative_Image_Info(id);
            DataTable nTable            = Cooperative_Image_Data.GetListbyCoop(id);
            string    shead             = "";
            string    sbody             = "";

            for (int i = 0; i < nTable.Rows.Count; i++)
            {
                if (i > 0)
                {
                    shead += "<li data-target='#carousel-example-generic' data-slide-to='" + i + "'></li>";
                    sbody += @"<div class='item'><img class='img-responsive' style='max-height: 400px;' height = '400px' width = '1200px' src='" + urldomain + "/" + nTable.Rows[i]["Images"].ToString().Substring(3) + "'></div>";
                }
                else
                {
                    shead += "<li data-target='#carousel-example-generic' data-slide-to='" + i + "' class='active'></li>";
                    sbody += @"<div class='item active'><img class='img-responsive' style='max-height: 400px;' height = '400px' width = '1200px' src='" + urldomain + "/" + nTable.Rows[i]["Images"].ToString().Substring(3) + "'></div>";
                }
            }
            ltSlideshow.Text = @"<ol class='carousel-indicators'>" + shead + @"</ol> <div class='carousel-inner' role='listbox'>" + sbody + "</div>";
        }