public ActionResult uploadFilePartial(int ID) { var tblAttachment = pocoDb.Fetch <tblFileAttachment>("Where objectTypeID=@0 and itemID=@1", 11, ID); var VM = new ClientPortal.ViewModels.IssueListViewModel { Attachments = tblAttachment }; return(View(VM)); }
public ActionResult cancelledIssues(int solutionID) { List <int> cancelledStatusIDs = new List <int>(); cancelledStatusIDs.Add(9); cancelledStatusIDs.Add(11); var tblIssues = pocoDb.Fetch <tblIssue>("Where solutionId=@0 and issueStatusID IN(@1)", solutionID, cancelledStatusIDs).ToList(); var topTenIssues = tblIssues.OrderByDescending(m => m.ModifiedDate).Take(10); var tblType = pocoDb.Fetch <tblIssueType>("where 1=1").ToList(); var tblstatus = pocoDb.Fetch <tblIssueStatus>("where 1=1").ToList(); var VMComponent = new ClientPortal.ViewModels.IssueListViewModel { Issues = topTenIssues, Statuses = tblstatus, Types = tblType }; return(View(VMComponent)); }
public ActionResult solutionIssues(int ID) { string userid = ""; if (Session["userId"] != null) { userid = Session["userId"].ToString(); } int userID = int.Parse(userid); Session["solutionId"] = ID; var solution = pocoDb.Fetch <tblSolution>("where solutionID = @0", ID).FirstOrDefault(); var Types = pocoDb.Fetch <tblIssueType>("where 1=1").ToList(); var statuses = pocoDb.Fetch <tblIssueStatus>("where 1=1"); var tblComponent = pocoDb.Fetch <tblSolutionComponent>("where solutionID=@0", ID).ToList(); List <int> clientStatusId = new List <int>() { 13, 14 }; var clientIssues = pocoDb.Fetch <tblIssue>("Where issueStatusID IN(@0) and solutionId=@1", clientStatusId, ID); List <int> clientStatusExceptClosed = new List <int>() { 1, 4, 10, 12, 13, 14, 15, 16, 17 }; var clientIssuesExceptClosed = pocoDb.Fetch <tblIssue>("Where issueStatusID IN(@0) and solutionId=@1", clientStatusExceptClosed, ID); var tblstatusClientTitle = pocoDb.Fetch <tblIssueStatus>("where 1=1").DistinctBy(m => m.ClientTitle); ViewBag.ClientTitle = new SelectList(tblstatusClientTitle, "ClientTitle", "ClientTitle"); var VM = new ClientPortal.ViewModels.IssueListViewModel { Solutions = solution, Statuses = statuses, Components = tblComponent, Types = Types, clientIssues = clientIssues, clientIssuesExceptClosed = clientIssuesExceptClosed }; return(View(VM)); }
public ActionResult filterStatus(int componentID, int solutionID, Boolean checkbox) { if (componentID == 0) { if (checkbox == false || checkbox == true) { List <int> clientStatusExceptClosed = new List <int>() { 1, 4, 10, 12, 13, 14, 15, 16, 17 }; var clientIssuesExceptClosed = pocoDb.Fetch <tblIssue>("Where issueStatusID IN(@0) and solutionId=@1", clientStatusExceptClosed, solutionID); var tblType = pocoDb.Fetch <tblIssueType>("where 1=1").ToList(); var tblstatus = pocoDb.Fetch <tblIssueStatus>("where 1=1").ToList(); var VMComponent = new ClientPortal.ViewModels.IssueListViewModel { Issues = clientIssuesExceptClosed, Statuses = tblstatus, Types = tblType }; return(PartialView(VMComponent)); } } else { if (checkbox == false) { List <int> clientStatusExceptClosed = new List <int>() { 1, 4, 10, 12, 13, 14, 15, 16, 17 }; var clientIssuesExceptClosed = pocoDb.Fetch <tblIssue>("Where issueStatusID IN(@0) and solutionId=@1 and solutionComponentID=@2", clientStatusExceptClosed, solutionID, componentID); var tblType = pocoDb.Fetch <tblIssueType>("where 1=1").ToList(); var tblstatus = pocoDb.Fetch <tblIssueStatus>("where 1=1").ToList(); var VMComponent = new ClientPortal.ViewModels.IssueListViewModel { Issues = clientIssuesExceptClosed, Statuses = tblstatus, Types = tblType }; return(PartialView(VMComponent)); } else { List <int> clientStatusincludingClosed = new List <int>() { 1, 4, 9, 10, 11, 12, 13, 14, 15, 16, 17 }; var clientIssue = pocoDb.Fetch <tblIssue>("Where issueStatusID IN(@0) and solutionId=@1 and solutionComponentID=@2", clientStatusincludingClosed, solutionID, componentID); var tblType = pocoDb.Fetch <tblIssueType>("where 1=1").ToList(); var tblstatus = pocoDb.Fetch <tblIssueStatus>("where 1=1").ToList(); var VMComponent = new ClientPortal.ViewModels.IssueListViewModel { Issues = clientIssue, Statuses = tblstatus, Types = tblType }; return(PartialView(VMComponent)); } } return(View()); }