Ejemplo n.º 1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     using (View.PersonManageForms.LegalPersonAddEdit f = new View.PersonManageForms.LegalPersonAddEdit())
     {
         if (f.ShowDialog() == DialogResult.OK)
         {
             RefreshData();
             var query = radGridView.Rows.Where(t => t.Cells["ID"] == f.Tag);
             if (query.Count() == 1)
             {
                 query.Single().IsCurrent = true;
             }
         }
     }
 }
Ejemplo n.º 2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (radGridView.SelectedRows.Count != 1)
            {
                return;
            }
            int originalID = int.Parse(radGridView.SelectedRows[0].Cells["ID"].Value.ToString());

            using (View.PersonManageForms.LegalPersonAddEdit f = new View.PersonManageForms.LegalPersonAddEdit(originalID))
            {
                f.ShowDialog();
                RefreshData();
                var query = radGridView.Rows.Where(t => t.Cells["ID"] == f.Tag);
                if (query.Count() == 1)
                {
                    query.Single().IsCurrent = true;
                }
            }
        }