Exemple #1
0
        public ActionResult GetHomeDoc()
        {
            var homeLinks = new HomeLinks();
            var links     = homeLinks.GetLinks(HttpContext, _generator);
            var response  = new
            {
                _links = links
            };

            return(Ok(response));
        }
        public JsonResult Index()
        {
            var list = new HomeLinks <HomeLinksItem>()
            {
                _links = new HomeLinksItem()
                {
                    Self = new LinksItemSub {
                        Href = Request.Path.ToString()
                    },
                    Customers = new LinksItemSub {
                        Href = new ConstantValue().CUSTOMERINITLINK
                    },
                    Employees = new LinksItemSub {
                        Href = new ConstantValue().EMPLOYEEINITLINK
                    },
                    Vendors = new LinksItemSub {
                        Href = new ConstantValue().VENDERINITLINK
                    },
                    Accounts = new LinksItemSub {
                        Href = new ConstantValue().ACCOUNTINITLINK
                    },
                    Bills = new LinksItemSub {
                        Href = new ConstantValue().BILLINITLINK
                    },
                    BillPayments = new LinksItemSub {
                        Href = new ConstantValue().BILLPAYMENTINITLINK
                    },
                    PayRolls = new LinksItemSub {
                        Href = new ConstantValue().PAYROLLINITLINK
                    },
                    Transactions = new LinksItemSub {
                        Href = new ConstantValue().TRANSACTIONINITLINK
                    }
                },
                Company    = new ConstantValue().COMPANYNAME,
                QbFileName = new ConstantValue().QBFILENAME
            };


            return(Json(list));
        }
 public EfSqlHomeService(BooksDataContext dbContext, HomeLinks homeLinks)
 {
     _dbContext = dbContext;
     _homeLinks = homeLinks;
 }