Ejemplo n.º 1
0
 /// <summary>
 /// On 'Close' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnClose_Click(object sender, EventArgs e)
 {
     try
     {
         if (Messages.CloseConfirmation())
         {
             this.Close();
         }
         else
         {
             this.Close();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "ROREG14:" + ex.Message;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// On 'Close' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnClose_Click(object sender, EventArgs e)
 {
     try
     {
         if (Messages.CloseConfirmation())
         {
             this.Close();
         }
         else
         {
             this.Close();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SRR9" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Frorm keydown
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmBatch_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Escape)
         {
             //if (PublicVariables.isMessageClose)
             //{
             //    Messages.CloseMessage(this);
             //}
             //else
             //{
             //    this.Close();
             //}
             if (Messages.CloseConfirmation())
             {
                 this.Close();
             }
         }
         if (e.KeyCode == Keys.S && Control.ModifierKeys == Keys.Control) //Save
         {
             if (cmbProduct.Focused)
             {
                 cmbProduct.DropDownStyle = ComboBoxStyle.DropDown;
             }
             else
             {
                 cmbProduct.DropDownStyle = ComboBoxStyle.DropDownList;
             }
             btnSave_Click(sender, e);
         }
         if (e.KeyCode == Keys.D && Control.ModifierKeys == Keys.Control) //Delete
         {
             if (btnDelete.Enabled)
             {
                 btnDelete_Click(sender, e);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("B25:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Frorm keydown
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmBatch_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Escape)
         {
             //if (PublicVariables.isMessageClose)
             //{
             //    Messages.CloseMessage(this);
             //}
             //else
             //{
             //    this.Close();
             //}
             if (Messages.CloseConfirmation())
             {
                 this.Close();
             }
         }
         if (e.KeyCode == Keys.S && Control.ModifierKeys == Keys.Control) //Save
         {
             if (cmbProduct.Focused)
             {
                 cmbProduct.DropDownStyle = ComboBoxStyle.DropDown;
             }
             else
             {
                 cmbProduct.DropDownStyle = ComboBoxStyle.DropDownList;
             }
             btnSave_Click(sender, e);
         }
         if (e.KeyCode == Keys.D && Control.ModifierKeys == Keys.Control) //Delete
         {
             if (btnDelete.Enabled)
             {
                 btnDelete_Click(sender, e);
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "B26:" + ex.Message;
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// On close button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnClose_Click(object sender, EventArgs e)
 {
     try
     {
         //Jamshi
         //if (PublicVariables.isMessageClose)
         //{
         //    Messages.CloseMessage(this);
         //}
         //else
         //{
         //    this.Close();
         //}
         if (Messages.CloseConfirmation())
         {
             this.Close();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("B12:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// On close button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnClose_Click(object sender, EventArgs e)
 {
     try
     {
         //Jamshi
         //if (PublicVariables.isMessageClose)
         //{
         //    Messages.CloseMessage(this);
         //}
         //else
         //{
         //    this.Close();
         //}
         if (Messages.CloseConfirmation())
         {
             this.Close();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "B13:" + ex.Message;
     }
 }
Ejemplo n.º 7
0
 /// <summary>
 /// For shortcut key
 /// Esc for formclose
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmAccountGroupwiseReport_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Escape)
         {
             if (Messages.CloseConfirmation())
             {
                 if (frmCashFlowObj != null)
                 {
                     int inCount = arrlstGroupId.Count;
                     if (inCount != 1)
                     {
                         {
                             decAccountGroupId = Convert.ToDecimal(arrlstGroupId[inCount - 2].ToString());
                             arrlstGroupId.RemoveAt(inCount - 1);
                             if (decAccountGroupId == 2)
                             {
                                 CashflowLoansGridFill();
                             }
                             else if (decAccountGroupId == 6)
                             {
                                 CashOutflowCurrentAssetGridFill();
                             }
                             else
                             {
                                 CashflowCommonGridFill();
                             }
                         }
                     }
                     else
                     {
                         this.Close();
                     }
                 }
                 else if (objfrmFundFlow != null)
                 {
                     int inCount = arrlstGroupId.Count;
                     if (inCount != 1)
                     {
                         decAccountGroupId = Convert.ToDecimal(arrlstGroupId[inCount - 2].ToString());
                         if (decAccountGroupId == 6)
                         {
                             arrlstGroupId.RemoveAt(inCount - 1);
                             GridFillForFundFlow(decClosingStockGroupWise);
                         }
                         else
                         {
                             arrlstGroupId.RemoveAt(inCount - 1);
                             GridFill();
                         }
                     }
                     else
                     {
                         this.Close();
                     }
                 }
                 else
                 {
                     int inCount = arrlstGroupId.Count;
                     if (inCount != 1)
                     {
                         decAccountGroupId = Convert.ToDecimal(arrlstGroupId[inCount - 2].ToString());
                         arrlstGroupId.RemoveAt(inCount - 1);
                         GridFill();
                     }
                     else
                     {
                         this.Close();
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "AGWREP22:" + ex.Message;
     }
 }