public int DeleteValue(Article article) { Bm2s.Connectivity.Common.Article.Article connect = new Bm2s.Connectivity.Common.Article.Article(); connect.Request.Article = article; connect.Delete(); return connect.Request.Article.Id; }
public HtmlString GetValues() { Bm2s.Connectivity.Common.Article.Article connect = new Bm2s.Connectivity.Common.Article.Article(); if (!UserUtils.CurrentUser.IsAdministrator) { connect.Request.Date = DateTime.Now; } connect.Get(); return connect.Response.Articles.ToHtmlJson(); }
public HtmlString SetValue(Article article, List<Price> prices) { Bm2s.Connectivity.Common.Article.Article connect = new Bm2s.Connectivity.Common.Article.Article(); connect.Request.Article = article; connect.Post(); Bm2s.Connectivity.Common.Article.Price connectPrice = new Bm2s.Connectivity.Common.Article.Price(); foreach (Price price in prices) { price.Article = connect.Response.Articles.FirstOrDefault(); connectPrice.Request.Price = price; connectPrice.Post(); } return connect.Response.Articles.FirstOrDefault().ToHtmlJson(); }