private void dgvReport_CellContentClick(object sender, DataGridViewCellEventArgs e) { try { if (e.ColumnIndex >= 0 && e.RowIndex >= 0) { if (dgvReport.Columns[e.ColumnIndex].Name.ToUpper() == colReferance.Name.ToUpper()) { int shipmentRefID = Convert.ToInt32(dgvReport.Rows[e.RowIndex].Cells[colShipmentRefID.Name].Value.ToString()); string refType = dgvReport.Rows[e.RowIndex].Cells[colDocType.Name].Value.ToString(); if (shipmentRefID > 0) { if (refType == "ABSTRACT") { frmReactionCuration absCuration = new frmReactionCuration(); absCuration.ShipmentRefID = shipmentRefID; absCuration.MdiParent = this.ParentForm; absCuration.Show(); } else if (refType == "JOURNAL") { frmReactionCuration_Journal journlCuration = new frmReactionCuration_Journal(); journlCuration.ShipmentRefID = shipmentRefID; journlCuration.MdiParent = this.ParentForm; journlCuration.Show(); } } } } } catch (Exception ex) { ErrorHandling.WriteErrorLog(ex.ToString()); } }
private void loadTaskTSMenuItem_Click(object sender, EventArgs e) { try { DataTable dtAssignedTans = TaskManagementDB.GetUserTasksOnModule(GlobalVariables.UR_ID, GlobalVariables.Module); if (GlobalVariables.Module == "RA") { using (frmTaskSheet usrTaskSheet = new frmTaskSheet()) { usrTaskSheet.AssignedTANs = dtAssignedTans; if (usrTaskSheet.ShowDialog() == DialogResult.OK) { if (usrTaskSheet.DocType == "ABSTRACT") { frmReactionCuration absCuration = new frmReactionCuration(); absCuration.TaskID = usrTaskSheet.Task_ID; absCuration.TaskAllocationID = usrTaskSheet.TaskAllocation_ID; absCuration.ShipmentRefID = usrTaskSheet.ShipmentRef_ID; absCuration.AbstractRefNo = usrTaskSheet.SelectedRef; sslblRefName.Text = usrTaskSheet.SelectedRef; sslblShipment.Text = usrTaskSheet.ShipmentName; absCuration.MdiParent = this; absCuration.Show(); } else if (usrTaskSheet.DocType == "JOURNAL") { frmReactionCuration_Journal journlCuration = new frmReactionCuration_Journal(); journlCuration.TaskID = usrTaskSheet.Task_ID; journlCuration.TaskAllocationID = usrTaskSheet.TaskAllocation_ID; journlCuration.ShipmentRefID = usrTaskSheet.ShipmentRef_ID; journlCuration.AbstractRefNo = usrTaskSheet.SelectedRef; sslblRefName.Text = usrTaskSheet.SelectedRef; sslblShipment.Text = usrTaskSheet.ShipmentName; journlCuration.MdiParent = this; journlCuration.Show(); } } } } // Task Preparation users task sheet. else if (GlobalVariables.Module == "TP") { using (TaskSheets.FrmTaskSheetTP taskSheet = new TaskSheets.FrmTaskSheetTP()) { taskSheet.UserTasks = dtAssignedTans; if (taskSheet.ShowDialog() == DialogResult.OK) { if (taskSheet.userTaskStatus.Task_ID > 0) { GlobalVariables.TaskId = taskSheet.userTaskStatus.Task_ID; FrmPdfGererationOnAbstract objTaskPrepare = new FrmPdfGererationOnAbstract(); objTaskPrepare.TaskID = taskSheet.userTaskStatus.Task_ID; objTaskPrepare.TaskAllocationID = taskSheet.userTaskStatus.TaskAllocation_ID; objTaskPrepare.Shipment_Name = taskSheet.ShipmentName; objTaskPrepare.ShipmentYear = taskSheet.ShipmentYear; objTaskPrepare.ShipmentIssue = taskSheet.ShipmentIssue; objTaskPrepare.Abstract_RefNo = taskSheet.AbstractRefNo; objTaskPrepare.ShipmentRefID = taskSheet.ShipmentRef_ID; objTaskPrepare.MdiParent = this; objTaskPrepare.Show(); } } } } } catch (Exception ex) { ErrorHandling.WriteErrorLog(ex.ToString()); } }