private void button4_Click(object sender, EventArgs e) { byte[] photo = GetPhoto(path); int renk_sayisi = cs.get_color_number(); IntPtr ptr = cs.get_shapes(); int[] array = new int[10]; Marshal.Copy(ptr, array, 0, 10); string sekil_sayisi = ""; int i = 0; while (array[i] != 0) { sekil_sayisi = sekil_sayisi + array[i].ToString() + ","; i++; } Console.WriteLine(sekil_sayisi); string time = DateTime.Now.ToString("h:mm:ss tt"); LinQDataContext lq = new LinQDataContext(); MIA table = new MIA(); table.Image_Name = img_name; table.Sekil_Sayisi = sekil_sayisi; table.Renk_Sayisi = renk_sayisi; table.Tarih = time; table.Resim = photo; lq.MIAs.InsertOnSubmit(table); lq.SubmitChanges(); MessageBox.Show("Kayıt işlemi Başarılı"); Console.WriteLine(time); }
partial void UpdateMIA(MIA instance);
partial void DeleteMIA(MIA instance);
partial void InsertMIA(MIA instance);