Ejemplo n.º 1
0
 /// <summary>
 /// Function to call this form from Exchangerate
 /// </summary>
 /// <param name="frmExchangeRate"></param>
 public void CallFromExchangerate(frmExchangeRate frmExchangeRate)
 {
     try
     {
         groupBox2.Enabled       = false;
         this.frmExchangeRateObj = frmExchangeRate;
         base.Show();
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "C10:" + ex.Message;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// On FormClosing opens the form from which frmCurrencyDetails form has opened
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmCurrencyDetails_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         if (frmExchangeRateObj != null)
         {
             frmExchangeRateObj = Application.OpenForms["frmExchangeRate"] as frmExchangeRate;
             if (frmExchangeRateObj == null)
             {
                 frmExchangeRateObj           = new frmExchangeRate();
                 frmExchangeRateObj.MdiParent = formMDI.MDIObj;
                 frmExchangeRateObj.Show();
             }
             else
             {
                 frmExchangeRateObj.Activate();
             }
         }
         if (frmCompanyCreationObj != null)
         {
             frmCompanyCreationObj = Application.OpenForms["frmCompanyCreation"] as frmCompanyCreation;
             if (frmCompanyCreationObj == null)
             {
                 frmCompanyCreationObj           = new frmCompanyCreation();
                 frmCompanyCreationObj.MdiParent = formMDI.MDIObj;
                 frmCompanyCreationObj.Show();
             }
             else
             {
                 frmCompanyCreationObj.Activate();
             }
         }
         if (frmJournalVoucherObj != null)
         {
             frmJournalVoucherObj.Enabled = true;
         }
         if (frmDebitNoteObj != null)
         {
             frmDebitNoteObj.Enabled = true;
         }
         if (frmCreditNoteObj != null)
         {
             frmCreditNoteObj.Enabled = true;
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "CDP14:" + ex.Message;
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Function to call this form from frmExchangeRate
 /// </summary>
 /// <param name="frmExchangeRate"></param>
 /// <param name="decId"></param>
 public void CallFromExchangerate(frmExchangeRate frmExchangeRate, decimal decId)
 {
     try
     {
         base.Show();
         this.frmExchangeRateObj = frmExchangeRate;
         int inRowCount = dgvCurrency.Rows.Count;
         for (int ini = 0; ini < inRowCount; ini++)
         {
             if (Convert.ToDecimal(dgvCurrency.Rows[ini].Cells["dgvtxtCurrencyId"].Value.ToString()) == decId)
             {
                 dgvCurrency.Rows[ini].DefaultCellStyle.BackColor = Color.MediumSeaGreen;
             }
         }
         txtCurrencyName.Focus();
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "CDP3:" + ex.Message;
     }
 }