public ActionResult WithdrawPartsInserting(int wdUnit, int repID, int stockID, int userID) { RequisitionModel rqModel = new RequisitionModel(); rqModel.REPAIR_NO = new RepairModel(); rqModel.REPAIR_NO.REPAIR_NO = repID; rqModel.STOCK_NO = new StockModel(); rqModel.STOCK_NO.STOCK_ID = stockID; rqModel.REQ_UNIT = wdUnit; rqModel.APROVE = "wait"; rqModel.STAFF = new UsersModel(); rqModel.STAFF.USER_NO = userID; Database db = new Database(); RequisitionDAO rqDAO = new RequisitionDAO(db); rqDAO.Add(rqModel); db.Close(); return(Redirect("~/Services/RepairDescription?repID=" + repID)); }