private async void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         var thred = new ThreadInsertModel
         {
             Content = txtContent.Text,
             Title   = txtTitle.Text
         };
         await _threadService.Post <dynamic>(thred);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     Close();
 }
Beispiel #2
0
 public AddThreadPage()
 {
     InitializeComponent();
     Thread = new ThreadInsertModel();
 }
Beispiel #3
0
 public IActionResult Insert(ThreadInsertModel thread)
 {
     thread.UserId = User.GetUserId();
     return(Ok(_threadService.Insert(thread)));
 }