コード例 #1
0
        public void RemoveTest()
        {
            ImageDal dal = new ImageDal();
            //ImageDetails idetails = new ImageDetails();
            //idetails.Id = 5;

            dal.RemoveImage(1034);
            List<ImageDetails> result = dal.GetAllImages().FindAll(x => x.Id==1034);
            Assert.AreEqual(0,result.Count);

        }
コード例 #2
0
        protected void Remove_Click(object sender, EventArgs e)
        {

            try
            {
                ImageDal dal = new ImageDal();
                if(hdCheckRadio.Value=="true")
                dal.RemoveImage(int.Parse(hdSelectedImage.Value));

                ListView1.DataSource = dal.GetAllImages();
                ListView1.DataBind();
            }
            catch (Exception ex)
            {
                ImageException exception = new ImageException(ex.Message);

            }


        }