private EPICTURE resim_yolu(int a) { return(BLLPICTURE.resim_yolu(a)); }
private void Uruneklebuton_Click(object sender, EventArgs e) { if (tempPicNo != 0) { EPRODUCT item = new EPRODUCT(); item.Name = urunadi.Text; item.Price = Convert.ToInt32(urunfiyati.Text); //tam buraya item.SubCategoryID = Convert.ToInt32(altkategorilist.SelectedValue); item.UsersID = UserIDNo; if (BLLPRODUCT.AddItem(item, ref tempPicID) > 1) { MessageBox.Show("Urun eklendi."); } else { MessageBox.Show("Ekleme hatasi"); } string UsersID = UserIDNo.ToString(); string resimAdi1 = UsersID + "." + tempPicID.ToString() + "." + "1"; string resimAdi2 = UsersID + "." + tempPicID.ToString() + "." + "2"; string resimAdi3 = UsersID + "." + tempPicID.ToString() + "." + "3"; string filePath1 = Application.StartupPath + "\\scan\\" + resimAdi1 + ".jpg"; string filePath2 = Application.StartupPath + "\\scan\\" + resimAdi2 + ".jpg"; string filePath3 = Application.StartupPath + "\\scan\\" + resimAdi3 + ".jpg"; if (UrunEkleResim.Image != null) { EPICTURE item2 = new EPICTURE(); item2.ProductID = tempPicID; item2.PicDirectory = filePath1; BLLPICTURE.AddPicture(item2); } if (UrunEkleResim2.Image != null) { EPICTURE item2 = new EPICTURE(); item2.ProductID = tempPicID; item2.PicDirectory = filePath2; BLLPICTURE.AddPicture(item2); } if (UrunEkleResim3.Image != null) { EPICTURE item2 = new EPICTURE(); item2.ProductID = tempPicID; item2.PicDirectory = filePath3; BLLPICTURE.AddPicture(item2); } MessageBox.Show("1"); if (UrunEkleResim.Image != null) { UrunEkleResim.Image.Save(filePath1); } if (UrunEkleResim2.Image != null) { UrunEkleResim.Image.Save(filePath2); } if (UrunEkleResim3.Image != null) { UrunEkleResim.Image.Save(filePath3); } } TabloUst.SelectedIndex = 0; }