コード例 #1
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            if (gridView1.SelectedRowsCount == 0 || gridView1.SelectedRowsCount > 1)
            {
                XtraMessageBox.Show("Düzenlemek istediğiniz satırı tek satır olacak şekilde seçin", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            int[]         selectedRowIndexes = gridView1.GetSelectedRows();
            User          user = gridView1.GetRow(selectedRowIndexes[0]) as User;
            frmUserDetail frm  = new frmUserDetail(user);

            frm.ShowDialog();
        }
コード例 #2
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            frmUserDetail frm = new frmUserDetail(null);

            frm.ShowDialog();
        }