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)); } }
public ActionResult SorgulaKisi() { try { SorgulaCalisanIstekViewModel vm = null; vm = new SorgulaCalisanIstekViewModel(int.MinValue, null); return(View(vm)); } catch (Exception) { throw; } }
internal string alHataKodu(SorgulaCalisanIstekViewModel istek) { return(""); }
internal bool uygunMu(SorgulaCalisanIstekViewModel istek) { return(!(istek == null)); }