Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
        //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));
        }