Пример #1
0
        private void AddBT_Click(object sender, EventArgs e)
        {
            switch (comboBox1.SelectedIndex)
            {
            case 0:
            {
                MuonTraForm Form = new MuonTraForm();
                Form.Show();
            }
            break;

            case 1:
            {
                DocGiaForm Form = new DocGiaForm();
                Form.Show();
            }
            break;

            case 2:
            {
                SachForm Form = new SachForm();
                Form.Show();
            }
            break;

            case 3:
            {
                NhanVienForm Form = new NhanVienForm();
                Form.Show();
            }
            break;
            }
        }
Пример #2
0
        private void dataGridView1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            int ID = 0;

            switch (trigger)
            {
            case 1:
            {
                MuonTraForm Form = new MuonTraForm();
                Form.Show();
                ID = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells["ID"]);
                ST.Invoke(ID, true);
            } break;

            case 2:
            {
                DocGiaForm Form = new DocGiaForm();
                Form.Show();
                ID = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells["ID"]);
                ST.Invoke(ID, true);
            }
            break;

            case 3:
            {
                SachForm Form = new SachForm();
                Form.Show();
                ID = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells["ID"].Value);
                ST.Invoke(ID, true);
            }
            break;

            case 4:
            {
                NhanVienForm Form = new NhanVienForm();
                Form.Show();
                ID = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells["ID"]);
                ST.Invoke(ID, true);
            }
            break;

            default:
                break;
            }
        }