public US_DM_LOAI_TAI_SAN(decimal i_dbID)
 {
     pm_objDS = new DS_DM_LOAI_TAI_SAN();
     pm_strTableName = c_TableName;
     IMakeSelectCmd v_objMkCmd = new CMakeAndSelectCmd(pm_objDS, c_TableName);
     v_objMkCmd.AddCondition("ID", i_dbID, eKieuDuLieu.KieuNumber, eKieuSoSanh.Bang);
     SqlCommand v_cmdSQL;
     v_cmdSQL = v_objMkCmd.getSelectCmd();
     this.FillDatasetByCommand(pm_objDS, v_cmdSQL);
     pm_objDR = getRowClone(pm_objDS.Tables[pm_strTableName].Rows[0]);
 }
    private void load_2_cbo_loaits()
    {
        try
        {
            DS_DM_LOAI_TAI_SAN v_ds_dm_loaits = new DS_DM_LOAI_TAI_SAN();
            US_DM_LOAI_TAI_SAN v_us_dm_loaits = new US_DM_LOAI_TAI_SAN();
            // DataRow v_dr_all = m_ds_cm_dm_tu_dien.CM_DM_TU_DIEN.NewCM_DM_TU_DIENRow();
            // Đổ dữ liệu vào DS
            v_us_dm_loaits.FillDataset(v_ds_dm_loaits, "where ID_LOAI_TAI_SAN_PARENT = 3"); // Đây là lấy theo điều kiện
            m_ddl_loai_xe.DataSource = v_ds_dm_loaits.DM_LOAI_TAI_SAN;
            m_ddl_loai_xe.DataTextField = "TEN_LOAI_TAI_SAN";
            m_ddl_loai_xe.DataValueField = "ID";
            m_ddl_loai_xe.DataBind();
        }

        catch (Exception v_e)
        {
            throw v_e;
        }
    }
    // Load dữ liệu vào list loại tài sản
    private void load_data_loai_tai_san()
    {
        US_DM_LOAI_TAI_SAN v_us_dm_loai_ts = new US_DM_LOAI_TAI_SAN();
        DS_DM_LOAI_TAI_SAN v_ds_dm_loai_ts = new DS_DM_LOAI_TAI_SAN();

        v_us_dm_loai_ts.FillDataset(v_ds_dm_loai_ts, " ORDER BY ID_PHAN_LOAI, ID" );

        m_lst_loai_tai_san.DataSource = v_ds_dm_loai_ts.DM_LOAI_TAI_SAN;
        m_lst_loai_tai_san.DataTextField = DM_LOAI_TAI_SAN.TEN_LOAI_TAI_SAN ;
        m_lst_loai_tai_san.DataValueField = DM_LOAI_TAI_SAN.ID;
        m_lst_loai_tai_san.DataBind();
    }
 private void load_data_to_cbo_loai_xe(WinFormControls.eTAT_CA ip_e_tat_ca)
 {
     US_DM_LOAI_TAI_SAN v_us_dm_loai_tai_san = new US_DM_LOAI_TAI_SAN();
     DS_DM_LOAI_TAI_SAN v_ds_dm_loai_tai_san = new DS_DM_LOAI_TAI_SAN();
     v_us_dm_loai_tai_san.FillDataset(v_ds_dm_loai_tai_san, "where id_loai_tai_san_parent = 3");
     m_cbo_loai_xe.DataSource = v_ds_dm_loai_tai_san.DM_LOAI_TAI_SAN;
     m_cbo_loai_xe.DataValueField = DM_LOAI_TAI_SAN.ID;
     m_cbo_loai_xe.DataTextField = DM_LOAI_TAI_SAN.TEN_LOAI_TAI_SAN;
     m_cbo_loai_xe.DataBind();
     if (ip_e_tat_ca == WinFormControls.eTAT_CA.YES)
     {
         m_cbo_loai_xe.Items.Insert(0, new ListItem(CONST_QLDB.TAT_CA, CONST_QLDB.ID_TAT_CA.ToString()));
     }
 }
 private void load_cbo_loai_xe()
 {
     try
     {
         DS_DM_LOAI_TAI_SAN v_ds_dm_loaits = new DS_DM_LOAI_TAI_SAN();
         US_DM_LOAI_TAI_SAN v_us_dm_loaits = new US_DM_LOAI_TAI_SAN();
         // DataRow v_dr_all = m_ds_cm_dm_tu_dien.CM_DM_TU_DIEN.NewCM_DM_TU_DIENRow();
         // Đổ dữ liệu vào DS
         v_us_dm_loaits.FillDataset(v_ds_dm_loaits, "where " + DM_LOAI_TAI_SAN.ID_LOAI_TAI_SAN_PARENT + " = " + ID_LOAI_TAI_SAN.OTO); // Đây là lấy theo điều kiện
         m_cbo_loai_o_to_up.DataSource = v_ds_dm_loaits.DM_LOAI_TAI_SAN;
         m_cbo_loai_o_to_up.DataTextField = "TEN_LOAI_TAI_SAN";
         m_cbo_loai_o_to_up.DataValueField = "ID";
         m_cbo_loai_o_to_up.DataBind();
     }
     catch (Exception v_e)
     {
         CSystemLog_301.ExceptionHandle(this, v_e);
     }
 }
 private void load_data_to_cbo_loai_tai_san()
 {
     US_DM_LOAI_TAI_SAN v_us_dm_loai_tai_san = new US_DM_LOAI_TAI_SAN();
     DS_DM_LOAI_TAI_SAN v_ds_dm_loai_tai_san = new DS_DM_LOAI_TAI_SAN();
     v_us_dm_loai_tai_san.FillDataset(v_ds_dm_loai_tai_san, "WHERE ID_LOAI_TAI_SAN_PARENT =" + ID_LOAI_TAI_SAN.TAI_SAN_KHAC + "OR ID=" + ID_LOAI_TAI_SAN.TAI_SAN_KHAC);
     m_cbo_loai_tai_san.DataSource = v_ds_dm_loai_tai_san.DM_LOAI_TAI_SAN;
     m_cbo_loai_tai_san.DataTextField = DM_LOAI_TAI_SAN.TEN_LOAI_TAI_SAN;
     m_cbo_loai_tai_san.DataValueField = DM_LOAI_TAI_SAN.ID;
     m_cbo_loai_tai_san.DataBind();
 }
 public US_DM_LOAI_TAI_SAN()
 {
     pm_objDS = new DS_DM_LOAI_TAI_SAN();
     pm_strTableName = c_TableName;
     pm_objDR = pm_objDS.Tables[pm_strTableName].NewRow();
 }