public IActionResult _Detail(string id, string actionType) { IssueVM issueVM = new IssueVM(); IssueModel issueModel = new IssueModel(); if (actionType.ToLower().Equals("insert")) { // Insert issueVM.actionType = "insert"; issueVM.listIssStatus = menuDAL.GetAllIssStatus().ToList(); issueVM.listClauseIssue = clauseIssueDAL.GetAllClauseIssue().ToList(); issueVM.listClause = clauseDAL.GetAllClause().ToList(); //GetAllClause } else { // Update //clauseVM.actionType = "Update"; //clauseVM.clauseModel = clauseDAL.GetClauseById(id); //clauseVM.listDocument = documentDAL.GetAllDocuments(); //clauseVM.listVersion = menuDAL.GetAllVersion(); //clauseModel = clauseDAL.GetDocumentByID(id); ////documentVM.listDocument = documentDAL.GetAllDocuments().ToList(); //documentVM.listDocType = menuDAL.GetAllDocType(); //documentVM.listVersion = menuDAL.GetAllVersion(); //documentVM.listDocStatus = menuDAL.GetAllDocStatus(); //documentVM.documentModel = document; issueVM.actionType = "update"; issueVM.issModel = issueDAL.GetIssueByID(id); issueVM.listIssStatus = menuDAL.GetAllIssStatus().ToList(); issueVM.listClauseIssue = clauseIssueDAL.GetAllClauseIssue().ToList(); issueVM.listClause = clauseDAL.GetAllClause().ToList(); } return(PartialView("_Detail", issueVM)); }