{"id":175571,"date":"2013-04-05T08:26:03","date_gmt":"2013-04-05T04:26:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=175571"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=175571","title":{"rendered":"<span class=\"post_title\">Tree View \u0441 \u00abCRUD \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438\u00bb, \u00abdrag and drop (DnD)\u00bb \u0438 \u00ab\u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439\u00bb \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Dojo Tree, Entity Framework, SQL Server \u0438 ASP.NET MVC<\/span>"},"content":{"rendered":"<div class=\"content html_format\">       <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/a0d\/0bd\/504\/a0d0bd504fd5763690dfe6b24eeb80ce.png\" alt=\"image\"\/><\/p>\n<h5>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h5>\n<p>  Dojo Toolkit \u044d\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u0430\u044f JavaScript \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u0440\u043e\u0441\u0441-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0445 JavaScript\/Ajax-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u0449\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Dojo Tree \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0435, \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0435, \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0435, \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0432\u0435\u0442\u043e\u043a, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0435\u043c\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445. Dojo Tree \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f\u043c\u0438 \u00ab\u043f\u0440\u0435\u0434\u043e\u043a-\u043f\u043e\u0442\u043e\u043c\u043e\u043a\u00bb.<\/p>\n<p>  \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u0430, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u00abCRUD \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438\u00bb, \u00abdrag and drop (DnD)\u00bb \u0438 \u00ab\u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443\u00bb. \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Dojo Tree, Entity Framework, SQL Server \u0438 Asp .Net MVC.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h5>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 MVC \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Entity Framework<\/h5>\n<p>  \u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 Entity Framework \u00ab\u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u043e\u0434\u0435\u043b\u044c\u00bb. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0442\u043e \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b, \u043a\u0430\u043a \u00ab\u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u0434\u00bb \u0438\u043b\u0438 \u00ab\u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445\u00bb. \u0423 Julie Lerman \u0435\u0441\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u00ab\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 MVC 3 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c \u201e\u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u043e\u0434\u0435\u043b\u044c\u201c \u0438 Entity Framework 4.1\u00bb <a href=\"http:\/\/msdn.microsoft.com\/en-us\/data\/gg685494\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043b\u0430\u0441\u0441\u0430 \u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0436\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043e \u0437\u0434\u0435\u0441\u044c.<\/p>\n<h5>RESTful \u0441\u0435\u0440\u0432\u0438\u0441 \u0432 ASP.NET MVC<\/h5>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a Dojo JsonRest Store \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 JSON \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f CRUD \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d RESTful \u0441\u0435\u0440\u0432\u0438\u0441 \u0441 ASP.NET MVC 3. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0445\u043e\u0440\u043e\u0448\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u00ab\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 RESTful API \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0432 ASP.NET MVC 3 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445\u00bb \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e Justin Schwartzenberger <a href=\"http:\/\/iwantmymvc.com\/rest-service-mvc3\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u041c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0432\u0441\u044e, \u043d\u043e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0447\u0430\u0441\u0442\u044c \u0438\u0434\u0435\u0439 \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0441\u0432\u043e\u0439 <code>ActionFilterAttribute<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 (verb) \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043a\u043b\u0430\u0441\u0441 (<code>RestHttpVerbFilter.cs<\/code>) \u0432 \u043f\u0430\u043f\u043a\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u0434\u0430:  <\/p>\n<pre><code class=\"cs\">using System.Web.Mvc;  namespace DojoTree.Models {     public class RestHttpVerbFilter : ActionFilterAttribute     {         public override void OnActionExecuting(ActionExecutingContext filterContext)         {             var httpMethod = filterContext.HttpContext.Request.HttpMethod;             filterContext.ActionParameters[&quot;httpVerb&quot;] = httpMethod;             base.OnActionExecuting(filterContext);         }     } } <\/code><\/pre>\n<p>  \u00ab\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c HTTP \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (HTTP verb) \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0438\u0445 \u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 <code>ActionParameters<\/code>. \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u044d\u0442\u043e\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>httpVerb<\/code> \u0438 <code>RestHttpVerbFilter<\/code> \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a \u043d\u0435\u043c\u0443. \u041d\u0430\u0448 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u043d\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 HTTP \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u043d\u043e \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 HTTP \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. \u042d\u0442\u043e\u0442 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0438\u043c\u0435\u0442\u044c \u043e\u0434\u0438\u043d \u043c\u0435\u0442\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 HTTP \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u0431\u0435\u0437 \u0437\u0430\u0431\u043e\u0442\u044b \u043e \u043b\u043e\u0433\u0438\u043a\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.\u00bb[6]<\/p>\n<h5>\u041c\u043e\u0434\u0435\u043b\u044c<\/h5>\n<p>  \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043a\u043b\u0430\u0441\u0441 \u043c\u043e\u0434\u0435\u043b\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0443\u0437\u043b\u0430\u0445 \u0434\u0435\u0440\u0435\u0432\u0430. \u041a\u043b\u0430\u0441\u0441 \u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0430 \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0435:  <\/p>\n<pre><code class=\"cs\">public partial class Node     {         public int Id { get; set; }         public int ParentId { get; set; }         public string NodeName { get; set; }     }  <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/79b\/03b\/0cc\/79b03b0cc87a0eceae8603bd9d4c2893.png\" alt=\"image\"\/><\/p>\n<h5>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/h5>\n<p>  \u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0441\u044b\u043b\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0440\u043d\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u043c\u0435\u043d\u044e \u0432 \u0444\u0430\u0439\u043b\u0435 <code>&quot;_Layout.cshtml&quot;<\/code> \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435:  <\/p>\n<pre><code class=\"cs\">\t&lt;ul id=&quot;menu&quot;&gt; \t\t&lt;li&gt;@Html.ActionLink(&quot;Home&quot;, &quot;Index&quot;, &quot;Home&quot;)&lt;\/li&gt; \t\t&lt;li&gt;@Html.ActionLink(&quot;\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0440\u043d\u044f&quot;, &quot;generateRoot&quot;, &quot;Home&quot;)&lt;\/li&gt; \t&lt;\/ul&gt; <\/code><\/pre>\n<p>  <\/p>\n<h6>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Home\/generateRoot<\/h6>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u00abgenerateRoot\u00bb \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435:  <\/p>\n<pre><code class=\"cs\">@{     ViewBag.Title = &quot;generateRoot&quot;; } &lt;h2&gt;@ViewBag.Message&lt;\/h2&gt; <\/code><\/pre>\n<p>  <\/p>\n<h6>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Home\/Index<\/h6>\n<p>  \u041a\u043e\u0434 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f:  <\/p>\n<pre><code class=\"cs\">@{     ViewBag.Title = &quot;Dojo Tree&quot;; } &lt;h2&gt;@ViewBag.Message&lt;\/h2&gt;  &lt;link rel=&quot;stylesheet&quot;  href=&quot;http:\/\/ajax.googleapis.com\/ajax\/libs\/dojo\/1.7.1\/dojo\/resources\/dojo.css&quot;&gt; &lt;link rel=&quot;stylesheet&quot;  href=&quot;http:\/\/ajax.googleapis.com\/ajax\/libs\/dojo\/1.7.1\/dijit\/themes\/claro\/claro.css&quot;&gt; &lt;!-- load dojo and provide config via data attribute --&gt; &lt;script src=&quot;http:\/\/ajax.googleapis.com\/ajax\/libs\/dojo\/1.7.1\/dojo\/dojo.js&quot;            data-dojo-config=&quot;async: true, isDebug: true, parseOnLoad: true&quot;&gt;&lt;\/script&gt;  &lt;script src=&quot;\/js\/tree.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;  &lt;div style=&quot; width: 400px; margin: 10px;&quot;&gt;     &lt;div id=&quot;tree&quot;&gt;&lt;\/div&gt; &lt;\/div&gt; &lt;div id=&quot;add-new-child&quot;&gt;&lt;\/div&gt; &lt;div id=&quot;remove-child&quot;&gt;&lt;\/div&gt; <\/code><\/pre>\n<p>  \u041f\u043e\u043b\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043e \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u0430 \u0432\u044b\u0448\u0435 \u0438 \u043d\u0438\u0436\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"http:\/\/dojotoolkit.org\/documentation\/tutorials\/1.7\/store_driven_tree\/\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043a\u043e\u0434\u0430 \u0432\u044b\u0448\u0435, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <code>js\/tree.js<\/code>, \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435.<\/p>\n<h5>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 js\/tree.js<\/h5>\n<p>  <code>tree.js<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u0435\u0439:<\/p>\n<p>  \u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 Dojo \u043c\u043e\u0434\u0443\u043b\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430:  <\/p>\n<pre><code class=\"javascript\">require([&quot;dojo\/store\/JsonRest&quot;,             &quot;dojo\/store\/Observable&quot;,             &quot;dojo\/_base\/Deferred&quot;,             &quot;dijit\/Tree&quot;,             &quot;dijit\/tree\/dndSource&quot;,             &quot;dojox\/form\/BusyButton&quot;,             &quot;dojo\/query&quot;,             &quot;dojo\/domReady!&quot;], function  \t\t(JsonRest, Observable, Deferred, Tree, dndSource, BusyButton, query) { <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <code>treeStore<\/code> \u043a <code>TreeController<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>&quot;target: &quot;\/tree\/data\/&quot;&quot;<\/code>.<\/p>\n<ul>\n<li><code>mayHaveChildren<\/code> \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0435\u0441\u0442\u044c \u043b\u0438 \u0443 \u0443\u0437\u043b\u0430 \u043f\u043e\u0442\u043e\u043c\u043a\u0438<\/li>\n<li><code>getChildren<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043e\u043f\u0438\u044e \u0432\u0441\u0435\u0445 \u043f\u043e\u0442\u043e\u043c\u043a\u043e\u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0430<\/li>\n<li><code>getRoot<\/code>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, we will do a get() and callback the result. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0443 \u043a\u043e\u0440\u043d\u044f id = 1<\/li>\n<li><code>getLabel<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043c\u044f<\/li>\n<li><code>pasteItem<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f drag and drop \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 Id \u043f\u043e\u0442\u043e\u043c\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/li>\n<li><code>put<\/code> \u0432\u044b\u043d\u0443\u0436\u0434\u0430\u0435\u0442 <code>store<\/code> \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0411\u0414 \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439<\/li>\n<\/ul>\n<pre><code class=\"javascript\">treeStore = JsonRest({     target: &quot;\/tree\/data\/&quot;,     mayHaveChildren: function (object) {         \/\/ see if it has a children property         return &quot;children&quot; in object;     },     getChildren: function (object, onComplete, onError) {         \/\/ retrieve the full copy of the object         this.get(object.id).then(function (fullObject) {             \/\/ copy to the original object so it has the children array as well.             object.children = fullObject.children;             \/\/ now that full object, we should have an array of children             onComplete(fullObject.children);         }, function (error) {             \/\/ an error occurred, log it, and indicate no children             console.error(error);             onComplete([]);         });     },     getRoot: function (onItem, onError) {         \/\/ get the root object, we will do a get() and callback the result         this.get(&quot;1&quot;).then(onItem, function (error) {             alert(&quot;Error loading Root&quot;);         });     },     getLabel: function (object) {         \/\/ just get the name         return object.NodeName;     },     pasteItem: function (child, oldParent, newParent, bCopy, insertIndex) {              \/\/ This will prevent to add a child to its parent again.         if (child.ParentId == newParent.id) { return false; }                  var store = this;         store.get(oldParent.id).then(function (oldParent) {             store.get(newParent.id).then(function (newParent) {                 store.get(child.id).then(function (child) {                     var oldChildren = oldParent.children;                     dojo.some(oldChildren, function (oldChild, i) {                         if (oldChild.id == child.id) {                             oldChildren.splice(i, 1);                             return true; \/\/ done                         }                     });                                          store.put(oldParent);                                          \/\/This will change the parent of the moved Node                     child.ParentId = newParent.id;                     store.put(child);                                          newParent.children.splice(insertIndex || 0, 0, child);                                          store.put(newParent);                                      }, function (error) {                     alert(&quot;Error loading &quot; + child.NodeName);                 });             }, function (error) {                 alert(&quot;Error loading &quot; + newParent.NodeName);             });         }, function (error) {             alert(&quot;Error loading &quot; + oldParent.NodeName);         });     },     put: function (object, options) {         this.onChildrenChange(object, object.children);         this.onChange(object);         return JsonRest.prototype.put.apply(this, arguments);     } }); <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 Dojo Tree \u0438 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0435\u0433\u043e \u043a <code>&lt;div id=&quot;tree&quot;&gt;&lt;\/div&gt;<\/code> \u0438 <code>treeStore<\/code>, \u0430 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0435\u0433\u043e:  <\/p>\n<pre><code class=\"javascript\">tree = new Tree({     model: treeStore,     dndController: dndSource }, &quot;tree&quot;); \/\/ make sure you have a target HTML element with this id  tree.startup(); <\/code><\/pre>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u00abclaro\u00bb \u0442\u0435\u043c\u0443 \u0434\u043b\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b:  <\/p>\n<pre><code class=\"javascript\">dojo.query(&quot;body&quot;).addClass(&quot;claro&quot;); <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 <code>BusyButton<\/code>: <code>addNewChildButton<\/code> \u0438 <code>removeChildButton<\/code>. <br \/>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043e\u0431 \u044d\u0442\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"http:\/\/dojotoolkit.org\/reference-guide\/1.8\/dojox\/form\/BusyButton.html\">\u0437\u0434\u0435\u0441\u044c<\/a>  <\/p>\n<pre><code class=\"javascript\">var addNewChildButton = new BusyButton({     id: &quot;add-new-child&quot;,     busyLabel: &quot;Wait a moment...&quot;,     label: &quot;Add new child to selected item&quot;,     timeout: 500 }, &quot;add-new-child&quot;);  var removeChildButton = new BusyButton({     id: &quot;remove-child&quot;,     busyLabel: &quot;Wait a moment...&quot;,     label: &quot;Remove selected item&quot;,     timeout: 500 }, &quot;remove-child&quot;); <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u043e \u043a\u043b\u0438\u043a\u0443 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 <code>add-new-child<\/code>. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0431\u0440\u0430\u043b \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u0435\u0440\u0435\u0432\u0430. \u0417\u0430\u0442\u0435\u043c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>selectedObject<\/code> \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0438 \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0442\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u0432\u0435\u0441\u0442\u0438 \u0438\u043c\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u0414\u0430\u043b\u0435\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>newItem<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0442\u043e\u043c\u043a\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 <code>selectedObject<\/code> \u0438 \u043e\u0442\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 <code>treeStore.put(newItem);<\/code>. \u041f\u043e \u043f\u0440\u043e\u0448\u0435\u0441\u0442\u0432\u0438\u0438 500 \u043c\u0441, \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <code>selectedObject<\/code> \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c id \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043c\u043a\u0430. \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 500 \u043c\u0441 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <code>&quot;Deferred.when\/dojo.when&quot;<\/code>, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"http:\/\/dojotoolkit.org\/reference-guide\/1.8\/dojo\/when.html\">\u0437\u0434\u0435\u0441\u044c<\/a>.  <\/p>\n<pre><code class=\"javascript\">query(&quot;#add-new-child&quot;).on(&quot;click&quot;, function () {      var selectedObject = tree.get(&quot;selectedItems&quot;)[0];      if (!selectedObject) {         return alert(&quot;No object selected&quot;);     }      \/\/Sync selectedObject with server     treeStore.get(selectedObject.id).then(function (selectedObject) {         var name = prompt(&quot;Enter a name for new node&quot;);         if (name != null && name != &quot;&quot;) {              var newItem = { NodeName: name, ParentId: selectedObject.id, children: &quot;&quot; };              selectedObject.children.push(newItem);              treeStore.put(newItem);              \/\/Loading recently added node 500ms after puting it             var nodeId = new Deferred();             Deferred.when(nodeId, reloadNode);             setTimeout(function () {                 nodeId.resolve(selectedObject.id);             }, 500);          } else { return alert(&quot;Name can not be empty.&quot;); }      }, function (error) {         alert(&quot;Error loading &quot; + selectedObject.NodeName);     }); }); <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043b\u0438\u043a \u043f\u043e \u043a\u043d\u043e\u043f\u043a\u0435 <code>remove-child<\/code>. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0431\u0440\u0430\u043b \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0438 \u0447\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u043d\u0435\u043c \u0434\u0435\u0440\u0435\u0432\u0430. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f: \u00ab\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0443\u0437\u0435\u043b \u0438 \u0432\u0441\u0435 \u0435\u0433\u043e \u043f\u043e\u0442\u043e\u043c\u043a\u0438?\u00bb. \u0415\u0441\u043b\u0438 \u043e\u0442\u0432\u0435\u0442 \u0434\u0430, \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>selectedObject<\/code> \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0438 \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d \u043c\u0435\u0442\u043e\u0434 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u0442\u043e\u043c\u043a\u043e\u0432 \u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430 <code>removeAllChildren(selectedObject);<\/code>. \u041f\u043e \u043f\u0440\u043e\u0448\u0435\u0441\u0442\u0432\u0438\u0438 500 \u043c\u0441, \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 <code>selectedObject.ParentId<\/code> \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f.  <\/p>\n<pre><code class=\"javascript\">query(&quot;#remove-child&quot;).on(&quot;click&quot;, function () {      var selectedObject = tree.get(&quot;selectedItems&quot;)[0];      if (!selectedObject) {         return alert(&quot;No object selected&quot;);     }     if (selectedObject.id == 1) {         return alert(&quot;Can not remove Root Node&quot;);     }      var answer = confirm(&quot;Are you sure you want to permanently delete  \t\tthis node and all its children?&quot;)     if (answer) {          treeStore.get(selectedObject.id).then(function (selectedObject) {              removeAllChildren(selectedObject);              \/\/Reloading the parent of recently removed node 500ms after removing it             var ParentId = new Deferred();             Deferred.when(ParentId, reloadNode);             setTimeout(function () {                 ParentId.resolve(selectedObject.ParentId);             }, 500);          }, function (error) {             alert(&quot;Error loading &quot; + selectedObject.NodeName);         });     } }); <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u043a\u043b\u0438\u043a <code>dblclick<\/code> \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u0437\u043b\u0430 \u0434\u0435\u0440\u0435\u0432\u0430. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0438 \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u043e\u0435 \u0438\u043c\u044f \u0434\u043b\u044f \u0443\u0437\u043b\u0430. \u0417\u0430\u0442\u0435\u043c \u043d\u043e\u0432\u043e\u0435 \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0443 <code>treeStore.put(object)<\/code>.  <\/p>\n<pre><code class=\"javascript\"> tree.on(&quot;dblclick&quot;, function (object) {          treeStore.get(object.id).then(function (object) {              var name = prompt(&quot;Enter a new name for the object&quot;);             if (name != null && name != &quot;&quot;) {                 object.NodeName = name;                  treeStore.put(object).then(function () {                 }, function (error) {                     \/\/ On Error revert Value                     reloadNode(object.ParentId);                      alert(&quot;Error renaming &quot; + object.NodeName);                 });              } else { return alert(&quot;Name can not be empty.&quot;); }         }, function (error) {             alert(&quot;Error loading &quot; + object.NodeName);         });     }, true); }); <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0443\u0437\u0435\u043b \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e id \u0438 \u0432\u0441\u0435\u0445 \u043f\u043e\u0442\u043e\u043c\u043a\u043e\u0432 \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f.  <\/p>\n<pre><code class=\"javascript\">function reloadNode(id) {     treeStore.get(id).then(function (Object) {         treeStore.put(Object);     }) }; <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0441\u0435\u0445 \u043f\u043e\u0442\u043e\u043c\u043a\u043e\u0432 \u0443\u0437\u043b\u0430.  <\/p>\n<pre><code class=\"javascript\">function removeAllChildren(node) {     treeStore.get(node.id).then(function (node) {          var nodeChildren = node.children;         for (n in nodeChildren) {             removeAllChildren(nodeChildren[n]);         }         treeStore.remove(node.id);     }, function (error) {         alert(error);     }); }; <\/code><\/pre>\n<h5>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440<\/h5>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440.<\/p>\n<h6>TreeController<\/h6>\n<p>  \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u043a\u043e\u0434, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u0432 <code>&quot;TreeController.cs&quot;:<\/code>  <\/p>\n<pre><code class=\"cs\">using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Data.Entity; using DojoTree.Models; using System.Data; using System.Net;  namespace DojoTree.Controllers {     public class TreeController : Controller     {         private TreeModelContainer db = new TreeModelContainer();          \/\/ GET     \/Tree\/Data\/3         \/\/ POST    \/Tree\/Data         \/\/ PUT     \/Tree\/Data\/3         \/\/ DELETE  \/Tree\/Data\/3         [RestHttpVerbFilter]         public JsonResult Data(Node node, string httpVerb, int id = 0)         {             switch (httpVerb)             {                 case &quot;POST&quot;:                     if (ModelState.IsValid)                     {                         db.Entry(node).State = EntityState.Added;                         db.SaveChanges();                         return Json(node, JsonRequestBehavior.AllowGet);                     }                     else                     {                         Response.TrySkipIisCustomErrors = true;                         Response.StatusCode = (int)HttpStatusCode.NotAcceptable;                         return Json(new { Message = &quot;Data is not Valid.&quot; },                         JsonRequestBehavior.AllowGet);                     }                 case &quot;PUT&quot;:                     if (ModelState.IsValid)                     {                         db.Entry(node).State = EntityState.Modified;                         db.SaveChanges();                         return Json(node, JsonRequestBehavior.AllowGet);                     }                     else                     {                         Response.TrySkipIisCustomErrors = true;                         Response.StatusCode = (int)HttpStatusCode.NotAcceptable;                         return Json(new { Message = &quot;Node &quot; + id + &quot;                         Data is not Valid.&quot; }, JsonRequestBehavior.AllowGet);                     }                 case &quot;GET&quot;:                     try                     {                         var node_ = from entity in db.Nodes.Where(x =&gt; x.Id.Equals(id))                                 select new                                        {                                            id = entity.Id,                                            NodeName = entity.NodeName,                                            ParentId = entity.ParentId,                                            children = from entity1 in db.Nodes.Where                                            (y =&gt; y.ParentId.Equals(entity.Id))                                                       select new                                                       {                                                           id = entity1.Id,                                                           NodeName = entity1.NodeName,                                                           ParentId = entity1.ParentId,                                                           children =                                                           &quot;&quot; \/\/ it calls checking children                                                               \/\/ whenever needed                                                       }                                        };                          var r = node_.First();                         return Json(r, JsonRequestBehavior.AllowGet);                     }                     catch                     {                         Response.TrySkipIisCustomErrors = true;                         Response.StatusCode = (int)HttpStatusCode.NotAcceptable;                         return Json(new { Message = &quot;Node &quot; + id +                         &quot; does not exist.&quot; }, JsonRequestBehavior.AllowGet);                     }                 case &quot;DELETE&quot;:                     try                     {                         node = db.Nodes.Single(x =&gt; x.Id == id);                         db.Nodes.Remove(node);                         db.SaveChanges();                         return Json(node, JsonRequestBehavior.AllowGet);                     }                     catch                     {                         Response.TrySkipIisCustomErrors = true;                         Response.StatusCode = (int)HttpStatusCode.NotAcceptable;                         return Json(new { Message =                         &quot;Could not delete Node &quot; + id }, JsonRequestBehavior.AllowGet);                     }             }             return Json(new { Error = true,             Message = &quot;Unknown HTTP verb&quot; }, JsonRequestBehavior.AllowGet);         }     } } <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u00abGET\/POST\/PUT\/DELETE\u00bb \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0435\u0434\u0438\u043d\u043e\u043c URL <code>&quot;\/Tree\/Data\/&quot;<\/code>, \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f <code>RestHttpVerbFilter<\/code>.  <\/p>\n<ul>\n<li>POST \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0443\u0437\u0435\u043b<\/li>\n<li>PUT \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u0442 \u0443\u0437\u0435\u043b<\/li>\n<li>GET \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u0443\u0437\u043b\u0435 \u0438 \u0435\u0433\u043e \u043f\u043e\u0442\u043e\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f. \u042d\u0442\u043e \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438<\/li>\n<li>DELETE \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0443\u0437\u0435\u043b<\/li>\n<\/ul>\n<h6>HomeController<\/h6>\n<p>  \u042f \u0438\u0437\u043c\u0435\u043d\u0438\u043b <code>HomeController<\/code> \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0440\u043d\u044f \u0434\u0435\u0440\u0435\u0432\u0430. \u041f\u0440\u0438\u0432\u0435\u0434\u0438\u0442\u0435 \u0432\u0430\u0448 <code>HomeController<\/code> \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0443:  <\/p>\n<pre><code class=\"cs\">using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using DojoTree.Models;  namespace DojoTree.Controllers {     public class HomeController : Controller     {         public ActionResult Index()         {             ViewBag.Message = &quot;Tree supporting CRUD operations Using Dojo Tree,             Entity Framework, Asp .Net MVC&quot;;             return View();         }          public ActionResult generateRoot()         {             try             {                 TreeModelContainer db = new TreeModelContainer();                 Node node = new Node();                  node= db.Nodes.Find(1);                 if (node == null)                 {                     \/\/If you deleted Root manually, this couldn't make Root again                     \/\/because Root Id must be &quot;1&quot;, so you must drop the                      \/\/Tree table and rebuild it                     \/\/or change the Root Id in &quot;tree.js&quot;                      Node rootNode = new Node();                     rootNode.NodeName = &quot;Root&quot;;                     rootNode.ParentId = 0;                     db.Nodes.Add(rootNode);                      db.SaveChanges();                     ViewBag.Message = &quot;Some Nodes have been generated&quot;;                 }                 else { ViewBag.Message = &quot;Root Exists.&quot;; }             }             catch { ViewBag.Message = &quot;An Error occurred&quot;; }             return View();         }     } } <\/code><\/pre>\n<h5>\u041d\u0430\u0433\u043b\u044f\u0434\u043d\u0430\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f<\/h5>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0440\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041f\u043e\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u043a\u043e\u0440\u043d\u044f, \u043f\u043e\u0442\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 | \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u0443\u0439\u0442\u0435 | \u043f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0438 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 | \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0443\u0437\u043b\u044b \u0434\u0435\u0440\u0435\u0432\u0430.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/31d\/a53\/5bf\/31da535bf5eeb8583e254075bdeb825e.png\" alt=\"image\"\/><br \/>  \u041a\u0430\u043a \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435 \u0432 fireBug \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 Json REST.<\/p>\n<h5>\u0421\u0441\u044b\u043b\u043a\u0438<\/h5>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c \u0441\u0442\u0430\u0442\u044c\u0438 \u00abTree View with \u201eCRUD operations\u201c, \u201edrag and drop (DnD)\u201c and \u201eLazy Loading\u201c using Dojo Tree, Entity Framework, SQL Server, ASP.NET MVC\u00bb <a href=\"http:\/\/www.codeproject.com\/Articles\/337439\/Tree-View-with-CRUD-operations-drag-and-drop-DnD-a\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a>. \u0422\u0430\u043c \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430.        \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/175571\/\"> http:\/\/habrahabr.ru\/post\/175571\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">       <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/a0d\/0bd\/504\/a0d0bd504fd5763690dfe6b24eeb80ce.png\" alt=\"image\"\/><\/p>\n<h5>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h5>\n<p>  Dojo Toolkit \u044d\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u0430\u044f JavaScript \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u0440\u043e\u0441\u0441-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0445 JavaScript\/Ajax-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u0449\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Dojo Tree \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0435, \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0435, \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0435, \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0432\u0435\u0442\u043e\u043a, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0435\u043c\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445. Dojo Tree \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f\u043c\u0438 \u00ab\u043f\u0440\u0435\u0434\u043e\u043a-\u043f\u043e\u0442\u043e\u043c\u043e\u043a\u00bb.<\/p>\n<p>  \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u0430, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u00abCRUD \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438\u00bb, \u00abdrag and drop (DnD)\u00bb \u0438 \u00ab\u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443\u00bb. \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Dojo Tree, Entity Framework, SQL Server \u0438 Asp .Net MVC.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-175571","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/175571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=175571"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/175571\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=175571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=175571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=175571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}