예제 #1
0
        public BusinesLayerResult <User> Login(string mail, string sifre)
        {
            BusinesLayerResult <User> layerResult = new BusinesLayerResult <User>();

            layerResult.result = repo_User.Find(x => x.Mail == mail && x.Sifre == sifre);
            if (layerResult.result == null)
            {
                layerResult.addError(ErrosMesasagesCode.KullaniciBulunamadi, "Kullanıcı Bulunamadı!..");
            }
            return(layerResult);
        }
예제 #2
0
        public bool firmaKontrol(Int64 firmaID)
        {
            BusinesLayerResult <Firma> layerResult = new BusinesLayerResult <Firma>();

            layerResult.result = repo_Firma.Find(x => x.ID == firmaID);
            if (layerResult.result != null)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #3
0
        public int firmaEkle(Firma data)
        {
            BusinesLayerResult <Firma> layerResult = new BusinesLayerResult <Firma>();

            layerResult.result = repo_Firma.Find(x => x.FirmaAdi == data.FirmaAdi);
            if (layerResult.result == null)
            {
                return(repo_Firma.Insert(data));
            }
            else
            {
                return(-1);
            }
        }
예제 #4
0
        public int firmaYetkiliEkle(Firma firma, FirmaYetkili data)
        {
            BusinesLayerResult <Firma> layerResult2 = new BusinesLayerResult <Firma>();

            layerResult2.result = repo_Firma.Find(x => x.FirmaAdi == firma.FirmaAdi);
            if (layerResult2.result != null)
            {
                data.firmaID = layerResult2.result.ID;
                return(repo_FirmaYetkili.Insert(data));
            }
            else
            {
                return(-1);
            }
        }
예제 #5
0
        public int firmaAciklamaEkle(Firma firma, FirmaAciklama data, FirmaYetkili yetkili)
        {
            BusinesLayerResult <FirmaYetkili> layerResult = new BusinesLayerResult <FirmaYetkili>();

            layerResult.result = repo_FirmaYetkili.Find(x => x.Adi == yetkili.Adi);
            BusinesLayerResult <Firma> layerResult2 = new BusinesLayerResult <Firma>();

            layerResult2.result = repo_Firma.Find(x => x.FirmaAdi == firma.FirmaAdi);
            if (layerResult.result != null && layerResult2.result != null)
            {
                data.Yetkili = layerResult.result.ID;
                data.firmaID = layerResult2.result.ID;
                return(repo_FirmaAciklama.Insert(data));
            }
            else
            {
                return(-1);
            }
        }