private void findingsAndImprovementsToolStripMenuItem_Click(object sender, EventArgs e) { Auditor_AuditView frmAuditView = new Auditor_AuditView(); frmAuditView.Text = "Select Audit"; frmAuditView.auditList = frmAuditView.auditList.Where(i => i.IsDeleted == false).ToList(); frmAuditView.toolStripMessage.Visible = true; //frmAuditView.chbCompleted.CheckState = CheckState.Unchecked; frmAuditView.dgvAuditView.ContextMenuStrip = null; frmAuditView.dgvAuditView.CellDoubleClick += new DataGridViewCellEventHandler(frmAuditView.dgvAuditView_CellDoubleClick); //message... DialogResult dRes = frmAuditView.ShowDialog(); if (dRes == DialogResult.OK) { Audit selAudit = frmAuditView.Header_Audit; //Audit->Headers->Details //if (!UserAction.IsLegal(Action.Header_View, selAudit.Auditor1ID, selAudit.Auditor2ID, selAudit.SupervisorID, )) //{ // return; //} FIShowHeaders frmShowHeaders = new FIShowHeaders(selAudit); //frmShowHeaders.AdminAccess = false; frmShowHeaders.ShowDialog(); } }
private void FIDetail_Revisions_Load(object sender, EventArgs e) { Auditor_AuditView.FillDataGridView(dgvAudits, glAudit); FIShowHeaders.FillHeadersDataGridView(dgvHeader, glHeader); FillDetailsDataGridViewRev(dgvDetails, DetailRevList); toolStripCounter.Text = "Records: " + DetailRevList.Count.ToString(); }
private void viewRevisionsToolStripMenuItem_Click(object sender, EventArgs e) { Auditor_AuditView frmAuditorAuditView_Rev = new Auditor_AuditView(); frmAuditorAuditView_Rev.cmsOnGrid.Items["MIRevisions"].Visible = true; frmAuditorAuditView_Rev.dgvAuditView.Columns["IsDeleted"].Visible = true; frmAuditorAuditView_Rev.ShowDialog(); }
private void auditViewToolStripMenuItem_Click(object sender, EventArgs e) { if (UserAction.IsLegal(Action.Audit_View)) { Auditor_AuditView frmAuditorAuditView = new Auditor_AuditView(); frmAuditorAuditView.auditList = frmAuditorAuditView.auditList.Where(i => i.IsDeleted == false).ToList(); frmAuditorAuditView.ShowDialog(); } }
private void FIShowHeaders_Load(object sender, EventArgs e) { Auditor_AuditView.FillDataGridView(dgvAudits, glAudit); List <FIHeader> Audit_HeadersList = SelectHeaders(glAudit.Id); if (AdminAccess == false) { Audit_HeadersList = Audit_HeadersList.Where(i => i.IsDeleted == false).ToList(); } else { dgvAudits.Columns["IsDeleted"].Visible = true; dgvHeaders.Columns["HeaderIsDeleted"].Visible = true; dgvDetails.Columns["DetailIsDeleted"].Visible = true; } if (glAudit.IsCompleted || glAudit.IsDeleted) { if (Audit_HeadersList.Count > 0) { btnNewHeader.Enabled = false; btnNewDetail.Enabled = false; MIeditHeader.Enabled = false; } else { MessageBox.Show("The Audit has No Findings/Improvements!"); Close(); } } FillHeadersDataGridView(dgvHeaders, Audit_HeadersList); Audit_Headers = Audit_HeadersList; }
private void viewFIRevisionsToolStripMenuItem_Click(object sender, EventArgs e) { Auditor_AuditView frmAuditView = new Auditor_AuditView(); frmAuditView.Text = "Select Audit"; frmAuditView.toolStripMessage.Visible = true; frmAuditView.dgvAuditView.Columns["IsDeleted"].Visible = true; frmAuditView.chbCompleted.CheckState = CheckState.Unchecked; frmAuditView.dgvAuditView.ContextMenuStrip = null; frmAuditView.dgvAuditView.CellDoubleClick += new DataGridViewCellEventHandler(frmAuditView.dgvAuditView_CellDoubleClick); DialogResult dRes = frmAuditView.ShowDialog(); if (dRes == DialogResult.OK) { Audit selAudit = frmAuditView.Header_Audit; FIShowHeaders frmShowHeaders_Rev = new FIShowHeaders(selAudit); frmShowHeaders_Rev.cmsDetail.Items["MIDetailRevisions"].Visible = true; frmShowHeaders_Rev.AdminAccess = true; frmShowHeaders_Rev.ShowDialog(); } }