Пример #1
0
 internal string alHataKodu(IlklendirCalisanEkleIstek istek)
 {
     return(Sabitler.UygulamaKodu);
 }
Пример #2
0
        public IlklendirCalisanEkleYanitViewModel IlklendirCalisanEkle(IlklendirCalisanEkleIstekViewModel istek)
        {
            try
            {
                IlklendirCalisanEkleYanitViewModel yanit     = new IlklendirCalisanEkleYanitViewModel(false);
                List <SelectListItem>     akademikUnvanListe = null;
                List <SelectListItem>     cinsiyetListe      = null;
                List <SelectListItem>     kanGrubuListe      = null;
                List <SelectListItem>     phDegeriListe      = null;
                List <SelectListItem>     ogrenimDurumuListe = null;
                List <SelectListItem>     unvanListe         = null;
                List <SelectListItem>     sinifListe         = null;
                List <SelectListItem>     medeniDurumuListe  = null;
                List <SelectListItem>     kadrosuListe       = null;
                IlklendirCalisanEkleYanit modelYanit         = null;
                IlklendirCalisanEkleIstek modelIstek         = null;
                int kullaniciId = int.MinValue;

                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 IlklendirCalisanEkleIstek(kullaniciId);

                modelYanit = this._calisanServis.IlklendirCalisanEkle(modelIstek);

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

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

                akademikUnvanListe = this._cevir.cevir(modelYanit.AkademikUnvanListe.ToList());

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

                cinsiyetListe = this._cevir.cevir(modelYanit.CinsiyetListe.ToList());

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

                kanGrubuListe = this._cevir.cevir(modelYanit.KanGrubuListe.ToList());

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

                phDegeriListe = this._cevir.cevir(modelYanit.PhDegeriListe.ToList());

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

                ogrenimDurumuListe = this._cevir.cevir(modelYanit.OgrenimDurumuListe.ToList());

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

                unvanListe = this._cevir.cevir(modelYanit.UnvanListe.ToList());

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

                sinifListe = this._cevir.cevir(modelYanit.SinifListe.ToList());

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

                medeniDurumuListe = this._cevir.cevir(modelYanit.MedeniDurumuListe.ToList());

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

                kadrosuListe = this._cevir.cevir(modelYanit.KadrosuListe.ToList());

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

                yanit = new IlklendirCalisanEkleYanitViewModel(akademikUnvanListe, cinsiyetListe, kanGrubuListe, phDegeriListe, ogrenimDurumuListe,
                                                               unvanListe, sinifListe, medeniDurumuListe, kadrosuListe);

                return(yanit);
            }
            catch (Exception hata)
            {
                this._hataServis.YazHata(hata);
                return(new IlklendirCalisanEkleYanitViewModel(hata));
            }
        }
Пример #3
0
 internal bool uygunMu(IlklendirCalisanEkleIstek istek)
 {
     return(!(istek == null));
 }
        public IlklendirCalisanEkleYanit IlklendirCalisanEkle(IlklendirCalisanEkleIstek istek)
        {
            try
            {
                IlklendirCalisanEkleYanit    yanit = new IlklendirCalisanEkleYanit(false);
                IEnumerable <AkademikUnvani> akademikUnvanListe = new List <AkademikUnvani>();
                IEnumerable <Cinsiyeti>      cinsiyetListe      = new List <Cinsiyeti>();
                IEnumerable <KanGrubu>       kanGrubuListe      = new List <KanGrubu>();
                IEnumerable <RhDegeri>       phDegeriListe      = new List <RhDegeri>();
                IEnumerable <OgrenimDurumu>  ogrenimDurumuListe = new List <OgrenimDurumu>();
                IEnumerable <Unvan>          unvanListe         = new List <Unvan>();
                IEnumerable <Sinif>          sinifListe         = new List <Sinif>();
                IEnumerable <MedeniDurumu>   medeniDurumuListe  = new List <MedeniDurumu>();
                IEnumerable <Kadrosu>        kadrosuListe       = new List <Kadrosu>();

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

                akademikUnvanListe = this._tanimlayiciVarlikIsKurali.GetirAkademikUnvanListe(true);

                if (akademikUnvanListe == null || akademikUnvanListe.Any())
                {
                    akademikUnvanListe = new List <AkademikUnvani>();
                    this._hataServis.YazHata(new IslemBasarisizHatasi(Arac.AlHataLokasyonu <CalisanServis>(173)));
                }

                cinsiyetListe = this._tanimlayiciVarlikIsKurali.GetirCinsiyetListe(true);

                if (cinsiyetListe == null || cinsiyetListe.Any())
                {
                    cinsiyetListe = new List <Cinsiyeti>();
                    this._hataServis.YazHata(new IslemBasarisizHatasi(Arac.AlHataLokasyonu <CalisanServis>(181)));
                }

                kanGrubuListe = this._tanimlayiciVarlikIsKurali.GetirKanGrubuListe(true);

                if (kanGrubuListe == null || kanGrubuListe.Any())
                {
                    kanGrubuListe = new List <KanGrubu>();
                    this._hataServis.YazHata(new IslemBasarisizHatasi(Arac.AlHataLokasyonu <CalisanServis>(189)));
                }

                phDegeriListe = this._tanimlayiciVarlikIsKurali.GetirPhDegeriListe(true);

                if (phDegeriListe == null || phDegeriListe.Any())
                {
                    phDegeriListe = new List <RhDegeri>();
                    this._hataServis.YazHata(new IslemBasarisizHatasi(Arac.AlHataLokasyonu <CalisanServis>(197)));
                }

                ogrenimDurumuListe = this._tanimlayiciVarlikIsKurali.GetirOgrenimDurumuListe(true);

                if (ogrenimDurumuListe == null || ogrenimDurumuListe.Any())
                {
                    ogrenimDurumuListe = new List <OgrenimDurumu>();
                    this._hataServis.YazHata(new IslemBasarisizHatasi(Arac.AlHataLokasyonu <CalisanServis>(205)));
                }

                unvanListe = this._tanimlayiciVarlikIsKurali.GetirUnvanListe(true);

                if (unvanListe == null || unvanListe.Any())
                {
                    unvanListe = new List <Unvan>();
                    this._hataServis.YazHata(new IslemBasarisizHatasi(Arac.AlHataLokasyonu <CalisanServis>(213)));
                }

                sinifListe = this._tanimlayiciVarlikIsKurali.GetirSinifListe(true);

                if (sinifListe == null || sinifListe.Any())
                {
                    sinifListe = new List <Sinif>();
                    this._hataServis.YazHata(new IslemBasarisizHatasi(Arac.AlHataLokasyonu <CalisanServis>(221)));
                }

                medeniDurumuListe = this._tanimlayiciVarlikIsKurali.GetirMedeniDurumuListe(true);

                if (medeniDurumuListe == null || medeniDurumuListe.Any())
                {
                    medeniDurumuListe = new List <MedeniDurumu>();
                    this._hataServis.YazHata(new IslemBasarisizHatasi(Arac.AlHataLokasyonu <CalisanServis>(229)));
                }

                kadrosuListe = this._tanimlayiciVarlikIsKurali.GetirKadrosuListe(true);

                if (kadrosuListe == null || kadrosuListe.Any())
                {
                    kadrosuListe = new List <Kadrosu>();
                    this._hataServis.YazHata(new IslemBasarisizHatasi(Arac.AlHataLokasyonu <CalisanServis>(237)));
                }

                yanit = new IlklendirCalisanEkleYanit(akademikUnvanListe, cinsiyetListe, kanGrubuListe, phDegeriListe, ogrenimDurumuListe, unvanListe,
                                                      sinifListe, medeniDurumuListe, kadrosuListe);

                return(yanit);
            }
            catch (Exception hata)
            {
                this._hataServis.YazHata(hata);
                return(new IlklendirCalisanEkleYanit(hata));
            }
        }