Example #1
0
        public PartialViewResult Financial()
        {
            DataTable        dt           = new DataTable();
            BusssinessLogic  objbal       = new BusssinessLogic();
            List <Financial> lstfinancial = new List <Financial>();

            try {
                dt = objbal.BalGetdataByOrderIddatatableFinancial();
                if (dt.Rows.Count > 0)
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        lstfinancial.Add(
                            new Financial
                        {
                            GLAccountName   = dr["GLAccountName"].ToString(),
                            GLAccountNumber = dr["GLAccountNumber"].ToString(),
                            GLAccountType   = dr["GLAccountType"].ToString(),
                            GLReportLevel   = dr["GLReportLevel"].ToString()
                        }

                            );
                    }
                }
                else
                {
                    lstfinancial.Add(
                        new Financial
                    {
                        GLAccountName   = "",
                        GLAccountNumber = "",
                        GLAccountType   = "",
                        GLReportLevel   = ""
                    }
                        );
                }
            }
            catch (Exception ex) {
            }

            return(PartialView(lstfinancial));
        }