/// <summary>
 /// Function to call this form frmPartyBalance
 /// </summary>
 /// <param name="frmPartyBalance"></param>
 /// <param name="decId"></param>
 /// <param name="strDrCr"></param>
 public void CallFromPartyBalance(frmPartyBalance frmPartyBalance, decimal decId, string strDrCr)
 {
     try
     {
         decledgerId      = decId;
         strDebitOrCredit = strDrCr;
         base.Show();
         this.frmPartyBalanceObj = frmPartyBalance;
     }
     catch (Exception ex)
     {
         MessageBox.Show("AB:4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Function to call this form frmPartyBalance
 /// </summary>
 /// <param name="frmPartyBalance"></param>
 /// <param name="decId"></param>
 /// <param name="strDrCr"></param>
 public void CallFromPartyBalance(frmPartyBalance frmPartyBalance, decimal decId, string strDrCr)
 {
     try
     {
         decledgerId      = decId;
         strDebitOrCredit = strDrCr;
         base.Show();
         this.frmPartyBalanceObj = frmPartyBalance;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "AB4:" + ex.Message;
     }
 }
 /// <summary>
 /// Function to call this form frmPartyBalance
 /// </summary>
 /// <param name="frmPartyBalance"></param>
 /// <param name="decId"></param>
 /// <param name="strDrCr"></param>
 public void CallFromPartyBalance(frmPartyBalance frmPartyBalance, decimal decId,string strDrCr)
 {
     try
     {
         decledgerId = decId;
         strDebitOrCredit = strDrCr;
         base.Show();
         this.frmPartyBalanceObj = frmPartyBalance;
     }
     catch (Exception ex)
     {
         MessageBox.Show("AB:4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to call this form from frmPartyBalance to view details and for updation
 /// </summary>
 /// <param name="frmPartyBalance"></param>
 /// <param name="decAmount"></param>
 /// <param name="dtbl"></param>
 /// <param name="arrlstOfRemovedRow"></param>
 public void CallFromPartyBalance(frmPartyBalance frmPartyBalance, decimal decAmount, DataTable dtbl, ArrayList arrlstOfRemovedRow)
 {
     try
     {
         base.Show();
         txtAmount.Text = decAmount.ToString();
         this.frmPartyBalanceObj = frmPartyBalance;
         frmPartyBalance.Close();
         frmPartyBalanceObj = null;
         dtblPartyBalance = dtbl;
         arrlstOfDeletedPartyBalanceRow = arrlstOfRemovedRow;
         txtAmount.Focus();
     }
     catch (Exception ex)
     {
         MessageBox.Show("PR16:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// AgainRef click, call the Party balance form
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAgainRef_Click(object sender, EventArgs e)
 {
     frmPartyBalance frmpartybalance = new frmPartyBalance();
     frmpartybalance.MdiParent = formMDI.MDIObj;
     try
     {
         if (!isAutomatic)
         {
             if (txtVoucherNo.Text == string.Empty)
             {
                 MessageBox.Show("Voucher Number Empty", "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 txtVoucherNo.Focus();
             }
             else
             {
                 frmpartybalance.CallThisFormFromPDCReceivable(this, decLedgerIdForPartyBalance, dtblPartyBalance, decPDCReceivableVoucherTypeId, txtVoucherNo.Text, DateTime.Parse(txtVoucherDate.Text));
             }
         }
         else
         {
             frmpartybalance.CallThisFormFromPDCReceivable(this, decLedgerIdForPartyBalance, dtblPartyBalance, decPDCReceivableVoucherTypeId, strVoucherNo, DateTime.Parse(txtVoucherDate.Text));
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PR34:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Function to call this form from frmPartyBalance to view details and for updation 
 /// </summary>
 /// <param name="frmPartyBalance"></param>
 /// <param name="decId"></param>
 /// <param name="dtbl"></param>
 /// <param name="arrlstOfRemovedRow"></param>
 public void CallFromPartyBalance(frmPartyBalance frmPartyBalance, decimal decId, DataTable dtbl, ArrayList arrlstOfRemovedRow)
 {
     try
     {
         this.frmPartyBalanceObj = frmPartyBalance;
         dgvPaymentVoucher.CurrentRow.Cells["dgvtxtAmount"].Value = decId.ToString();
         frmPartyBalanceObj.Close();
         frmPartyBalanceObj = null;
         dtblPartyBalance = dtbl;
         arrlstOfDeletedPartyBalanceRow = arrlstOfRemovedRow;
     }
     catch (Exception ex)
     {
         MessageBox.Show("PV8:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Cell click event for open Party balance form and calculate the settelment
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvPaymentVoucher_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.RowIndex >= 0)
         {
             AccountLedgerSP SpAccountLedger = new AccountLedgerSP();
             if (dgvPaymentVoucher.CurrentCell.ColumnIndex == dgvPaymentVoucher.Columns["dgvbtnAgainst"].Index)
             {
                 decimal decI = Convert.ToDecimal(SpAccountLedger.AccountGroupIdCheck(dgvPaymentVoucher.CurrentRow.Cells["dgvcmbAccountLedger"].FormattedValue.ToString()));
                 if (decI > 0)
                 {
                     frmPartyBalanceObj = new frmPartyBalance();
                     frmPartyBalanceObj.MdiParent = formMDI.MDIObj;
                     decimal decLedgerId = Convert.ToDecimal(dgvPaymentVoucher.CurrentRow.Cells["dgvcmbAccountLedger"].Value.ToString());
                     if (!isAutomatic)
                     {
                         frmPartyBalanceObj.CallFromPaymentVoucher(this, decLedgerId, dtblPartyBalance, decPaymentVoucherTypeId, txtVoucherNo.Text, Convert.ToDateTime(txtDate.Text), arrlstOfDeletedPartyBalanceRow);
                     }
                     else
                     {
                         frmPartyBalanceObj.CallFromPaymentVoucher(this, decLedgerId, dtblPartyBalance, decPaymentVoucherTypeId, strVoucherNo, Convert.ToDateTime(txtDate.Text), arrlstOfDeletedPartyBalanceRow);
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PV52:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 8
0
        /// <summary>
        /// Function to keep the datatable containing party balance details while calling from the partybalance form
        /// </summary>
        /// <param name="frmPartyBalance"></param>
        /// <param name="decAmount"></param>
        /// <param name="dtbl"></param>
        /// <param name="arrlstOfRemovedRow"></param>
        public void CallFromPartyBalance(frmPartyBalance frmPartyBalance, decimal decAmount, DataTable dtbl, ArrayList arrlstOfRemovedRow)
        {
            try
            {
                dgvJournalVoucher.CurrentRow.Cells["dgvtxtAmount"].Value = decAmount.ToString();
                dgvJournalVoucher.CurrentRow.Cells["dgvcmbCurrency"].Value = Convert.ToDecimal(1);
                dgvJournalVoucher.CurrentRow.Cells["dgvcmbCurrency"].ReadOnly = true;
                this.frmPartyBalanceObj = frmPartyBalance;
                frmPartyBalance.Close();
                frmPartyBalanceObj = null;
                dtblPartyBalance = dtbl;
                arrlstOfDeletedPartyBalanceRow = arrlstOfRemovedRow;

            }
            catch (Exception ex)
            {
                MessageBox.Show("JV9:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// For against button click in the grid
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgvJournalVoucher_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex >= 0)
                {
                    if (dgvJournalVoucher.CurrentCell.ColumnIndex == dgvJournalVoucher.Columns["dgvbtnAgainst"].Index)
                    {
                        AccountLedgerSP SpAccountLedger = new AccountLedgerSP();
                        if (dgvJournalVoucher.CurrentRow.Cells["dgvcmbAccountLedger"].Value != null && dgvJournalVoucher.CurrentRow.Cells["dgvcmbAccountLedger"].Value.ToString() != string.Empty)
                        {
                            if (dgvJournalVoucher.CurrentRow.Cells["dgvcmbDrOrCr"].Value != null && dgvJournalVoucher.CurrentRow.Cells["dgvcmbDrOrCr"].Value.ToString() != string.Empty)
                            {
                                if (SpAccountLedger.AccountGroupIdCheck(dgvJournalVoucher.CurrentRow.Cells["dgvcmbAccountLedger"].FormattedValue.ToString()))
                                {
                                    frmPartyBalanceObj = new frmPartyBalance();
                                    frmPartyBalanceObj.MdiParent = formMDI.MDIObj;
                                    decimal decLedgerId = Convert.ToDecimal(dgvJournalVoucher.CurrentRow.Cells["dgvcmbAccountLedger"].Value.ToString());

                                    string strDebitOrCredit = dgvJournalVoucher.CurrentRow.Cells["dgvcmbDrOrCr"].Value.ToString();
                                    if (!isAutomatic)
                                    {
                                        frmPartyBalanceObj.CallFromJournalVoucher(this, decLedgerId, dtblPartyBalance, strDebitOrCredit, decJournalVoucherTypeId, txtVoucherNo.Text, Convert.ToDateTime(txtDate.Text), arrlstOfDeletedPartyBalanceRow);
                                    }
                                    else
                                    {
                                        frmPartyBalanceObj.CallFromJournalVoucher(this, decLedgerId, dtblPartyBalance, strDebitOrCredit, decJournalVoucherTypeId, strVoucherNo, Convert.ToDateTime(txtDate.Text), arrlstOfDeletedPartyBalanceRow);
                                    }

                                }

                            }
                            else
                            {
                                Messages.InformationMessage("Select debit or credit");
                            }
                        }
                        else
                        {
                            Messages.InformationMessage("Select any ledger");
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("JV55:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Ejemplo n.º 10
0
 /// <summary>
 /// Calls frmPartyBalance form
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void partyBalanceToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         frmPartyBalance frm = new frmPartyBalance();
         frmPartyBalance open = Application.OpenForms["frmPartyBalance"] as frmPartyBalance;
         if (open == null)
         {
             frm.MdiParent = this;
             frm.Show();
         }
         else
         {
             open.Activate();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("MDI 118: " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 11
0
        /// <summary>
        /// On Clear button click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnClear_Click(object sender, EventArgs e)
        {
            try
            {
                clear();
                if (frmAgeingObj != null)
                {
                    frmAgeingObj.Close();
                    frmAgeingObj = null;
                }
                if (frmBillallocationObj != null)
                {
                    frmBillallocationObj.Close();
                    frmBillallocationObj = null;
                }
                if (frmCurrencyObj != null)
                {
                    frmCurrencyObj.Close();
                    frmCurrencyObj = null;
                }
                if (frmCreditNoteReportObj != null)
                {
                    frmCreditNoteReportObj.Close();
                    frmCreditNoteReportObj = null;
                }
                if (CreditNoteRegisterObj != null)
                {
                    CreditNoteRegisterObj.Close();
                    CreditNoteRegisterObj = null;
                }

                if (frmLedgerDetailsObj != null)
                {
                    frmLedgerDetailsObj.Close();
                    frmLedgerDetailsObj = null;
                }

                if (frmPartyBalanceObj != null)
                {
                    frmPartyBalanceObj.Close();
                    frmPartyBalanceObj = null;
                }

            }
            catch (Exception ex)
            {
                MessageBox.Show("CRNT:51" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Ejemplo n.º 12
0
 /// <summary>
 /// Against references button click for party balance calculations
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAgainstRef_Click(object sender, EventArgs e)
 {
     try
     {
         AccountLedgerSP spaccountledger = new AccountLedgerSP();
         if (spaccountledger.AccountGroupIdCheck(cmbAccountLedger.Text))
         {
             frmPartyBalance frmpartybalance = new frmPartyBalance();
             frmpartybalance.MdiParent = formMDI.MDIObj;
             if (!isAutomatic)
             {
                 if (txtvoucherNo.Text == string.Empty)
                 {
                     MessageBox.Show("Voucher Number Empty", "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
                     txtvoucherNo.Focus();
                 }
                 else
                 {
                     frmpartybalance.CallThisFormFromPDCPayable(this, decLedgerIdForPartyBalance, dtblPartyBalance, decPDCpayableVoucherTypeId, txtvoucherNo.Text, DateTime.Parse(txtVoucherDate.Text));
                 }
             }
             else
             {
                 frmpartybalance.CallThisFormFromPDCPayable(this, decLedgerIdForPartyBalance, dtblPartyBalance, decPDCpayableVoucherTypeId, strVoucherNo, DateTime.Parse(txtVoucherDate.Text));
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PP43:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }