예제 #1
0
        public int MusteriEkle(Musteriler m)
        {
            int kayitSayisi = 0;

            string sql = "Insert into Musteri (MusteriAdi,city,tel)Values(@ad,@il,@tel)";

            kayitSayisi = con.Execute(sql, new { @ad = m.MusteriAdi, @il = m.city, @tel = m.Tel });
            return(kayitSayisi);
        }
예제 #2
0
        public int MusteriEkle(string ad, string city, string tel)
        {
            int a = 0;

            DAL.Musteriler m = new DAL.Musteriler();
            if (!string.IsNullOrEmpty(ad) && !string.IsNullOrEmpty(tel))
            {
                m.MusteriAdi = ad;
                m.city       = city;
                m.Tel        = tel;
                a            = 1;
                dal.MusteriEkle(m);
            }

            else
            {
                a = -1;
            }

            return(a);
        }