예제 #1
0
    protected void lnkOnaylaveOde_Click(object sender, EventArgs e)
    {
        IlanIslem yeniilan = new IlanIslem();
        int       ilanId   = Convert.ToInt32(Session[SiteTanim.QSIlanID]);

        if (((NuyeBilgi)Session[SiteTanim.QSKullaniciSession]).UyeTip == (int)UyeTip.Bireysel)
        {
            Fonksiyon yenikucukresim = new Fonksiyon();
            if (FileUpload1.HasFile)
            {
                string kresim     = string.Empty;
                string bresim     = string.Empty;
                Bitmap yeniresim  = null;
                Bitmap byeniresim = null;
                try
                {
                    IList <HttpPostedFile> SecilenDosyalar = FileUpload1.PostedFiles;
                    if (!Directory.Exists(HttpContext.Current.Server.MapPath("/Dosya/IlanResim/" + ilanId + "/")))
                    {
                        Directory.CreateDirectory(HttpContext.Current.Server.MapPath("/Dosya/IlanResim/" + ilanId + "/"));
                    }
                    if (!Directory.Exists(HttpContext.Current.Server.MapPath("/Dosya/IlanResim/" + ilanId + "/thump/")))
                    {
                        Directory.CreateDirectory(HttpContext.Current.Server.MapPath("/Dosya/IlanResim/" + ilanId + "/thump/"));
                    }
                    for (int i = 0; i < SecilenDosyalar.Count; i++)
                    {
                        FileUpload1.PostedFiles[i].SaveAs(Server.MapPath("/Dosya/IlanResim/" + ilanId + "/") + FileUpload1.PostedFiles[i].FileName);


                        yeniresim = yenikucukresim.resim_boyulandir(FileUpload1.PostedFiles[i].InputStream, 210, 130);//yeni resim için boyut veriyoruz..
                        kresim    = Server.MapPath("/Dosya/IlanResim/" + ilanId + "/thump/") + FileUpload1.PostedFiles[i].FileName;
                        yeniresim.Save(kresim, ImageFormat.Jpeg);

                        NResimler resimkaydet = new NResimler
                        {
                            Resim  = ("/Dosya/IlanResim/" + ilanId + "/") + FileUpload1.PostedFiles[i].FileName,
                            Thumb  = ("/Dosya/IlanResim/" + ilanId + "/thump/") + FileUpload1.PostedFiles[i].FileName,
                            IlanId = ilanId
                        };
                        yeniilan.ResimKaydet(resimkaydet);
                    }

                    Response.Redirect("/ilanonay.aspx");
                }
                catch (Exception ex)
                {
                    Response.Write("Hata Oluştu: " + ex.Message.ToString());
                }
                finally
                {
                    kresim = string.Empty;
                    yeniresim.Dispose();
                }
            }
        }
    }
예제 #2
0
    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView1.PageIndex = e.NewPageIndex;

        if (Request.QueryString["katId"] != null)
        {
            GridView1.DataSource = Fonksiyon.UrunGetirId(Convert.ToInt32(Request.QueryString["katId"]));
            GridView1.DataBind();
        }
        else
        {
            GridView1.DataSource = Fonksiyon.UrunGetir();
            GridView1.DataBind();
        }
    }
예제 #3
0
    protected void btnGiris_Click(object sender, EventArgs e)
    {
        //DB.getInstance().SqlCalistir("INSERT INTO tbl_personel (email,password) VALUES('asd', '" + Fonksiyon.CalculateSHA256("asd", Encoding.UTF8) + "')");

        Hashtable ht = new Hashtable();

        ht.Add("@email", txtEmail.Text);
        ht.Add("@password", Fonksiyon.CalculateSHA256(txtPassword.Text, Encoding.UTF8));
        String[,] rows = DB.getInstance().getRows("SELECT * FROM tbl_personel WHERE email = @email AND password= @password", ht);

        if (rows.Length > 0)
        {
            Session.Add("user_id", rows[0, 0]);
            Session.Add("user_tip", "personel");
            Session.Add("cayocagi_id", rows[0, 5]);
            Response.Redirect("Default.aspx");
        }
    }
예제 #4
0
 protected void YetkiKontrol()
 {
     if (Session[SiteTanim.QSKullaniciSession] != null)
     {
         if (((NuyeBilgi)Session[SiteTanim.QSKullaniciSession]).UyeTip == (int)UyeTip.Bireysel)
         {
             pnlKurumsalUyeResim.Visible = true;
         }
         else if (((NuyeBilgi)Session[SiteTanim.QSKullaniciSession]).UyeTip == (int)UyeTip.Kurumsal)
         {
             Response.Write(Fonksiyon.MesajBox("İlanınız başarıyla eklendi", "/Default.aspx"));
         }
         else
         {
             //pnlOdemeBireysel.Visible = false;
         }
     }
     else
     {
         Response.Redirect("/UyeGiris.aspx");
     }
 }
예제 #5
0
 public int uyeSorgula(uyeler uye)
 {
     int sonuc = -1;
     try
     {
         Fonksiyon fnk = new Fonksiyon();
         SqlConnection con = fnk.Baglan();
         SqlCommand cmd = new SqlCommand();
         cmd.Connection = con;
         cmd.CommandText = "SELECT * FROM uyeler Where kullaniciadi='" + uye.uyeisim + "' and sifre='" + uye.sifre + "'";
         cmd.CommandType = CommandType.Text;
         SqlDataReader dr = cmd.ExecuteReader();
         if(dr.Read())
         {
             sonuc = Convert.ToInt32(dr["id"].ToString());
         }
     }
     catch (Exception)
     {
         throw;
     }
     return sonuc;
 }
예제 #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     GridView1.DataSource = Fonksiyon.UrunDetayGetirId(Convert.ToInt32(Request.QueryString["urunumId"]));
     GridView1.DataBind();
 }
예제 #7
0
    protected NIslemSonuc <List <NAramaSonuc> > IlanAra(NIlanAraKriter Kriter)
    {
        Fonksiyon system = new Fonksiyon();

        try
        {
            //int sorguDurum = 0;
            //string sorgu = "select * from AramaSonuclari WHERE ";
            //if (!string.IsNullOrEmpty(Kriter.MulkiyetTipi))
            //{
            //    sorgu += "MulkiyetTipi = " + Kriter.MulkiyetTipi + " ";
            //    sorguDurum++;
            //}
            //if (Kriter.OdaSayisi != 0)
            //{
            //    if (sorguDurum == 1)
            //        sorgu += " AND ";
            //    sorgu += "OdaSayisi = " + Kriter.OdaSayisi + " ";
            //    sorguDurum++;
            //}
            //if (Kriter.PostaKodu != 0)
            //{
            //    if (sorguDurum > 0)
            //        sorgu += " AND ";
            //    sorgu += "PostaKodu = " + Kriter.PostaKodu + " ";
            //    sorguDurum++;
            //}
            // if (Kriter.YatakOdasi != 0)
            //{
            //    if (sorguDurum > 0)
            //        sorgu += " AND ";
            //    sorgu += "YatakOdaSayisi = " + Kriter.YatakOdasi + " ";
            //    sorguDurum++;
            //}

            // DataTable kayitlar = system.GetDataTable(sorgu);

            //for (int i = 0; i <kayitlar.Columns.Count ; i++)
            //{
            //    int IlanId = kayitlar["IlanId"];
            //    var kayitResim = (from r in Entity.IlanFotografs
            //                      where r.IlanId == IlanId
            //                      select r.FotoPath);
            //    if (kayitResim.Count() > 0)
            //    {
            //        kayitlar[i].Resim = kayitResim.FirstOrDefault();
            //    }
            //}

            //if (kayitlar.Count > 0)
            //{
            //    return new NIslemSonuc<List<NAramaSonuc>>
            //    {
            //        Basarilimi = true,
            //        Veri = kayitlar
            //    };
            //}
            //else
            //{

            return(new NIslemSonuc <List <NAramaSonuc> >
            {
                Basarilimi = false,
                Mesaj = "Gerekli Kayitlara Erişilemedi"
            });
        }

        catch (Exception hata)
        {
            return(new NIslemSonuc <List <NAramaSonuc> >
            {
                Basarilimi = false,
                HataBilgi = new NHata
                {
                    HataMesaj = hata.Message,
                    Metod = "GetirKonut",
                    Sinif = "AramaSonuclariVeritabani"
                }
            });
        }
    }
예제 #8
0
    protected void  AramaYap()
    {
        //  AramaSonucIslem  arama = new AramaSonucIslem();
        Fonksiyon system = new Fonksiyon();

        // var sonuc = arama.IlanAra(yeni);

        int    sorguDurum = 0;
        string sorgu      = "select * from AramaSonuclari WHERE ";

        if (!string.IsNullOrEmpty(drpMulkiyetTipi.SelectedItem.Value))
        {
            sorgu += "MulkiyetTipi = '" + drpMulkiyetTipi.SelectedItem.Value + "'";
            sorguDurum++;
        }
        if (!string.IsNullOrEmpty(drpIlanTipi.SelectedItem.Value))
        {
            if (sorguDurum > 0)
            {
                sorgu += " AND ";
            }
            sorgu += "IlanTipi = '" + drpIlanTipi.SelectedItem.Value + "'";
            sorguDurum++;
        }
        if (!string.IsNullOrEmpty(ayarlar.Temizle(txtIlIlce.Text)))
        {
            if (sorguDurum > 0)
            {
                sorgu += " AND ";
            }
            sorgu += "SehirAd = '" + ayarlar.Temizle(txtIlIlce.Text) + "'";
            sorguDurum++;
        }


        if (!string.IsNullOrEmpty(drpUlke.SelectedItem.Value))
        {
            if (sorguDurum > 0)
            {
                sorgu += " AND ";
            }
            sorgu += "UlkeId = " + drpUlke.SelectedValue + " ";
            sorguDurum++;
        }

        if ((string.IsNullOrEmpty(txtOda.Text) ? 0 : int.Parse(txtOda.Text)) != 0)
        {
            if (sorguDurum > 0)
            {
                sorgu += " AND ";
            }
            sorgu += "OdaSayisi = " + ayarlar.Temizle(txtOda.Text) + " ";
            sorguDurum++;
        }
        if ((string.IsNullOrEmpty(txtPostaKodu.Text) ? 0 : int.Parse(txtPostaKodu.Text)) != 0)
        {
            if (sorguDurum > 0)
            {
                sorgu += " AND ";
            }
            sorgu += "PostaKodu = " + ayarlar.Temizle(txtPostaKodu.Text) + " ";
            sorguDurum++;
        }
        if ((string.IsNullOrEmpty(txtYatakOdasi.Text) ? 0 : int.Parse(txtYatakOdasi.Text)) != 0)
        {
            if (sorguDurum > 0)
            {
                sorgu += " AND ";
            }
            sorgu += "YatakOdaSayisi = " + ayarlar.Temizle(txtYatakOdasi.Text) + " ";
            sorguDurum++;
        }

        if ((string.IsNullOrEmpty(txtMinM2.Text) ? 0 : int.Parse(txtMinM2.Text)) >= 0 & (string.IsNullOrEmpty(txtMaxM2.Text) ? 0 : int.Parse(txtMaxM2.Text)) > 0)
        {
            if (sorguDurum > 0)
            {
                sorgu += " AND ";
            }
            sorgu += "(YasamAlani > " + (string.IsNullOrEmpty(ayarlar.Temizle(txtMinM2.Text)) ? 0 : int.Parse(ayarlar.Temizle(txtMinM2.Text))) + " AND YasamAlani < " + (string.IsNullOrEmpty(ayarlar.Temizle(txtMaxM2.Text)) ? 0 : int.Parse(ayarlar.Temizle(txtMaxM2.Text))) + ") ";
            sorguDurum++;
        }

        if ((string.IsNullOrEmpty(ayarlar.Temizle(txtMinE.Text)) ? 0 : int.Parse(ayarlar.Temizle(txtMinE.Text))) >= 0 & (string.IsNullOrEmpty(ayarlar.Temizle(txtMaxE.Text)) ? 0 : int.Parse(ayarlar.Temizle(txtMaxE.Text))) > 0)
        {
            if (sorguDurum > 0)
            {
                sorgu += " AND ";
            }
            sorgu += "(Fiyat > " + (string.IsNullOrEmpty(ayarlar.Temizle(txtMinE.Text)) ? 0 : int.Parse(ayarlar.Temizle(txtMinE.Text))) + " AND Fiyat < " + (string.IsNullOrEmpty(ayarlar.Temizle(txtMaxE.Text)) ? 0 : int.Parse(ayarlar.Temizle(txtMaxE.Text))) + ") ";
            sorguDurum++;
        }
        DataTable kayitlar = system.GetDataTable(sorgu);

        if (kayitlar.Rows.Count > 0)
        {
            pnlMesaj.Visible       = false;
            PnlSonuc.Visible       = true;
            rptKonutlar.DataSource = kayitlar;
            rptKonutlar.DataBind();
        }
        else
        {
            pnlMesaj.Visible = true;
            PnlSonuc.Visible = false;
            lblMesaj.Text    = "Aradığınız kriterlerde ilgili ilan bulunamadı";
        }



        //CollectionPager1.DataSource = sonuc.Veri;
        //CollectionPager1.BindToControl = rptKonutlar;
        //rptKonutlar.DataSource = CollectionPager1.DataSourcePaged;
    }
예제 #9
0
        private void ReportBody()
        {
            Fonksiyon f = new Fonksiyon();

            #region Table header

            BaseFont Vn_Helvetica = BaseFont.CreateFont(@"C:\Windows\Fonts\arial.ttf", "Identity-H", BaseFont.EMBEDDED);
            Font     _fontStyle   = new Font(Vn_Helvetica, 11, Font.NORMAL);

            _pdfCell = new PdfPCell(new Phrase("Sıra No", _fontStyle));
            _pdfCell.HorizontalAlignment = Element.ALIGN_CENTER;
            _pdfCell.VerticalAlignment   = Element.ALIGN_MIDDLE;
            _pdfCell.BackgroundColor     = BaseColor.LIGHT_GRAY;
            _pdfCell.Padding             = 7;
            _pdfTable.AddCell(_pdfCell);

            _pdfCell = new PdfPCell(new Phrase("Öğrenci No", _fontStyle));
            _pdfCell.HorizontalAlignment = Element.ALIGN_CENTER;
            _pdfCell.VerticalAlignment   = Element.ALIGN_MIDDLE;
            _pdfCell.BackgroundColor     = BaseColor.LIGHT_GRAY;
            _pdfCell.Padding             = 7;
            _pdfTable.AddCell(_pdfCell);

            _pdfCell = new PdfPCell(new Phrase("Adı", _fontStyle));
            _pdfCell.HorizontalAlignment = Element.ALIGN_CENTER;
            _pdfCell.VerticalAlignment   = Element.ALIGN_MIDDLE;
            _pdfCell.BackgroundColor     = BaseColor.LIGHT_GRAY;
            _pdfCell.Padding             = 7;
            _pdfTable.AddCell(_pdfCell);

            _pdfCell = new PdfPCell(new Phrase("Soyadı", _fontStyle));
            _pdfCell.HorizontalAlignment = Element.ALIGN_CENTER;
            _pdfCell.VerticalAlignment   = Element.ALIGN_MIDDLE;
            _pdfCell.BackgroundColor     = BaseColor.LIGHT_GRAY;
            _pdfCell.Padding             = 7;
            _pdfTable.AddCell(_pdfCell);
            _pdfTable.CompleteRow();
            #endregion

            #region Table Body
            int sirano = 1;
            foreach (YoklamaViewModel item in _yoklamaListe)
            {
                string dersSaati   = f.DersSaatiGetir(Convert.ToInt32(item.DersGrupID)).DersGrupAdi;
                string dersAdi     = f.DersGetir(Convert.ToInt32(item.DersID)).DersAdi;
                string ogretmenAdi = f.OgretmenGetir(Convert.ToInt32(item.OgretmenID)).AdSoyad;

                _pdfCell                     = new PdfPCell(new Phrase(dersSaati + " - " + dersAdi + " [ " + ogretmenAdi + " ]", _fontStyle));
                _pdfCell.Colspan             = _totalcolumn;
                _pdfCell.HorizontalAlignment = Element.ALIGN_CENTER;
                _pdfCell.VerticalAlignment   = Element.ALIGN_LEFT;
                _pdfCell.BackgroundColor     = BaseColor.LIGHT_GRAY;
                _pdfCell.Padding             = 7;
                _pdfTable.AddCell(_pdfCell);
                _pdfTable.CompleteRow();
                sirano = 1;
                if (item.OgrenciIDListe == null)
                {
                    _pdfCell                     = new PdfPCell(new Phrase("Sınıfta Gelmeyen Yoktur.", _fontStyle));
                    _pdfCell.Colspan             = _totalcolumn;
                    _pdfCell.HorizontalAlignment = Element.ALIGN_CENTER;
                    _pdfCell.VerticalAlignment   = Element.ALIGN_MIDDLE;
                    _pdfCell.BackgroundColor     = BaseColor.WHITE;
                    _pdfCell.Padding             = 5;
                    _pdfTable.AddCell(_pdfCell);
                }
                else
                {
                    foreach (var ogrenci in item.OgrenciIDListe)
                    {
                        _pdfCell = new PdfPCell(new Phrase(sirano++.ToString(), _fontStyle));
                        _pdfCell.HorizontalAlignment = Element.ALIGN_CENTER;
                        _pdfCell.VerticalAlignment   = Element.ALIGN_MIDDLE;
                        _pdfCell.BackgroundColor     = BaseColor.WHITE;
                        _pdfCell.Padding             = 5;
                        _pdfTable.AddCell(_pdfCell);

                        _pdfCell = new PdfPCell(new Phrase(f.OgrenciGetir(Convert.ToInt32(ogrenci)).OgrenciNo.ToString(), _fontStyle));
                        _pdfCell.HorizontalAlignment = Element.ALIGN_CENTER;
                        _pdfCell.VerticalAlignment   = Element.ALIGN_MIDDLE;
                        _pdfCell.BackgroundColor     = BaseColor.WHITE;
                        _pdfCell.Padding             = 5;
                        _pdfTable.AddCell(_pdfCell);

                        _pdfCell = new PdfPCell(new Phrase(f.OgrenciGetir(Convert.ToInt32(ogrenci)).Adi.ToString(), _fontStyle));
                        _pdfCell.HorizontalAlignment = Element.ALIGN_CENTER;
                        _pdfCell.VerticalAlignment   = Element.ALIGN_MIDDLE;
                        _pdfCell.BackgroundColor     = BaseColor.WHITE;
                        _pdfCell.Padding             = 5;
                        _pdfTable.AddCell(_pdfCell);

                        _pdfCell = new PdfPCell(new Phrase(f.OgrenciGetir(Convert.ToInt32(ogrenci)).Soyadi.ToString(), _fontStyle));
                        _pdfCell.HorizontalAlignment = Element.ALIGN_CENTER;
                        _pdfCell.VerticalAlignment   = Element.ALIGN_MIDDLE;
                        _pdfCell.BackgroundColor     = BaseColor.WHITE;
                        _pdfCell.Padding             = 5;
                        _pdfTable.AddCell(_pdfCell);
                        _pdfTable.CompleteRow();
                    }
                }
            }
            #endregion
        }
    protected void btDevam_Click(object sender, EventArgs e)
    {
        IlanIslem yeniilan = new IlanIslem();


        if (chckDaire.Checked)
        {
            hdnMulkiyetTipi.Value = "Appartement";
        }
        else if (chckVilla.Checked)
        {
            hdnMulkiyetTipi.Value = "Maison";
        }



        if (chckDaire.Checked || chckVilla.Checked)
        {
            NIlan yeni = new NIlan
            {
                UyeId           = (int)((NuyeBilgi)Session[SiteTanim.QSKullaniciSession]).UyeId,
                UlkeId          = (int)Convert.ToInt32(drpUlke.SelectedItem.Value),
                BinaYasi        = string.IsNullOrEmpty(ayarlar.Temizle(txtBinaYasi.Text)) ? 0 : int.Parse(ayarlar.Temizle(txtBinaYasi.Text)),
                Adres           = txtAdres.Text,
                OdaSayisi       = Convert.ToInt32(ayarlar.Temizle(txtOdasayisi.Text)),
                YatakOdasi      = (int)Convert.ToInt32(ayarlar.Temizle(txtYatakOdasi.Text)),
                YasamAlani      = (int)Convert.ToInt32(txtYasamAlani.Text),
                KullanimAlani   = string.IsNullOrEmpty(ayarlar.Temizle(txtKullanimAlani.Text)) ? 0 : int.Parse(ayarlar.Temizle(txtKullanimAlani.Text)),
                KatNo           = string.IsNullOrEmpty(ayarlar.Temizle(txtKatNo.Text)) ? 0 : int.Parse(ayarlar.Temizle(txtKatNo.Text)),
                BireyselIkiz    = ayarlar.Temizle(drpBireyselIkiz.SelectedValue),
                SehirAd         = ayarlar.Temizle(txtSehirAd.Text),
                ReferansNo      = ayarlar.Temizle(txtReferansNo.Text),
                IlanTipi        = Convert.ToString(Request.QueryString["id"]),
                MulkiyetTipi    = hdnMulkiyetTipi.Value,
                Asansor         = ayarlar.Temizle(chckAsansor.SelectedValue),
                AylikKira       = string.IsNullOrEmpty(ayarlar.Temizle(txtAylikKira.Text)) ? 0 : decimal.Parse(ayarlar.Temizle(txtAylikKira.Text)),
                BosOlacagiTarih = ayarlar.Temizle(txtBosOlacagiTarih.Text),
                IcMekan         = ayarlar.Temizle(chckIcMekan.SelectedValue),
                Sokak           = ayarlar.Temizle(txtSokak.Text),
                Fiyat           = string.IsNullOrEmpty(ayarlar.Temizle(txtFiyat.Text)) ? 0 : decimal.Parse(ayarlar.Temizle(txtFiyat.Text)),
                PostaKodu       = string.IsNullOrEmpty(ayarlar.Temizle(txtPostaKodu.Text)) ? 0 : int.Parse(ayarlar.Temizle(txtPostaKodu.Text)),
            };
            var sonuc = yeniilan.Kaydet(yeni);

            Session[SiteTanim.QSIlanID] = Convert.ToString(sonuc.Veri);

            NEnerjiKaydet yenienerji = new NEnerjiKaydet
            {
                EmisyonDegeri = Convert.ToInt32(ayarlar.Temizle(txtEmisyonNumara.Text)),
                EmisyonSinifi = txtEmisyonSinifi.Text,
                EnerjiDegeri  = Convert.ToInt32(ayarlar.Temizle(txtEnerjiNumara.Text)),
                EnerjiSinifi  = txtEnerjiSinifi.Text,
                IlanId        = sonuc.Veri,
            };
            yeniilan.EnerjiBilgisiKaydet(yenienerji);
            int           ilanId       = Convert.ToInt32(Session[SiteTanim.QSIlanID]);
            NIlanIletisim ilaniletisim = new NIlanIletisim
            {
                IlanEmail            = ayarlar.Temizle(txtEmail.Text),
                IlanIletisimSaatleri = ayarlar.Temizle(txtIletisimSaatleri.Text),
                IlanTelefon          = ayarlar.Temizle(txtTelefon.Text),
                IlanTelefon2         = ayarlar.Temizle(txtTelefon2.Text),
                // IlanIletisimSekli=chckIletisimSekli.SelectedItem.Value,
                IlanId = ilanId
            };
            yeniilan.IlanIletisimKaydet(ilaniletisim);


            if (((NuyeBilgi)Session[SiteTanim.QSKullaniciSession]).UyeTip == (int)UyeTip.Kurumsal)
            {
                Fonksiyon yenikucukresim = new Fonksiyon();
                if (FileUpload1.HasFile)
                {
                    string kresim     = string.Empty;
                    string bresim     = string.Empty;
                    Bitmap yeniresim  = null;
                    Bitmap byeniresim = null;
                    try
                    {
                        IList <HttpPostedFile> SecilenDosyalar = FileUpload1.PostedFiles;
                        if (!Directory.Exists(HttpContext.Current.Server.MapPath("/Dosya/IlanResim/" + ilanId + "/")))
                        {
                            Directory.CreateDirectory(HttpContext.Current.Server.MapPath("/Dosya/IlanResim/" + ilanId + "/"));
                        }
                        if (!Directory.Exists(HttpContext.Current.Server.MapPath("/Dosya/IlanResim/" + ilanId + "/thump/")))
                        {
                            Directory.CreateDirectory(HttpContext.Current.Server.MapPath("/Dosya/IlanResim/" + ilanId + "/thump/"));
                        }
                        for (int i = 0; i < SecilenDosyalar.Count; i++)
                        {
                            FileUpload1.PostedFiles[i].SaveAs(Server.MapPath("/Dosya/IlanResim/" + ilanId + "/") + FileUpload1.PostedFiles[i].FileName);


                            yeniresim = yenikucukresim.resim_boyulandir(FileUpload1.PostedFiles[i].InputStream, 210, 130);//yeni resim için boyut veriyoruz..
                            kresim    = Server.MapPath("/Dosya/IlanResim/" + ilanId + "/thump/") + FileUpload1.PostedFiles[i].FileName;
                            yeniresim.Save(kresim, ImageFormat.Jpeg);

                            NResimler resimkaydet = new NResimler
                            {
                                Resim  = ("/Dosya/IlanResim/" + ilanId + "/") + FileUpload1.PostedFiles[i].FileName,
                                Thumb  = ("/Dosya/IlanResim/" + ilanId + "/thump/") + FileUpload1.PostedFiles[i].FileName,
                                IlanId = ilanId
                            };
                            yeniilan.ResimKaydet(resimkaydet);
                        }
                    }
                    catch (Exception ex)
                    {
                        Response.Write("Hata Oluştu: " + ex.Message.ToString());
                    }
                    finally
                    {
                        kresim = string.Empty;
                        yeniresim.Dispose();
                    }
                }
            }



            if (sonuc.Basarilimi == true)
            {
                lblMesaj.Text = "Kayit Başarılı" + sonuc.Veri;
                Response.Redirect("/IlanVer2.aspx");
            }
            else
            {
                if (sonuc.HataBilgi != null)
                {
                    lblMesaj.Text = "Bir hata oluştu." + sonuc.Mesaj;
                }
                else
                {
                    lblMesaj.Text = sonuc.Mesaj;
                }
            }
        }
        else
        {
            lblMesaj.Text = "Lütfen Mülkiyet Tipi Seçiniz";
        }
    }