// private void AddArticle() { var addWindow = new AddArticle(false, null); if (addWindow.ShowDialog() ?? false) { _model.SelectedResearcher.AddArticle(addWindow.Article); } }
private void Add_Article() { AddArticle AddArticle = new AddArticle() { StartPosition = FormStartPosition.CenterParent }; AddArticle.ShowDialog(this); }
private void toolStripMenuItemAjouter_Click(object sender, EventArgs e) { Console.WriteLine("123"); AddArticle AddArticle = new AddArticle() { StartPosition = FormStartPosition.CenterParent }; AddArticle.ShowDialog(this); LoadListView(); }
/// <summary> /// strip add item click event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AddArticleToolStripMenuItem_Click(object sender, EventArgs e) { AddArticle Add_Article = new AddArticle(); Add_Article.ShowDialog(this); if (Add_Article.DialogResult == DialogResult.OK) { listView_ShowBD_DataBinding(); this.ToolStripStatusLabel.Text = "You have added an article!"; } }
public void Post([FromBody] AddArticle value) { var article = new Article(); article.Header = value.Header; article.Summary = value.Summary; article.Img = value.Img; article.Body = value.Body; article.Link = value.Link; article.Source = value.Source; article.Publishdate = value.Publishdate; articleService.AddArticle(article, value.Tags); }
public AddArticle Get(int id) { var a = articleService.GetArticleWithTagsById(id); var x = new AddArticle() { Header = a.Item1.Header, Body = a.Item1.Body, Img = a.Item1.Img, Link = a.Item1.Link, Source = a.Item1.Source, Summary = a.Item1.Summary, Publishdate = a.Item1.Publishdate, Tags = a.Item2 }; return(x); }
public ActionResult Add(AddArticle model) { if (ModelState.IsValid) { Article newArticle = new Article { CompanyId = AppSettings.CurrentCompany, CreateDate = DateTime.Now, PageId = (int)PagesEnum.About, Text = model.Text, Title = model.Title, Author = brioContext.CurrentUser.ID }; articleRepository.Insert(newArticle); articleRepository.SaveChanges(); return RedirectToAction("About"); } else return View(model); }
private void AddNewArticle() { AddArticle add = new AddArticle(txtAddProductName.Text, txtAddProductDescription.Text, decimal.Parse(txtAddProductPrice.Text), cbAddProductCategory.Text); add.Add_or_edit(); }
private void EditArticle() { var addWindow = new AddArticle(true, _model.SelectedArticle); addWindow.ShowDialog(); }
public async Task <ArticleModel> Post([FromBody] AddArticle model) { return(_mapper.Map <ArticleModel>(await _articleService.CreateArticle(_mapper.Map <ArticleDTO>(model)))); }