public IHttpActionResult PostImage([FromBody] COMimage img)
        {
            COMimage im = BLLimage.GetImageById(img.ImageID);

            if (im != null)
            {
                return(BadRequest("image already exist"));
            }
            BLLimage.AddImage(img, Form1.categoriesCounter, Form1.voicesCounter);
            return(Ok());
        }
Example #2
0
        private void button7_Click(object sender, EventArgs e)
        {
            COMimage img = new COMimage();

            img.UserId     = Convert.ToInt32(comboBox3.SelectedValue);
            img.CategoryID = Convert.ToInt32(comboBox1.SelectedValue);
            img.URL        = path;
            label10.Text   = "";
            foreach (string objName in BLLimage.AddImage(img, categoriesCounter, voicesCounter))
            {
                label10.Text += objName + "\n";
            }
            groupBox3.Visible = false;
        }