コード例 #1
0
        public void LedgerPostingAdd()
        {
            try
            {
                string strfinancialId;
                //decOpeningBalance = Convert.ToDecimal(tbxOpbal.Text.Trim());
                LedgerPostingBL    objBL             = new LedgerPostingBL();
                LedgerPostingModel infoLedgerPosting = new LedgerPostingModel();

                FinancialYeaBL objFinBL = new FinancialYeaBL();

                FinancialYearModel infoFinancialYear = new FinancialYearModel();

                infoFinancialYear = objFinBL.FinancialYearViewForAccountLedger(1);

                strfinancialId = infoFinancialYear.FromDate.ToString("dd-MMM-yyyy");

                infoLedgerPosting.VoucherTypeId = 1;
                infoLedgerPosting.Date          = Convert.ToDateTime(dtDate.Text.Trim());
                infoLedgerPosting.LedgerId      = Convert.ToDecimal(objAccBL.GetLedgerIdByAccountName(cbxPayMode.Text.Trim() == null?String.Empty:cbxPayMode.Text.Trim()));
                infoLedgerPosting.VoucherNo     = tbxVchNumber.Text.Trim();

                //if (cbxCrDr.Text == "D")
                //{
                //    infoLedgerPosting.Debit = decOpeningBalance;
                //}
                //else
                //{
                //    infoLedgerPosting.Credit = decOpeningBalance;
                //}
                infoLedgerPosting.DetailsId = 0;
                infoLedgerPosting.YearId    = SessionVariables._decCurrentFinancialYearId;
                //infoLedgerPosting.InvoiceNo = decLedgerId.ToString();
                infoLedgerPosting.ChequeNo   = string.Empty;
                infoLedgerPosting.ChequeDate = DateTime.Now;
                infoLedgerPosting.Extra1     = string.Empty;
                infoLedgerPosting.Extra2     = string.Empty;

                objBL.LedgerPostingAdd(infoLedgerPosting);
            }
            catch (Exception ex)
            {
            }
        }
コード例 #2
0
ファイル: Account.cs プロジェクト: mezeus/IPCAXprs
        private void btnDelete_Click(object sender, EventArgs e)
        {
            bool isDelete = accMaster.DeleteAccountMasterById(groupId);

            if (isDelete)
            {
                LedgerPostingBL objBL = new LedgerPostingBL();
                if (objBL.LedgerPostingDelete(groupId))
                {
                    MessageBox.Show("Delete Successfully!");
                    ClearControls();
                    groupId = 0;
                    Administration.List.AccountList frmList = new Administration.List.AccountList();
                    frmList.StartPosition = FormStartPosition.CenterScreen;

                    frmList.ShowDialog();
                    FillAccountInfo();
                }
            }
        }
コード例 #3
0
ファイル: Account.cs プロジェクト: mezeus/IPCAXprs
        public void LedgerPostingEdit(long id)
        {
            try
            {
                string strfinancialId;
                decOpeningBalance = Convert.ToDecimal(tbxOpbal.Text.Trim());
                LedgerPostingBL    objBL             = new LedgerPostingBL();
                LedgerPostingModel infoLedgerPosting = new LedgerPostingModel();
                //FinancialYearSP spFinancialYear = new FinancialYearSP();
                //FinancialYearInfo infoFinancialYear = new FinancialYearInfo();
                //infoFinancialYear = spFinancialYear.FinancialYearViewForAccountLedger(1);

                //strfinancialId = infoFinancialYear.FromDate.ToString("dd-MMM-yyyy"); -NEED TO REVIEW AND RELEASE THIS
                infoLedgerPosting.ParentId      = id;
                infoLedgerPosting.VoucherTypeId = 1;
                infoLedgerPosting.Date          = Convert.ToDateTime(DateTime.Today.ToString());
                infoLedgerPosting.VoucherNo     = id.ToString();

                if (cbxCrDr.Text == "D")
                {
                    infoLedgerPosting.Debit = decOpeningBalance;
                }
                else
                {
                    infoLedgerPosting.Credit = decOpeningBalance;
                }
                infoLedgerPosting.DetailsId  = 0;
                infoLedgerPosting.YearId     = SessionVariables._decCurrentFinancialYearId;
                infoLedgerPosting.InvoiceNo  = id.ToString();
                infoLedgerPosting.ChequeNo   = string.Empty;
                infoLedgerPosting.ChequeDate = DateTime.Now;
                infoLedgerPosting.Extra1     = string.Empty;
                infoLedgerPosting.Extra2     = string.Empty;
                objBL.LedgerPostingEdit(infoLedgerPosting);
            }
            catch (Exception ex)
            {
            }
        }