예제 #1
0
        private void btnEdit_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();
            Customer          customer           = gridView1.GetRow(selectedRowIndexes[0]) as Customer;
            frmCustomerDetail frm = new frmCustomerDetail(customer);

            frm.ShowDialog();
        }
예제 #2
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            frmCustomerDetail frm = new frmCustomerDetail(null);

            frm.ShowDialog();
        }