private void gvBatchList_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { objBatch = objBatchDL.Get(gvBatchList.Rows[e.RowIndex].Cells["ColBatchNo"].Value.ToString()); MRP_GUI.Report.frmRptProductionCost objForm = new Report.frmRptProductionCost(objBatch.BatchID); objForm.Show(); } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnCostReport_Click(object sender, EventArgs e) { try { MTN obj = new MTN(); obj = objMTNDL.Get(Convert.ToInt64(gvMTNList.CurrentRow.Cells["Column1"].Value)); if (obj.MTNType == MTN.Type.Batch) { MRP_GUI.Report.frmRptProductionCost objForm = new Report.frmRptProductionCost(Convert.ToString(gvMTNList.CurrentRow.Cells["BatchID"].Value)); objForm.Show(); } else { MRP_GUI.Report.frmRptManufactPackCost objForm = new Report.frmRptManufactPackCost(Convert.ToInt64(gvMTNList.CurrentRow.Cells["PackingID"].Value)); objForm.Show(); } } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }