Example #1
0
        public ActionResult PartsBrandManagement()
        {
            Database               db      = new Database();
            PartsBrandDAO          pbDAO   = new PartsBrandDAO(db);
            List <PartsBrandModel> pbModel = pbDAO.FindAll();

            ViewBag.Brand = pbModel;
            db.Close();
            return(View());
        }
Example #2
0
        public ActionResult StockManagement_DataLoading(int typeID)
        {
            Database               db      = new Database();
            PartsBrandDAO          pbDAO   = new PartsBrandDAO(db);
            List <PartsBrandModel> pbModel = pbDAO.FindAll();

            ViewBag.PartsBrand = pbModel;
            db.Close();

            db = new Database();
            PartsDAO          pDAO   = new PartsDAO(db);
            List <PartsModel> tModel = pDAO.FindByPartsTypeID(typeID);

            ViewBag.Parts = tModel;
            db.Close();

            return(View());
        }