Exemplo n.º 1
0
        public Update_Result()
        {
            InitializeComponent();
            server.Service1      myservice = new server.Service1();
            BindingSource        source    = new BindingSource();
            List <server.Result> s         = myservice.get_result().ToList();

            source.DataSource        = s;
            dataGridView1.DataSource = source;
        }
Exemplo n.º 2
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     server.Service1 myservice = new server.Service1();
     if (e.ColumnIndex == 0)
     {
         myservice.update_result(myservice.get_result()[e.RowIndex]);
         DataGridViewTextBoxCell sc = new DataGridViewTextBoxCell();
         sc.Value = "Updated";
         dataGridView1.Rows[e.RowIndex].Cells[0] = sc;
         MessageBox.Show("result updated");
     }
 }