Exemplo n.º 1
0
        public SorgulaCalisanYanitViewModel SorgulaCalisan(SorgulaCalisanIstekViewModel istek)
        {
            try
            {
                SorgulaCalisanYanitViewModel yanit      = new SorgulaCalisanYanitViewModel(false);
                SorgulaCalisanYanit          modelYanit = null;
                SorgulaCalisanIstek          modelistek = null;
                int kullaniciId = int.MinValue;
                List <CalisanViewModel> vmListe = new List <CalisanViewModel>();

                if (!this._kontrol.uygunMu(istek))
                {
                    yanit.IsaretleGecemediIlkKontrolu(this._kontrol.alHataKodu(istek));
                    return(yanit);
                }

                kullaniciId = istek.KullaniciId ?? int.MinValue;

                if (kullaniciId == int.MinValue)
                {
                    throw new ArgumentException();
                }

                modelistek = new SorgulaCalisanIstek(kullaniciId, istek.SorguSozcesi);

                modelYanit = this._calisanServis.SorgulaCalisan(modelistek);

                if (modelYanit == null)
                {
                    throw new ApplicationException();
                }

                if (!modelYanit.BasariliMi)
                {
                    throw new ApplicationException();
                }

                vmListe = this._cevir.cevir(modelYanit.Liste.ToList());

                if (vmListe == null)
                {
                    throw new ApplicationException();
                }

                yanit = new SorgulaCalisanYanitViewModel(vmListe);

                return(yanit);
            }
            catch (Exception hata)
            {
                this._hataServis.YazHata(hata);
                return(new SorgulaCalisanYanitViewModel(hata));
            }
        }
Exemplo n.º 2
0
        public ActionResult SorgulaKisi()
        {
            try
            {
                SorgulaCalisanIstekViewModel vm = null;

                vm = new SorgulaCalisanIstekViewModel(int.MinValue, null);

                return(View(vm));
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 3
0
 internal string alHataKodu(SorgulaCalisanIstekViewModel istek)
 {
     return("");
 }
Exemplo n.º 4
0
 internal bool uygunMu(SorgulaCalisanIstekViewModel istek)
 {
     return(!(istek == null));
 }