Exemple #1
0
        private void loadPartDataToComboBox(ComboBox cb)
        {
            DataTable dt = PartDAO.GetAllData();

            cb.DataSource    = dt;
            cb.DisplayMember = "PartName";
            cb.ValueMember   = "PartID";
        }
Exemple #2
0
        private void loadPartDataWithFieldAllToComboBox(ComboBox cb)
        {
            DataTable dt = PartDAO.GetAllData();
            DataRow   dr = dt.NewRow();

            dr["PartName"] = "Tất cả";
            dt.Rows.InsertAt(dr, 0);
            cb.DataSource    = dt;
            cb.DisplayMember = "PartName";
            cb.ValueMember   = "PartID";
        }
Exemple #3
0
        /*
         * Part data
         */

        private void loadPartList()
        {
            dgvPartList.DataSource = PartDAO.GetAllData();
        }