Exemple #1
0
        public ActionResult SirketGiris(Sirket model)
        {
            try
            {
                Sirket sirket = null;
                using (var sirketBusiness = new SirketBusiness())
                {
                    sirket = sirketBusiness.SirketLogin(model.SirketKullaniciAdi, model.SirketSifre);
                }
                if (sirket != null)
                {
                    Session.Add("Sirket", sirket);
                }
                List <Arac> arac = null;
                using (var aracBusiness = new AracBusiness())
                {
                    arac = aracBusiness.SelectAllSirketArac(sirket.Id);
                    Session.Add("Arac", arac);
                }
                List <Arac> rezervasyon = null;
                using (var aracBusiness = new AracBusiness())
                {
                    rezervasyon = aracBusiness.SelectAllRezervasyonArac(sirket.Id);
                    Session.Add("Razervasyon", rezervasyon);
                }

                return(RedirectToAction("SirketSayfasi", "Sirket"));
            }
            catch (Exception)
            {
                return(View("SirketGiris"));
            }
        }