Ejemplo n.º 1
0
        private void load_data_2_combobox_loai_don_vi()
        {
            DS_V_DM_DON_VI v_ds_v = new DS_V_DM_DON_VI();
            US_V_DM_DON_VI v_us_v = new US_V_DM_DON_VI();

            v_us_v.FillDataset(v_ds_v);
            //m_cbo_loai_don_vi.ValueMember = V_DM_DON_VI.ID_LOAI_DON_VI;
            //m_cbo_loai_don_vi.DisplayMember = V_DM_DON_VI.TEN_LOAI_DON_VI;
            m_cbo_loai_don_vi.DataSource = v_ds_v.V_DM_DON_VI;
            if (v_ds_v.V_DM_DON_VI.Rows.Count > 0)
            {
                m_cbo_loai_don_vi.SelectedIndex = 0;
            }
        }
Ejemplo n.º 2
0
        private void load_custom_source_2_m_txt_don_vi()
        {
            m_txt_don_vi.AutoCompleteMode   = AutoCompleteMode.Suggest;
            m_txt_don_vi.AutoCompleteSource = AutoCompleteSource.CustomSource;
            var v_coll = new AutoCompleteStringCollection();

            m_us_don_vi.FillDataset(m_ds_don_vi, "WHERE ID_PHAP_NHAN =" + CAppContext_201.getCurrentIDPhapnhan().ToString());
            var v_rows = m_ds_don_vi.Tables[0].Rows;

            for (var i = 0; i < v_rows.Count - 1; i++)
            {
                //v_coll.Add(v_rows[i][V_GD_QUA_TRINH_LAM_VIEC_2.HO_DEM] + " " + v_rows[i][V_GD_QUA_TRINH_LAM_VIEC_2.TEN]);
                //v_coll.Add(v_rows[i][V_GD_QUA_TRINH_LAM_VIEC_2.TEN] + "");
                v_coll.Add(v_rows[i][V_DM_DON_VI.MA_DON_VI] + "");
                //v_coll.Add(v_rows[i][V_GD_QUA_TRINH_LAM_VIEC_2.MA_NV] + "");
                //v_coll.Add(v_rows[i][V_GD_QUA_TRINH_LAM_VIEC_2.MA_DON_VI] + " - " + v_rows[i][V_GD_QUA_TRINH_LAM_VIEC_2.TEN_DON_VI]);
                //v_coll.Add(v_rows[i][V_GD_QUA_TRINH_LAM_VIEC_2.TEN_DON_VI]+" - "+v_rows[i][V_GD_QUA_TRINH_LAM_VIEC_2.MA_DON_VI]);
                //v_coll.Add(v_rows[i][V_GD_QUA_TRINH_LAM_VIEC_2.TEN_CV] + "");
                //v_coll.Add(v_rows[i][V_GD_QUA_TRINH_LAM_VIEC_2.LOAI_DON_VI] + "");
            }

            m_txt_don_vi.AutoCompleteCustomSource = v_coll;
        }