/// <summary>
 /// form closing event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmUnit_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         if (frmMultipleProductCreationObj != null)
         {
             dgvUnitSearch.Enabled = false;
             frmMultipleProductCreationObj.ReturnFromUnitForm(decIdforOtherForm);
         }
         if (frmProductCreationObj != null)
         {
             groupBox2.Enabled = false;
             frmProductCreationObj.ReturnFromUnitForm(decIdforOtherForm);
             frmProductCreationObj.Enabled = true;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("U20:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #2
0
 /// <summary>
 /// form closing event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmUnit_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         if (frmMultipleProductCreationObj != null)
         {
             dgvUnitSearch.Enabled = false;
             frmMultipleProductCreationObj.ReturnFromUnitForm(decIdforOtherForm);
         }
         if (frmProductCreationObj != null)
         {
             groupBox2.Enabled = false;
             frmProductCreationObj.ReturnFromUnitForm(decIdforOtherForm);
             frmProductCreationObj.Enabled = true;
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "U20:" + ex.Message;
     }
 }