Esempio n. 1
0
 public ActionResult EditCat(Category cat)
 {
     if (Session["user"] != null)
     {
         _documentSession.Store(cat);
         _documentSession.SaveChanges();
         return RedirectToAction("Category", new { message = string.Format("Saved changes to cat {0}", cat.Id) });
     }
     else
     {
         return RedirectToAction("Login", "Admin", new { message = string.Format("Please Login Again {0}", "Admin") });
     }
 }
Esempio n. 2
0
        public ActionResult CreateVendor(FormCollection collection, Category cat)
        {
            if (Session["vendor"] != null)
            {

                Vendor vd = new Vendor();
                vd.Manufacturers = GetManufacturerList();
                vd.StateModel = new List<State1>();
                vd.StateModel = GetAllState1();
                vd.EMailUser = Session["vendor"].ToString();
                var move = _documentSession.Load<Mov>();
                return View(vd);
            }
            else
            {
                return RedirectToAction("LogOff", new { message = string.Format("Successfully Logged Off") });
            }
        }
Esempio n. 3
0
 public ActionResult CreateCat(Category cat)
 {
     if (Session["user"] != null)
     {
         if (!ModelState.IsValid)
             return View();
         _documentSession.Store(cat);
         _documentSession.SaveChanges();
         return RedirectToAction("Category", new { message = string.Format("Category Successfully Created", cat.Categories) });
     }
     else
     {
         return RedirectToAction("Login", "Admin", new { message = string.Format("Please Login Again {0}", "Admin") });
     }
 }