コード例 #1
0
        public ActionResult NewOrder(int ListItemId)
        {
            var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);

            using (var ctx = spContext.CreateUserClientContextForSPHost())
            {
                Customer customer = CustomerItemHelper.GetCustomerFromSharepoint(ListItemId, ctx);
                ViewBag.termset     = OrderListHelper.GetTaxonomyTermSet(ctx);
                ViewBag.listitem    = ListItemId;
                ViewBag.CompanyName = customer.Title;
                return(View());
            }
        }
コード例 #2
0
        public ActionResult Index(int ListItemId, int?ListId, string SPHostUrl)
        {
            var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);

            using (var ctx = spContext.CreateUserClientContextForSPHost())
            {
                // ViewBag.IsUpdated = IsUpdated;
                ViewBag.OrderList = OrderListHelper.GetOrderList(ListItemId, ctx);
                Customer customer = CustomerItemHelper.GetCustomerFromSharepoint(ListItemId, ctx);
                ViewBag.CustomerId = ListItemId;
                ViewBag.SPHostUrl  = SPHostUrl;
                return(View(customer));
            }
        }