internal bool uygunMu(IlklendirCalisanGorevlendirmeIstekViewModel istek) { return(!(istek == null)); }
internal string alHataKodu(IlklendirCalisanGorevlendirmeIstekViewModel istek) { return(""); }
public IlklendirCalisanGorevlendirmeYanitViewModel IlklendirCalisanGorevlendirme(IlklendirCalisanGorevlendirmeIstekViewModel istek) { try { IlklendirCalisanGorevlendirmeYanitViewModel yanit = new IlklendirCalisanGorevlendirmeYanitViewModel(false); IlklendirCalisanGorevlendirmeYanit servisYanit = null; IlklendirCalisanGorevlendirmeIstek servisIstek = null; int kullaniciId, gorevlendirilecekCalisanId = int.MinValue; CalisanViewModel calisanVm = null; CalisanGorevlendirmeViewModel gorevlendirmeVm = null; IEnumerable <GoreviViewModel> gorevVmListe = null; if (!this._kontrol.uygunMu(istek)) { yanit.IsaretleGecemediIlkKontrolu(this._kontrol.alHataKodu(istek)); return(yanit); } kullaniciId = istek.KullaniciId ?? int.MinValue; gorevlendirilecekCalisanId = istek.GorevlendirilecekCalisanId ?? int.MinValue; servisIstek = new IlklendirCalisanGorevlendirmeIstek(kullaniciId, gorevlendirilecekCalisanId); servisYanit = this._gorevlendirmeServis.IlklendirCalisanGorevlendirme(servisIstek); if (servisYanit == null) { throw new ApplicationException(); } if (!servisYanit.BasariliMi) { throw new ApplicationException(); } calisanVm = this._cevir.cevir(servisYanit.Calisani); if (calisanVm == null) { throw new ApplicationException(); } gorevlendirmeVm = this._cevir.cevir(servisYanit.MevcutGorevi); if (gorevlendirmeVm == null) { throw new ApplicationException(); } gorevVmListe = this._cevir.cevir(servisYanit.GorevListe.ToList()); if (gorevVmListe == null) { throw new ApplicationException(); } yanit = new IlklendirCalisanGorevlendirmeYanitViewModel(calisanVm, gorevlendirmeVm, servisYanit.BirimListe, gorevVmListe, servisYanit.IlListe); return(yanit); } catch (Exception) { throw; } }