public JsonResult musteriEkle(TBL_MUSTERILER m1)
        {
            MusteriRepository musRep = new MusteriRepository();
            var musteriEkle          = musRep.musteriEkle(m1);

            return(Json(musteriEkle));
        }
Exemple #2
0
        public List <MusteriBilgileriDTO> Get()
        {
            using (MusteriRepository musteriRepo = new MusteriRepository())
            {
                try
                {
                    var Musteriler = new List <MusteriBilgileriDTO>();
                    var model      = musteriRepo.Get();
                    foreach (var ent in model.ToList())
                    {
                        var musteridto = new MusteriBilgileriDTO();
                        musteridto.acikAdres     = ent.acikAdres;
                        musteridto.adi           = ent.adi;
                        musteridto.cinsiyet      = ent.cinsiyet;
                        musteridto.dogumTarihi   = ent.dogumTarihi;
                        musteridto.ehliyetTarihi = ent.ehliyetTarihi;
                        musteridto.ilID          = ent.ilID;
                        musteridto.musteriID     = ent.musteriID;
                        musteridto.Sehir         = ent.İl.ilAdi;
                        musteridto.soyadi        = ent.soyadi;
                        musteridto.telNo         = ent.telNo;

                        Musteriler.Add(musteridto);
                    }
                    return(Musteriler);
                }
                catch (Exception ex)
                {
                    throw;
                }
            }
        }
        public ActionResult Create(BakimAnlasma model)
        {
            try
            {
                using (BakimAnlasmaRepository repo = new BakimAnlasmaRepository())
                {
                    model.KayitTarihi = DateTime.Now;
                    repo.Ekle(model);
                }

                return(RedirectToAction("Index"));
            }
            catch
            {
                using (MusteriRepository repo = new MusteriRepository())
                {
                    var musteriler = repo.Listele(x => !x.Silindi);
                    ViewBag.Musteriler = new SelectList(musteriler, "Id", "FirmaAdi");;
                }

                using (BakimAnlasmaTipRepository repo = new BakimAnlasmaTipRepository())
                {
                    var anlasmaTipleri = repo.Listele(x => !x.Silindi);
                    ViewBag.AnlasmaTipleri = new SelectList(anlasmaTipleri, "Id", "Adi");;
                }
                return(View(model));
            }
        }
Exemple #4
0
        public MusteriBilgileriDTO GetById(int id)
        {
            using (MusteriRepository musteriRepo = new MusteriRepository())
            {
                try
                {
                    var ent = musteriRepo.GetById(id);

                    var musteridto = new MusteriBilgileriDTO();
                    musteridto.acikAdres     = ent.acikAdres;
                    musteridto.adi           = ent.adi;
                    musteridto.cinsiyet      = ent.cinsiyet;
                    musteridto.dogumTarihi   = ent.dogumTarihi;
                    musteridto.ehliyetTarihi = ent.ehliyetTarihi;
                    musteridto.ilID          = ent.ilID;
                    musteridto.musteriID     = ent.musteriID;
                    musteridto.Sehir         = ent.İl.ilAdi;
                    musteridto.soyadi        = ent.soyadi;
                    musteridto.telNo         = ent.telNo;

                    return(musteridto);
                }
                catch (Exception ex)
                {
                    throw;
                }
            }
        }
 public void Update(MusteriDTO model)
 {
     using (MusteriRepository musteriRepo = new MusteriRepository())
     {
         try
         {
             var musteri = new Musteri();
             musteri.sifre            = model.sifre;
             musteri.tckn             = model.tckn;
             musteri.ad               = model.ad;
             musteri.soyad            = model.soyad;
             musteri.dogumTarihi      = model.dogumTarihi;
             musteri.kayıtTarihi      = model.kayıtTarihi;
             musteri.cepTelefonu      = model.cepTelefonu;
             musteri.mail             = model.mail;
             musteri.acikAdres        = model.acikAdres;
             musteri.acilisPlatformID = model.acilisPlatformID;
             musteriRepo.Update(musteri);
         }
         catch
         {
             throw;
         }
     }
 }
Exemple #6
0
        // GET: Admin/ServisForm/Create
        public ActionResult Create()
        {
            using (MusteriRepository repo = new MusteriRepository())
            {
                var liste = repo.Listele(x => !x.Silindi);
                ViewBag.Musteriler = new SelectList(liste, "Id", "FirmaAdi");;
            }

            using (ServisTipRepository repo = new ServisTipRepository())
            {
                var liste = repo.Listele(x => !x.Silindi);
                ViewBag.ServisTipleri = new SelectList(liste, "Id", "Adi");;
            }

            using (ServisIcerikRepository repo = new ServisIcerikRepository())
            {
                var liste = repo.Listele(x => !x.Silindi);
                ViewBag.ServisIcerikleri = new SelectList(liste, "Id", "Adi");;
            }

            using (ServisSekliRepository repo = new ServisSekliRepository())
            {
                var liste = repo.Listele(x => !x.Silindi);
                ViewBag.ServisSekilleri = new SelectList(liste, "Id", "Adi");;
            }

            using (BakimAnlasmaRepository repo = new BakimAnlasmaRepository())
            {
                var liste = repo.Listele(x => !x.Silindi);
                ViewBag.BakimAnlasmalari = new SelectList(liste, "Id", "Musterisi.FirmaAdi");;
            }

            return(View());
        }
        // GET: Musteri
        public JsonResult GetMusteriListJson()
        {
            MusteriRepository musRep = new MusteriRepository();
            var list = musRep.List();

            return(Json(new { data = musRep.List() }, JsonRequestBehavior.AllowGet));
        }
Exemple #8
0
 // GET: Admin/Musteri/Details/5
 public ActionResult Details(int id)
 {
     using (var repo = new MusteriRepository())
     {
         var model = repo.Getir(x => x.Id == id);
         return(View(model));
     }
 }
Exemple #9
0
        void KayitListe()
        {
            List <Musteri> musteriListesi = new List <Musteri>();

            using (MusteriRepository musterirepo = new MusteriRepository())
            {
                musteriListesi = musterirepo.TumListe();
            }
            grd_musteri.DataSource = musteriListesi;
        }
Exemple #10
0
 public EntityService()
 {
     _biletService   = new BiletRepository();
     _calisanService = new CalisanRepository();
     _filmService    = new FilmRepository();
     _filmturService = new FilmTurRepository();
     _musteriService = new MusteriRepository();
     _salonService   = new SalonRepository();
     _seansService   = new SeansRepository();
 }
        public ActionResult Index()
        {
            MusteriRepository   objMustetiRepository   = new MusteriRepository();
            ItemRepository      objItemRepository      = new ItemRepository();
            OdemeTipiRepository objOdemeTipiRepository = new OdemeTipiRepository();


            var objMultipleModels = new Tuple <IEnumerable <SelectListItem>, IEnumerable <SelectListItem>, IEnumerable <SelectListItem> >
                                        (objMustetiRepository.GetAllCustomers(), objItemRepository.GetAllItems(), objOdemeTipiRepository.GetAllPaymentType());

            return(View(objMultipleModels));
        }
Exemple #12
0
        // GET: Admin/Musteri/Edit/5
        public ActionResult Edit(int id)
        {
            using (BayiRepository bayiRepo = new BayiRepository())
            {
                var bayiler = bayiRepo.Listele(x => !x.Silindi);
                ViewBag.Bayiler = new SelectList(bayiler, "Id", "Adi");;
            }

            using (var repo = new MusteriRepository())
            {
                var model = repo.Getir(x => x.Id == id);
                return(View(model));
            }
        }
 public EntityService()
 {
     arizaRepository       = new ArizaRepository();
     detayRepository       = new DetayRepository();
     kategoriRepository    = new KategoriRepository();
     markaRepository       = new MarkaRepository();
     modelRepository       = new ModelRepository();
     musteriRepository     = new MusteriRepository();
     personelRepository    = new PersonelRepository();
     servisDurumRepository = new ServisDurumRepository();
     servisYeriRepository  = new ServisYeriRepository();
     urunRepository        = new UrunRepository();
     urunTeslimRepository  = new UrunTeslimRepository();
 }
 public void Delete(int id)
 {
     using (MusteriRepository musteriRepo = new MusteriRepository())
     {
         try
         {
             musteriRepo.Delete(id);
         }
         catch
         {
             throw;
         }
     }
 }
Exemple #15
0
 public void Add(MusteriBilgileri model)
 {
     using (MusteriRepository musteriRepo = new MusteriRepository())
     {
         try
         {
             musteriRepo.Add(model);
         }
         catch (Exception ex)
         {
             throw;
         }
     }
 }
Exemple #16
0
        public ActionResult Create(ServisForm model)
        {
            try
            {
                using (ServisFormRepository repo = new ServisFormRepository())
                {
                    model.KayitTarihi = DateTime.Now;
                    model.KullaniciId = ((Kullanici)Session["User"]).Id;
                    repo.Ekle(model);
                }


                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                //return RedirectToAction(nameof(Create));
                using (MusteriRepository repo = new MusteriRepository())
                {
                    var liste = repo.Listele(x => !x.Silindi);
                    ViewBag.Musteriler = new SelectList(liste, "Id", "FirmaAdi");;
                }

                using (ServisTipRepository repo = new ServisTipRepository())
                {
                    var liste = repo.Listele(x => !x.Silindi);
                    ViewBag.ServisTipleri = new SelectList(liste, "Id", "Adi");;
                }

                using (ServisIcerikRepository repo = new ServisIcerikRepository())
                {
                    var liste = repo.Listele(x => !x.Silindi);
                    ViewBag.ServisIcerikleri = new SelectList(liste, "Id", "Adi");;
                }

                using (ServisSekliRepository repo = new ServisSekliRepository())
                {
                    var liste = repo.Listele(x => !x.Silindi);
                    ViewBag.ServisSekilleri = new SelectList(liste, "Id", "Adi");;
                }

                using (BakimAnlasmaRepository repo = new BakimAnlasmaRepository())
                {
                    var liste = repo.Listele(x => !x.Silindi);
                    ViewBag.BakimAnlasmalari = new SelectList(liste, "Id", "Musterisi.FirmaAdi");;
                }
                return(View(model));
            }
        }
 public MusteriDTO GetById(int id)
 {
     using (MusteriRepository musteriRepo = new MusteriRepository())
     {
         try
         {
             var model = musteriRepo.GetById(x => x.musteriNo == id, x => x.Hesap, x => x.AcilisPlatformu);
             return(musteriMapper.Map(model));
         }
         catch
         {
             throw;
         }
     }
 }
        // GET: Admin/BakimAnlasma/Create
        public ActionResult Create()
        {
            using (MusteriRepository repo = new MusteriRepository())
            {
                var musteriler = repo.Listele(x => !x.Silindi);
                ViewBag.Musteriler = new SelectList(musteriler, "Id", "FirmaAdi");;
            }

            using (BakimAnlasmaTipRepository repo = new BakimAnlasmaTipRepository())
            {
                var anlasmaTipleri = repo.Listele(x => !x.Silindi);
                ViewBag.AnlasmaTipleri = new SelectList(anlasmaTipleri, "Id", "Adi");;
            }
            return(View());
        }
Exemple #19
0
 private void btn_ornekdata_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < 200; i++)
     {
         Musteri musteri = new Musteri();
         musteri.Ad         = FakeData.NameData.GetFirstName();
         musteri.Soyad      = FakeData.NameData.GetSurname();
         musteri.EmailAdres = musteri.Ad + "." + musteri.Soyad + "@" + FakeData.NetworkData.GetDomain();
         using (MusteriRepository musterirepo = new MusteriRepository())
         {
             musterirepo.KayitEKLE(musteri);
         }
     }
     KayitListe();
 }
 public List <MusteriDTO> Get()
 {
     using (MusteriRepository musteriRepo = new MusteriRepository())
     {
         try
         {
             var model = musteriRepo.Get(x => x.Hesap, x => x.AcilisPlatformu);
             return(musteriMapper.MapAll(model));
         }
         catch
         {
             throw;
         }
     }
 }
 public Musteri MusteriKullaniciIdSec(int KullaniciId)
 {
     try
     {
         Musteri responseEntitiy = null;
         using (var repo = new MusteriRepository())
         {
             responseEntitiy = repo.KullaniciIdSec(KullaniciId);
         }
         return(responseEntitiy);
     }
     catch (Exception ex)
     {
         throw new Exception("MusteriBusiness:MusteriRepository:Seçme Hatası", ex);
     }
 }
 public Musteri MusteriAnahtarSec(string Anahtar)
 {
     try
     {
         Musteri responseEntitiy = null;
         using (var repo = new MusteriRepository())
         {
             responseEntitiy = repo.KeySec(Anahtar);
         }
         return(responseEntitiy);
     }
     catch (Exception ex)
     {
         throw new Exception("MusteriBusiness:MusteriRepository:Key Seçme Hatası", ex);
     }
 }
 public Musteri MusteriSecIsim(string MusteriAdi)
 {
     try
     {
         Musteri responseEntitiy = null;
         using (var repo = new MusteriRepository())
         {
             responseEntitiy = repo.MusteriAdSec(MusteriAdi);
         }
         return(responseEntitiy);
     }
     catch (Exception ex)
     {
         throw new Exception("MusteriBusiness:MusteriRepository:MusteriAdi Seçme Hatası", ex);
     }
 }
 public Musteri MusteriTCSec(string TCKimlik)
 {
     try
     {
         Musteri responseEntitiy = null;
         using (var repo = new MusteriRepository())
         {
             responseEntitiy = repo.TCSec(TCKimlik);
         }
         return(responseEntitiy);
     }
     catch (Exception ex)
     {
         throw new Exception("MusteriBusiness:MusteriRepository:Seçme Hatası", ex);
     }
 }
Exemple #25
0
        public ActionResult Edit(int id, ServisForm model)
        {
            try
            {
                using (var repo = new ServisFormRepository())
                {
                    model.GuncellemeTarihi = DateTime.Now;
                    repo.Guncelle(model);
                }

                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                using (MusteriRepository repo = new MusteriRepository())
                {
                    var liste = repo.Listele(x => !x.Silindi);
                    ViewBag.Musteriler = new SelectList(liste, "Id", "FirmaAdi");;
                }

                using (ServisTipRepository repo = new ServisTipRepository())
                {
                    var liste = repo.Listele(x => !x.Silindi);
                    ViewBag.ServisTipleri = new SelectList(liste, "Id", "Adi");;
                }

                using (ServisIcerikRepository repo = new ServisIcerikRepository())
                {
                    var liste = repo.Listele(x => !x.Silindi);
                    ViewBag.ServisIcerikleri = new SelectList(liste, "Id", "Adi");;
                }

                using (ServisSekliRepository repo = new ServisSekliRepository())
                {
                    var liste = repo.Listele(x => !x.Silindi);
                    ViewBag.ServisSekilleri = new SelectList(liste, "Id", "Adi");;
                }

                using (BakimAnlasmaRepository repo = new BakimAnlasmaRepository())
                {
                    var liste = repo.Listele(x => !x.Silindi);
                    ViewBag.BakimAnlasmalari = new SelectList(liste, "Id", "Musterisi.FirmaAdi");;
                }
                return(View(model));
            }
        }
        public IList <Musteri> TumMusteriler()
        {
            IList <Musteri> musteriler;

            try
            {
                using (var repo = new MusteriRepository())
                {
                    musteriler = repo.HepsiniSec();
                }
                return(musteriler);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public Musteri Giris(string TCKimlik, string parola)
        {
            Musteri Musteri = null;

            try
            {
                using (var repo = new MusteriRepository())
                {
                    Musteri = repo.Giris(TCKimlik, parola);
                }
                return(Musteri);
            }
            catch (Exception)
            {
                throw;
            }
        }
 public bool DeleteMusteriById(int ID)
 {
     try
     {
         bool isSuccess;
         using (var repo = new MusteriRepository())
         {
             isSuccess = repo.DeletedById(ID);
         }
         return(isSuccess);
     }
     catch (Exception ex)
     {
         LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true);
         throw new Exception("BusinessLogic:MusteriBusiness::DeleteMusteri::Error occured.", ex);
     }
 }
 public bool UpdateMusteri(Musteri entity)
 {
     try
     {
         bool isSuccess;
         using (var repo = new MusteriRepository())
         {
             isSuccess = repo.Update(entity);
         }
         return(isSuccess);
     }
     catch (Exception ex)
     {
         LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true);
         throw new Exception("BusinessLogic:MusteriBusiness::UpdateMusteri::Error occured.", ex);
     }
 }
 public bool InsertCustomer(Customers entity)
 {
     try
     {
         bool isSuccess;
         using (var repo = new MusteriRepository())
         {
             isSuccess = repo.Insert(entity);
         }
         return(isSuccess);
     }
     catch (Exception ex)
     {
         LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true);
         throw new Exception("BusinessLogic:CustomerBusiness::InsertCustomer::Error occured.", ex);
     }
 }