コード例 #1
0
ファイル: Form1.cs プロジェクト: norick1701/CoatOfPatient
        public Form1()
        {
            InitializeComponent();

            Access access = new Access();

            comboBox1.DataSource = access.getPatientList_All();
            comboBox1.DisplayMember = "ふりがな";
            comboBox1.ValueMember = "患者NO";
            comboBox1.ImeMode = System.Windows.Forms.ImeMode.Hiragana;
            comboBox1.SelectedIndexChanged += new System.EventHandler(ComboBox_SelectedIndexChanged);
            comboBox1.Text = string.Empty;

            comboBox2.DataSource = access.getPatientList_NumberOnly();
            comboBox2.DisplayMember = "患者NO";
            comboBox2.ValueMember = "患者NO";
            comboBox2.ImeMode = System.Windows.Forms.ImeMode.Disable;
            comboBox2.SelectedIndexChanged += new System.EventHandler(ComboBox_SelectedIndexChanged);
            comboBox2.Text = string.Empty;

            dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;

            dataGridView1.AllowUserToAddRows = false;
            dataGridView1.AllowUserToDeleteRows = false;
            dataGridView1.RowHeadersVisible = false;
            dataGridView1.VirtualMode = true;
        }