private void btBaoLoi_Click(object sender, EventArgs e) { try { BaoLoi bl = new BaoLoi(); bl.ID = ID; bl.SoLoi = Int32.Parse(numericUpDown1.Value.ToString()); bl.MoTa = tbLoi.Text; bl.Deadline = dateDeadline.DateTime; StatusRespon s = Retrofit.instance.BaoLoi(bl); MessageBox.Show(s.Message); } catch (Exception ex) { lg.Error(ex); } }
//Báo lỗi public StatusRespon BaoLoi(BaoLoi baoLoi) { string json = Networking.getInstance().PostV2(BASE_URL + "api/work/baoloi", baoLoi); return(JsonConvert.DeserializeObject <StatusRespon>(json)); }