コード例 #1
0
        private void ProductsForm_Load(object sender, EventArgs e)
        {
            combUnit.DataSource    = uOrm.Select();
            combUnit.ValueMember   = "id";
            combUnit.DisplayMember = "Name";

            combCategory.DataSource    = ctgOrm.Select();
            combCategory.ValueMember   = "Id";
            combCategory.DisplayMember = "Name";

            dataGridView1.DataSource = pOrm.Select();
        }
コード例 #2
0
        private void SaleForm_Load(object sender, EventArgs e)
        {
            CustomerORM csOrm = new CustomerORM();

            cmbCustomer.DataSource    = csOrm.Select();
            cmbCustomer.DisplayMember = "Name";
            cmbCustomer.ValueMember   = "id";

            RoomsORM rOrm = new RoomsORM();

            cmbRoom.DataSource    = rOrm.Select();
            cmbRoom.DisplayMember = "Name";
            cmbRoom.ValueMember   = "id";

            ProductORM pOrm = new ProductORM();

            dataGridView1.DataSource = pOrm.Select();
        }