示例#1
0
        private void butedit_Click(object sender, EventArgs e)
        {
            int kq = 0;

            foreach (DataGridViewRow row in dataGridbook.Rows)
            {
                if (row.Selected)
                {
                    kq = 1;
                    string         code     = row.Cells[0].Value.ToString();
                    Addandeditbook editbook = new Addandeditbook(code);
                    editbook.ShowDialog();
                    break;
                }
            }
            if (kq == 0)
            {
                MessageBox.Show("Please chosing a row of book to edit !", "Attention");
            }
        }
示例#2
0
        private void butadd_Click(object sender, EventArgs e)
        {
            Addandeditbook newbook = new Addandeditbook();

            newbook.ShowDialog();
        }