Beispiel #1
0
        private void grid2us_object(int i_grid_row)
        {
            DataRow v_dr;

            v_dr = (DataRow)m_fg.Rows[i_grid_row].UserData;
            m_us = new US_DM_DON_VI((decimal)v_dr.ItemArray[0]);
        }
Beispiel #2
0
        private void load_data_2_dv_quan_ly()
        {
            US_DM_DON_VI v_us_don_vi = new US_DM_DON_VI();
            DS_DM_DON_VI v_ds_don_vi = new DS_DM_DON_VI();

            v_us_don_vi.load_danh_sach_don_vi(v_ds_don_vi);

            DataRow v_dr = v_ds_don_vi.DM_DON_VI.NewDM_DON_VIRow();

            v_dr[DM_DON_VI.ID]             = 0;
            v_dr[DM_DON_VI.MA_DON_VI]      = "- Chọn một đơn vị -";
            v_ds_don_vi.EnforceConstraints = false;
            v_ds_don_vi.DM_DON_VI.Rows.InsertAt(v_dr, 0);

            m_cbo_dv_don_vi.DataSource    = v_ds_don_vi.DM_DON_VI;
            m_cbo_dv_don_vi.DisplayMember = DM_DON_VI.MA_DON_VI;
            m_cbo_dv_don_vi.ValueMember   = DM_DON_VI.ID;
        }
        private void text_changed()
        {
            US_V_DM_DON_VI v_us = new US_V_DM_DON_VI();
            DS_V_DM_DON_VI v_ds = new DS_V_DM_DON_VI();

            v_us.FillDataset_search_by_ma_dv(v_ds, m_txt_don_vi_moi.Text.Trim(), CAppContext_201.getCurrentIDPhapnhan());
            if (v_ds.V_DM_DON_VI.Count == 0)
            {
                //  BaseMessages.MsgBox_Error("Mã đơn vị không hợp lệ.");
            }
            else
            {
                if (v_ds.V_DM_DON_VI.Count == 1)
                {
                    v_us.DataRow2Me((DataRow)v_ds.V_DM_DON_VI.Rows[0]);
                    m_us_dm_don_vi = new US_DM_DON_VI(v_us.dcID);
                    m_txt_ma_don_vi_cap_tren.Text = v_us.strMA_DON_VI_CAP_TREN;
                }
            }
        }
Beispiel #4
0
 public void select_data(ref US_DM_DON_VI op_us_dm_don_vi)
 {
     m_e_form_mode = DataEntryFormMode.SelectDataState;
     ShowDialog();
     op_us_dm_don_vi = m_us;
 }