Beispiel #1
0
        //
        // GET: /SysAdmin/Asset/
        public ActionResult Index()
        {
            List <AccountVM> viewModels           = new List <AccountVM>();
            AccountBAL       balObject            = new AccountBAL();
            IQueryable <Entities.Account> entites = balObject.GetAll(SessionHelper.SchoolId);

            foreach (Entities.Account entity in entites)
            {
                AccountVM viewModel = new AccountVM();
                viewModel.SrNo             = entity.SrNo;
                viewModel.NarrationDetails = entity.NarrationDetails;
                viewModel.TransactionType  = entity.TransactionType;
                viewModel.PaymentMode      = entity.PaymentMode;
                viewModel.Amount           = entity.Amount;
                viewModel.Balance          = entity.Balance;
                viewModel.TransactionDate  = entity.TransactionDate;
                viewModel.Remark           = entity.Remark;

                viewModel.CustomerName = entity.CustomerName;
                viewModel.BankName     = entity.BankName;
                viewModel.ChqDDNumber  = entity.ChqDDNumber;
                viewModel.ContactNo    = entity.ContactNo;
                viewModels.Add(viewModel);
            }
            return(View(new GridModel <AccountVM> {
                Data = viewModels
            }));
        }
Beispiel #2
0
        private DataSet CashBookReport(DateTime fromDate, DateTime toDate)
        {
            DataSet ds = new DataSet();

            ds.DataSetName = "DataSourceForReport";

            DataTable dt = new DataTable("AccountDetails");

            dt.TableName = "AccountDetails";

            dt.Columns.Add(new DataColumn("SrNo", typeof(int)));
            dt.Columns.Add(new DataColumn("NarrationDetails", typeof(string)));
            dt.Columns.Add(new DataColumn("TransactionType", typeof(string)));
            dt.Columns.Add(new DataColumn("Amount", typeof(decimal)));
            dt.Columns.Add(new DataColumn("Total", typeof(decimal)));
            dt.Columns.Add(new DataColumn("Remark", typeof(string)));
            dt.Columns.Add(new DataColumn("TransactionDate", typeof(DateTime)));

            AccountBAL balObject = new AccountBAL();
            IQueryable <Entities.Account> entites = balObject.GetAll(SessionHelper.SchoolId);

            if (entites != null && entites.Count() > 0)
            {
                foreach (Entities.Account entity in entites)
                {
                    DataRow dr = dt.NewRow();

                    dr["SrNo"]             = entity.SrNo;
                    dr["NarrationDetails"] = entity.NarrationDetails;
                    dr["TransactionType"]  = entity.TransactionType;
                    dr["Amount"]           = entity.Amount;
                    dr["Total"]            = 0;//entity.Total;
                    dr["Remark"]           = entity.Remark;
                    dr["TransactionDate"]  = entity.TransactionDate;

                    reportName = "_";
                    dt.Rows.Add(dr);
                }
            }
            ds.Tables.Add(getSchoolDetails());
            ds.Tables.Add(dt);
            return(ds);
        }
Beispiel #3
0
        public ActionResult Select()
        {
            string mode = Request.QueryString["Grid-mode"];

            if (!string.IsNullOrEmpty(mode))
            {
                return(this.RedirectToAction("Create"));
            }
            else
            {
                List <AccountVM> viewModels           = new List <AccountVM>();
                AccountBAL       balObject            = new AccountBAL();
                IQueryable <Entities.Account> entites = balObject.GetAll(SessionHelper.SchoolId);

                foreach (Entities.Account entity in entites)
                {
                    AccountVM viewModel = new AccountVM();
                    viewModel.SrNo             = entity.SrNo;
                    viewModel.NarrationDetails = entity.NarrationDetails;
                    viewModel.TransactionType  = entity.TransactionType;
                    viewModel.PaymentMode      = entity.PaymentMode;
                    viewModel.Amount           = entity.Amount;
                    viewModel.Balance          = entity.Balance;
                    viewModel.TransactionDate  = entity.TransactionDate;
                    viewModel.Remark           = entity.Remark;

                    viewModel.CustomerName = entity.CustomerName;
                    viewModel.BankName     = entity.BankName;
                    viewModel.ChqDDNumber  = entity.ChqDDNumber;
                    viewModel.ContactNo    = entity.ContactNo;

                    viewModels.Add(viewModel);
                }
                return(View(new GridModel <AccountVM> {
                    Data = viewModels
                }));
            }
        }