Exemple #1
0
        protected virtual void BildirimEkle(BildirimTipi tip, string mesaj, bool sonrakiİstekİçinSürdür)
        {
            string dataKey = string.Format("TS.bildirimleri.{0}", tip);

            if (sonrakiİstekİçinSürdür)
            {
                if (TempData[dataKey] == null)
                {
                    TempData[dataKey] = new List <string>();
                }
                ((List <string>)TempData[dataKey]).Add(mesaj);
            }
            else
            {
                if (ViewData[dataKey] == null)
                {
                    ViewData[dataKey] = new List <string>();
                }
                ((List <string>)ViewData[dataKey]).Add(mesaj);
            }
        }
        protected virtual void BildirimEkle(BildirimTipi type, string message, bool persistForTheNextRequest)
        {
            var dataKey = $"rota.bildirimler.{type}";

            if (persistForTheNextRequest)
            {
                if (TempData[dataKey] == null)
                {
                    TempData[dataKey] = new List <string>();
                }
                ((List <string>)TempData[dataKey]).Add(message);
            }
            else
            {
                if (ViewData[dataKey] == null)
                {
                    ViewData[dataKey] = new List <string>();
                }
                ((List <string>)ViewData[dataKey]).Add(message);
            }
        }