Exemplo n.º 1
0
        private void btnUpd_Click(object sender, EventArgs e)
        {
            try
            {
                FormUserDetail detail = new FormUserDetail();


                DataTable dataSource = (gridControl1.DataSource as DataTable);
                DataTable dtDel      = dataSource.Clone();
                dtDel.TableName = "bas_user";
                int[] rows = gridView1.GetSelectedRows();

                for (int i = 0; i < rows.Length; i++)
                {
                    dtDel.Rows.Add(dataSource.Rows[rows[i]].ItemArray);
                }

                detail.dtDetail = dtDel;


                if (detail.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    query();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Exemplo n.º 2
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         FormUserDetail detail = new FormUserDetail();
         if (detail.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             query();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }