Exemplo n.º 1
0
 /// <summary>
 /// Cell double click for updation of selected item in frmPhysicalStock form
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvPhysicalStockReport_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.RowIndex > -1 && e.ColumnIndex > -1)
         {
             frmPhysicalStock objfrmPhysicalStock = new frmPhysicalStock();;
             if (e.RowIndex != -1)
             {
                 decimal          decMasterId = Convert.ToDecimal(dgvPhysicalStockReport.Rows[e.RowIndex].Cells["dgvtxtPhysicalStockMasterId"].Value.ToString());
                 frmPhysicalStock open        = Application.OpenForms["frmPhysicalStock"] as frmPhysicalStock;
                 if (open == null)
                 {
                     objfrmPhysicalStock.WindowState = FormWindowState.Normal;
                     objfrmPhysicalStock.MdiParent   = formMDI.MDIObj;
                     objfrmPhysicalStock.CallFromPhysicalStockReport(this, decMasterId);
                 }
                 else
                 {
                     open.CallFromPhysicalStockReport(this, decMasterId);
                     if (open.WindowState == FormWindowState.Minimized)
                     {
                         open.WindowState = FormWindowState.Normal;
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PSRT14:" + ex.Message;
     }
 }