Ejemplo n.º 1
0
        public void insertLedgerTransaction(string strVoucherCode)
        {
            JournalVoucherMBL objJournalVoucherMBL = new JournalVoucherMBL();
            JournalVoucherTBL objJournalVoucherTBL = new JournalVoucherTBL();
            JournalVoucherTBO objJournalVoucherTBO = new JournalVoucherTBO();
            ApplicationResult objResultSelect      = new ApplicationResult();
            ApplicationResult objResultInsert      = new ApplicationResult();
            DataTable         dt = new DataTable();

            objResultSelect = objJournalVoucherMBL.JournalVoucherM_Select(strVoucherCode, Convert.ToInt32(Session[ApplicationSession.TRUSTID]), Convert.ToInt32(Session[ApplicationSession.SCHOOLID]));
            if (objResultSelect != null)
            {
                dt = objResultSelect.resultDT;
                if (dt.Rows.Count > 0)
                {
                    int intJournalID = Convert.ToInt32(dt.Rows[0][0].ToString());
                    for (int i = 1; i < dt.Rows.Count; i++)
                    {
                        int intOppJpurnaaID = Convert.ToInt32(dt.Rows[i][0].ToString());

                        objJournalVoucherTBO.JournalID          = intJournalID;
                        objJournalVoucherTBO.OppositeJournalID  = intOppJpurnaaID;
                        objJournalVoucherTBO.CreatedDate        = DateTime.UtcNow.AddHours(5.5).ToString("dd/MM/yyyy");
                        objJournalVoucherTBO.CreatedUserID      = Convert.ToInt32(Session[ApplicationSession.USERID]);
                        objJournalVoucherTBO.IsDeleted          = 0;
                        objJournalVoucherTBO.LastModifideDate   = DateTime.UtcNow.AddHours(5.5).ToString("dd/MM/yyyy");
                        objJournalVoucherTBO.LastModifideUserID = Convert.ToInt32(Session[ApplicationSession.USERID]);

                        objResultInsert = objJournalVoucherTBL.JournalVoucherT_Insert(objJournalVoucherTBO);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public void deleteLedgerTransaction(string strVoucherCode)
        {
            try
            {
                JournalVoucherTBL objJournalVoucherTBL = new JournalVoucherTBL();
                ApplicationResult objResultDelete      = new ApplicationResult();

                objResultDelete = objJournalVoucherTBL.JournalVoucherT_Delete(strVoucherCode);
                if (objResultDelete.status == ApplicationResult.CommonStatusType.SUCCESS)
                {
                }
            }
            catch (Exception ex)
            {
                logger.Error("Error", ex);
                ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('Oops! There is some technical issue. Please Contact to your administrator.');</script>");
            }
        }