//
        public ActionResult GenerateNewCards(string location)
        {
            Trello t      = new Trello();
            var    result = t.GenerateCards(location);

            return(RedirectToAction("Trello"));
        }
Ejemplo n.º 2
0
        public ActionResult Create([Bind(Include = "ItemId,ItemUPC,ItemDescription,ItemSerialNumber,ItemLocationFK,CreatedBy,CreatedOn,UpdatedBy,UpdatedOn,isWaitlistItem")] tb_CSULabInventoryItems tb_CSULabInventoryItems)
        {
            if (ModelState.IsValid)
            {
                tb_CSULabInventoryItems.ItemSerialNumber = tb_CSULabInventoryItems.ItemSerialNumber.ToUpper();
                tb_CSULabInventoryItems.ItemUPC          = tb_CSULabInventoryItems.ItemUPC.ToUpper();
                tb_CSULabInventoryItems.CreatedOn        = DateTime.Now;
                tb_CSULabInventoryItems.CreatedBy        = SessionVariables.CurrentUserId;
                db.tb_CSULabInventoryItems.Add(tb_CSULabInventoryItems);
                var itemLocation = tb_CSULabInventoryItems.ItemLocationFK;
                db.SaveChanges();

                // run Trello UPC check to add a repair card for the new item
                Trello t = new Trello();
                t.GenerateCards(itemLocation);

                ViewBag.Message = "Item Added to Inventory";
                return(RedirectToAction("Index"));
            }
            return(View(tb_CSULabInventoryItems));
        }