public int sehirEkleString(string gelenSehirAd, int postaKodu)
        {
            dm.AddInParameters("@gelenAd", SqlDbType.NVarChar, gelenSehirAd);
            dm.AddInParameters("@postaKodu", SqlDbType.Int, postaKodu);
            int sonuc = dm.ExecuteNonQuery("insert into Sehir values(@gelenAd,@postaKodu)", CommandType.Text);

            return(sonuc);
        }
Пример #2
0
        public int caddeEkleString(string gelenCaddeAd, int semtId)
        {
            dm.AddInParameters("@gelenCaddeAd", SqlDbType.NVarChar, gelenCaddeAd);
            dm.AddInParameters("@smtId", SqlDbType.Int, semtId);
            int sonuc = dm.ExecuteNonQuery("insert into Cadde values(@gelenCaddeAd,@smtId)", CommandType.Text);

            return(sonuc);
        }
        public int ozellikEkleString(int ozellikTipId, string ozellikAd)
        {
            dm.AddInParameters("@ozlAd", SqlDbType.NVarChar, ozellikAd);
            dm.AddInParameters("@ozlTipId", SqlDbType.Int, ozellikTipId);
            int sonuc = dm.ExecuteNonQuery("insert into Ozellik values(@ozlTipId,@ozlAd)", CommandType.Text);

            return(sonuc);
        }
        public int semtEkleString(string gelenSemtAd, int ilceId)
        {
            dm.AddInParameters("@gelenSemtAd", SqlDbType.NVarChar, gelenSemtAd);
            dm.AddInParameters("@ilceId", SqlDbType.Int, ilceId);
            int sonuc = dm.ExecuteNonQuery("insert into Semt values(@gelenSemtAd,@ilceId)", CommandType.Text);

            return(sonuc);
        }
        public int fiyatEkleString(int emlakId, int tl, int euro, int dolar, int pound)
        {
            dm.AddInParameters("@emlakId", SqlDbType.Int, emlakId);
            dm.AddInParameters("@tl", SqlDbType.Int, tl);
            dm.AddInParameters("@euro", SqlDbType.Int, euro);
            dm.AddInParameters("@dolar", SqlDbType.Int, dolar);
            dm.AddInParameters("@pound", SqlDbType.Int, pound);
            int sonuc = dm.ExecuteNonQuery("insert into Fiyat values(@emlakId,@tl,@euro,@dolar,@pound)", CommandType.Text);

            return(sonuc);
        }
Пример #6
0
        public static bool emlakEkleEmlak(Emlak e)
        {
            dm.AddInParameters("@emlakTuru", SqlDbType.NVarChar, e.EmlakTuru);
            dm.AddInParameters("@emlakTipId", SqlDbType.Int, e.EmlakTipId);
            dm.AddInParameters("@emlakBoyut", SqlDbType.NVarChar, e.EmlakBoyut);
            int sonuc = dm.ExecuteNonQuery("insert into Emlak values(@emlakTuru, @emlakTipId, @emlakBoyut)", CommandType.Text);

            bool eklendiMi = true;

            if (sonuc <= 0)
            {
                eklendiMi = false;
            }
            return(eklendiMi);
        }
        public int isitmaTipSilId(int gelenId)
        {
            dm.AddInParameters("@isTipId", SqlDbType.Int, gelenId);
            int sonuc = dm.ExecuteNonQuery("delete from IsitmaTip where IsitmaTipId = @isTipId", CommandType.Text);

            return(sonuc);
        }
        public int emlakTipGuncelleId(int emlakTipId, string emlakTipAd)
        {
            int sonuc = 0;

            try
            {
                dm.AddInParameters("@emlakTipId", SqlDbType.Int, emlakTipId);
                dm.AddInParameters("@emlakTipAd", SqlDbType.NVarChar, emlakTipAd);
                sonuc = dm.ExecuteNonQuery("update EmlakTip set EmlakTipAd=@emlakTipAd where EmlakTipId=@emlakTipId", CommandType.Text);
            }
            catch (Exception)
            {
            }

            return(sonuc);
        }
        public int isitmaTipEkleString(string isitmaTipAd)
        {
            dm.AddInParameters("@isitmaTipAd", SqlDbType.NVarChar, isitmaTipAd);
            int sonuc = dm.ExecuteNonQuery("insert into IsitmaTip values(@isitmaTipAd)", CommandType.Text);

            return(sonuc);
        }
        public int kategoriGuncelleId(int kategoriId, string KategoriAd)
        {
            int sonuc = 0;

            try
            {
                dm.AddInParameters("@kategoriId", SqlDbType.Int, kategoriId);
                dm.AddInParameters("@kategoriAd", SqlDbType.NVarChar, KategoriAd);
                sonuc = dm.ExecuteNonQuery("update Kategori set KategoriAd=@KategoriAd where KategoriId=@KategoriId", CommandType.Text);
            }
            catch (Exception)
            {
            }

            return(sonuc);
        }
Пример #11
0
        public int fiyatSilEmlakId(int gelenId)
        {
            dm.AddInParameters("@emlakId", SqlDbType.Int, gelenId);
            int sonuc = dm.ExecuteNonQuery("delete from Fiyat where EmlakId = @emlakId", CommandType.Text);

            return(sonuc);
        }
Пример #12
0
        public int kategoriSilId(int gelenId)
        {
            dm.AddInParameters("@kategoriId", SqlDbType.Int, gelenId);
            int sonuc = dm.ExecuteNonQuery("delete from Kategori where KategoriId = @kategoriId", CommandType.Text);

            return(sonuc);
        }
        public int ozellikSilId(int gelenId)
        {
            dm.AddInParameters("@oId", SqlDbType.Int, gelenId);
            int sonuc = dm.ExecuteNonQuery("delete from Ozellik where OzellikId = @oId", CommandType.Text);

            return(sonuc);
        }
        public int sehirSilId(int gelenId)
        {
            dm.AddInParameters("@shrId", SqlDbType.Int, gelenId);
            int sonuc = dm.ExecuteNonQuery("delete from Sehir where SehirId = @shrId", CommandType.Text);

            return(sonuc);
        }
Пример #15
0
        public int caddeSilId(int gelenId)
        {
            dm.AddInParameters("@cdId", SqlDbType.Int, gelenId);
            int sonuc = dm.ExecuteNonQuery("delete from Cadde where CaddeId = @cdId", CommandType.Text);

            return(sonuc);
        }
        public int semtGuncelleId(int semtId, string semtAd, int ilceId)
        {
            int sonuc = 0;

            try
            {
                dm.AddInParameters("@smtId", SqlDbType.Int, semtId);
                dm.AddInParameters("@smtAd", SqlDbType.NVarChar, semtAd);
                dm.AddInParameters("@ilceId", SqlDbType.Int, ilceId);
                sonuc = dm.ExecuteNonQuery("update Semt set SemtAd = @smtAd, IlceId = @ilceId where SemtId = @smtId", CommandType.Text);
            }
            catch (Exception)
            {
            }

            return(sonuc);
        }
        public int caddeGuncelleId(int caddeId, string caddeAd, int semtId)
        {
            int sonuc = 0;

            try
            {
                dm.AddInParameters("@cdId", SqlDbType.Int, caddeId);
                dm.AddInParameters("@cdAd", SqlDbType.NVarChar, caddeAd);
                dm.AddInParameters("@smtId", SqlDbType.Int, semtId);
                sonuc = dm.ExecuteNonQuery("update Cadde set CaddeAd = @cdAd, SemtId = @smtId where CaddeId = @cdId", CommandType.Text);
            }
            catch (Exception)
            {
            }

            return(sonuc);
        }
Пример #18
0
        public int ilceGuncelleId(int ilceId, string ilceAd, int sehirId)
        {
            int sonuc = 0;

            try
            {
                dm.AddInParameters("@ilceId", SqlDbType.Int, ilceId);
                dm.AddInParameters("@ilceAd", SqlDbType.NVarChar, ilceAd);
                dm.AddInParameters("@sehirId", SqlDbType.Int, sehirId);
                sonuc = dm.ExecuteNonQuery("update Ilce set IlceAd = @ilceAd, SehirId = @sehirId where IlceId = @ilceId", CommandType.Text);
            }
            catch (Exception ex)
            {
            }

            return(sonuc);
        }
        public int sehirGuncelleId(int sehirId, string sehirAd, int postaKodu)
        {
            int sonuc = 0;

            try
            {
                dm.AddInParameters("@shrId", SqlDbType.Int, sehirId);
                dm.AddInParameters("@shrAd", SqlDbType.NVarChar, sehirAd);
                dm.AddInParameters("@postaKodu", SqlDbType.Int, postaKodu);
                sonuc = dm.ExecuteNonQuery("update Sehir set SehirAd = @shrAd, PostaKodu = @postaKodu where SehirId = @shrId", CommandType.Text);
            }
            catch (Exception)
            {
            }

            return(sonuc);
        }
Пример #20
0
        public int ozellikGuncelleId(int ozellikId, int ozellikTipId, string ozellikAd)
        {
            int sonuc = 0;

            try
            {
                dm.AddInParameters("@oId", SqlDbType.Int, ozellikId);
                dm.AddInParameters("@oAd", SqlDbType.NVarChar, ozellikAd);
                dm.AddInParameters("@oTipId", SqlDbType.Int, ozellikTipId);
                sonuc = dm.ExecuteNonQuery("update Ozellik set OzellikAd=@oAd,OzellikTipId=@oTipId where OzellikId=@oId", CommandType.Text);
            }
            catch (Exception)
            {
            }

            return(sonuc);
        }
        public int fiyatGuncelleEmlakId(int emlakId, int tl, int euro, int dolar, int pound)
        {
            int sonuc = 0;

            try
            {
                dm.AddInParameters("@emlakId", SqlDbType.Int, emlakId);
                dm.AddInParameters("@tl", SqlDbType.Int, tl);
                dm.AddInParameters("@euro", SqlDbType.Int, euro);
                dm.AddInParameters("@dolar", SqlDbType.Int, dolar);
                dm.AddInParameters("@pound", SqlDbType.Int, pound);
                sonuc = dm.ExecuteNonQuery("update Fiyat set TL = @tl, Euro=@euro, Dolar=@dolar, Pound=@pound where EmlakId = @emlakId", CommandType.Text);
            }
            catch (Exception ex)
            {
            }

            return(sonuc);
        }
Пример #22
0
        public int emlakOzellikSilIdler(int gelenEmlakId, List <int> ozellikIdleri)
        {
            int sonuc = 0;

            try
            {
                foreach (int ozlId in ozellikIdleri)
                {
                    dm.AddInParameters("@emlakId", SqlDbType.Int, gelenEmlakId);
                    dm.AddInParameters("@ozellikId", SqlDbType.Int, ozlId);
                    sonuc += dm.ExecuteNonQuery("delete EmlakOzellik where EmlakId = @emlakId and OzellikId = @ozellikId", CommandType.Text);
                    dm.ClearParameters();
                }
            }
            catch (Exception ex)
            {
            }

            return(sonuc);
        }
Пример #23
0
        public bool emlakTipEkleString(string gelenEmlakTip)
        {
            bool eklendiMi = false;

            dm.AddInParameters("@emlakTip", SqlDbType.NVarChar, gelenEmlakTip);
            int sonuc = dm.ExecuteNonQuery("insert into EmlakTip values(@emlakTip)", CommandType.Text);

            if (sonuc > 0)
            {
                eklendiMi = true;
            }
            return(eklendiMi);
        }
Пример #24
0
        public bool emlakTipSilId(int gelenId)
        {
            bool silindiMi = false;

            dm.AddInParameters("@emlakTipId", SqlDbType.Int, gelenId);
            int sonuc = dm.ExecuteNonQuery("delete from EmlakTip where EmlakTipId = @emlakTipId", CommandType.Text);

            if (sonuc > 0)
            {
                silindiMi = true;
            }
            return(silindiMi);
        }
        public int emlakTipSilId(int gelenId)
        {
            int sonuc = 0;

            try
            {
                dm.AddInParameters("@emlakTipId", SqlDbType.Int, gelenId);
                sonuc = dm.ExecuteNonQuery("delete from EmlakTip where EmlakTipId = @emlakTipId", CommandType.Text);
            }
            catch (Exception ex)
            {
            }
            return(sonuc);
        }
Пример #26
0
        public int ilceSilId(int gelenId)
        {
            int sonuc = 0;

            try
            {
                dm.AddInParameters("@ilceId", SqlDbType.Int, gelenId);
                sonuc = dm.ExecuteNonQuery("delete from Ilce where IlceId = @ilceId", CommandType.Text);
            }
            catch (Exception ex)
            {
            }
            return(sonuc);
        }
Пример #27
0
        public int emlakOzellikEkleString(ArrayList ozellikIdLer, int emlakId)
        {
            int sonuc = 0;

            try
            {
                foreach (string item in ozellikIdLer)
                {
                    dm.AddInParameters("@ozellikId", SqlDbType.Int, Convert.ToInt32(item));
                    dm.AddInParameters("@emlakId", SqlDbType.Int, emlakId);
                    int sayi = dm.ExecuteNonQuery("prcEmlakOzellikEkle", CommandType.StoredProcedure);
                    if (sayi > 0)
                    {
                        sonuc += sayi;
                    }
                    dm.ClearParameters();
                }
            }
            catch (Exception ex)
            {
            }

            return(sonuc);
        }
        public int emlakTipEkleString(string gelenEmlakTip)
        {
            int sonuc = 0;

            try
            {
                dm.AddInParameters("@emlakTipAd", SqlDbType.NVarChar, gelenEmlakTip);
                sonuc = dm.ExecuteNonQuery("insert into EmlakTip values(@emlakTipAd)", CommandType.Text);
            }
            catch (Exception ex)
            {
            }

            return(sonuc);
        }
        public int adresEkleString(adres a)
        {
            dm.AddInParameters("@emlakId", SqlDbType.Int, a.EmlakId);
            dm.AddInParameters("@shrId", SqlDbType.Int, a.SehirId);
            dm.AddInParameters("@ilceId", SqlDbType.Int, a.IlceId);
            dm.AddInParameters("@smtId", SqlDbType.Int, a.SemtId);
            dm.AddInParameters("@adresTarifi", SqlDbType.NVarChar, a.AdresTarifi);
            dm.AddInParameters("@cdId", SqlDbType.Int, a.CaddeId);
            int sonuc = dm.ExecuteNonQuery("insert into Adres values(@emlakId,@shrId,@ilceId,@smtId,@adresTarifi,@cdId)", CommandType.Text);

            return(sonuc);
        }
        public int adresGuncelleId(adres gelenA)
        {
            int sonuc = 0;

            try
            {
                dm.AddInParameters("@emlakId", SqlDbType.Int, gelenA.EmlakId);
                dm.AddInParameters("@sehirId", SqlDbType.Int, gelenA.SehirId);
                dm.AddInParameters("@ilceId", SqlDbType.Int, gelenA.IlceId);
                dm.AddInParameters("@semtId", SqlDbType.Int, gelenA.SemtId);
                dm.AddInParameters("@adresTarifi", SqlDbType.NVarChar, gelenA.AdresTarifi);
                dm.AddInParameters("@cdId", SqlDbType.Int, gelenA.CaddeId);
                sonuc = dm.ExecuteNonQuery("update Adres set SehirId = @sehirId, IlceId = @ilceId, SemtId = @semtId, AdresTarifi = @adresTarifi, CaddeId = @cdId where EmlakId = @emlakId", CommandType.Text);
            }
            catch (Exception ex)
            {
            }

            return(sonuc);
        }