Exemplo n.º 1
0
        public ActionResult ReferUpdate(int id)
        {
            var datatable = new Models.TESDBEntities();
            var table     = datatable.References.Where(x => x.Id == id).FirstOrDefault();

            return(View(table));
        }
Exemplo n.º 2
0
        public ActionResult TenderDetail(int id)
        {
            var datatable = new Models.TESDBEntities();
            var table     = datatable.Tender.Where(x => x.Id == id).FirstOrDefault();

            return(View(table));
        }
Exemplo n.º 3
0
        public ActionResult Index(int type = -1)
        {
            var datatable = new Models.TESDBEntities();

            if (String.IsNullOrEmpty(HttpContext.User.Identity.Name))
            {
                FormsAuthentication.SignOut();
                if (type == -1)
                {
                    return(View(datatable.Tender.ToList()));
                }
                else
                {
                    return(View(datatable.Tender.ToList().Where(x => x.Type == type)));
                }
            }

            return(View());
        }
Exemplo n.º 4
0
        public ActionResult Login(FormCollection collection)
        {
            if (ModelState.IsValid)
            {
                email    = collection.Get("txt_Login_Email");
                password = collection.Get("txt_Login_Email");

                var datatable = new Models.TESDBEntities();
                var data      = datatable.Account.Where(x => x.eMail == email || x.Password == password).FirstOrDefault();
                if (data != null)
                {
                    FormsAuthentication.SetAuthCookie(email, true);
                    return(RedirectToAction("Index", "Home"));
                }
                else
                {
                    ModelState.AddModelError("", "E-Mail veya şifre hatalı.");
                }
            }

            return(View());
        }