Пример #1
0
        public ActionResult Index()
        {
            Session["Lang"] = 2;

            foreach (var items in db.Adses)
            {
                if (items.Date.Value.AddMonths(1).CompareTo(DateTime.Now) < 0)
                {
                    items.Sales = 3;
                }
                db.Entry(items);
            }

            db.SaveChanges();

            return(View(db.Adses.Where(x => x.Sales == 2)));
        }
Пример #2
0
        public ActionResult Proba()
        {
            foreach (var items in db.Adses)
            {
                if (items.Date.Value.AddMonths(1).CompareTo(DateTime.Now) < 0)
                {
                    items.Sales            = 3;
                    items.Accept_Rejection = 3;
                }
                db.Entry(items);
            }

            db.SaveChanges();

            return(View(db.Adses));
        }