private void button6_Click(object sender, EventArgs e)
        {
            int i = 0;

            if (textBox7.Text != "" & textBox8.Text != "" & textBox9.Text != "")
            {
                do
                {
                    label25.Size    = new System.Drawing.Size(797, 450);
                    label25.Visible = true;
                    label25.BringToFront();

                    if (textBox7.Text == dedomena.table[i, 0] & textBox8.Text == dedomena.table[i, 1] & textBox9.Text == dedomena.table[i, 3])
                    {
                        //diagrafi proiontos apo ton kodiko toy
                        dedomena.deleteitems(textBox9.Text);


                        MessageBox.Show("you deleted a item ");
                        textBox7.Text       = "";
                        textBox8.Text       = "";
                        textBox9.Text       = "";
                        pictureBox2.Visible = false;
                        tableintialazi();
                        label25.Size = new System.Drawing.Size(50, 50);

                        break;
                    }
                    i++;
                } while (i < dedomena.len);
            }
            dedomena.scan();
            label25.SendToBack();
            label25.Visible = false;
        }
 public void addobjTest()
 {
     Classlistvi dataretes = new Classlistvi();
     dataretes.store();
     int corect = 1;
     string code = "100";
     int vali = 30;
     string name = "nikolas";
     string price = "1";
     string foto = "C:/Users/strike xXx/Desktop/mixaniki/018510-glossy-black-3d-button-icon-symbols-shapes-power-button.png";
     string thesh = "A2";
     string avalable = "1";
     dataretes.addnewobj(name, price, foto, thesh, avalable, code);
     dataretes.addobj(int.Parse(code), vali);
     dataretes.store();
     for (int i = 0; i < dataretes.len; i++)
     {
         if (dataretes.table[i, 5] == code & int.Parse(dataretes.table[i, 6]) == vali + 1)
         {
             corect = 0;
             break;
         }
     }
     dataretes.deleteitems(code);
     Assert.ReferenceEquals(0, corect);
 }
        public void addnewobjTest()
        {
            int corect = 1;
            string name = "nikolas";
            string price = "1";
            string foto = "C:/Users/strike xXx/Desktop/mixaniki/018510-glossy-black-3d-button-icon-symbols-shapes-power-button.png";
            string thesh = "A2";
            string code = "100";
            string avalable = "1";
            Classlistvi dataretes = new Classlistvi();
            dataretes.addnewobj(name, price, foto, thesh, avalable, code);
            dataretes.data();
            for (int i = 0; i < dataretes.len; i++)
            {
                if (dataretes.table[i, 1] == name & dataretes.table[i, 2] == price & dataretes.table[i, 3] == foto & dataretes.table[i, 4] == thesh & dataretes.table[i, 5] == code & dataretes.table[i, 6] == avalable)
                {
                    corect = 0;
                    //dataretes.deleteitems(dataretes.table[i, 0]);
                    break;
                }
            }
            dataretes.deleteitems(code);

            Assert.ReferenceEquals(0, corect);
        }