private void load_excel_2_grid(C1.Win.C1FlexGrid.C1FlexGrid m_fg)
        {
            var m_obj_dialog = new System.Windows.Forms.OpenFileDialog();
            DialogResult v_result = new DialogResult();
            v_result = m_obj_dialog.ShowDialog();

            if(v_result == DialogResult.Cancel) {
                BaseMessages.MsgBox_Infor("Bạn chưa chọn file Excel!");
                m_obj_dialog.Dispose();
                return;
            }
            Workbook wb = null;
            wb = Workbook.getWorkbook(m_obj_dialog.FileName);
            Sheet sheet = wb.getSheet(0);
            //Cái này để thêm hàng vào grid
            int v_count_row = 7;
            while(sheet.getCell(2, v_count_row).Contents != "") {
                v_count_row = v_count_row + 1;
                m_fg.Rows.Add();
            }
            wb.close();

            Hashtable v_hst_excel_col = get_mapping_col_excel_grid();
            CExcelReport v_obj_excel_rpt = new CExcelReport(m_obj_dialog.FileName);
            int v_i_start_excel_row = 7;

            for(int v_i_cur_col = m_fg.Cols.Fixed; v_i_cur_col < m_fg.Cols.Count; v_i_cur_col++) {
                m_lbl_loading.Visible = true;
                progressBar1.Visible = true;
                progressBar1.Minimum = m_fg.Cols.Fixed;
                progressBar1.Maximum = m_fg.Cols.Count;
                progressBar1.Value = v_i_cur_col;
                v_obj_excel_rpt.Export2Grid(m_fg,
                    v_i_start_excel_row
                    , (int)v_hst_excel_col[v_i_cur_col]
                    , v_i_cur_col);
            }
            m_lbl_tong_so_bill.Text = CIPConvert.ToStr(count_record_in_grid(m_fg));
            make_stt(m_fg);
            m_lbl_loading.Visible = false;
            progressBar1.Visible = false;
            m_fg.Select(0, 0);
        }
        private void load_excel_2_grid_excel(string ip_str_file_name)
        {
            IP.Core.IPExcelReport.CExcelReport v_obj_excel_report
               = new IP.Core.IPExcelReport.CExcelReport(ip_str_file_name);
            int v_int_row_count = v_obj_excel_report.GetCountRow();
            m_fg_oto.Rows.Count = v_int_row_count;
            m_fg_oto_excel.Rows.Count = v_int_row_count;

            for (int v_i_grid_col = 1; v_i_grid_col < m_fg_oto_excel.Cols.Count; v_i_grid_col++)
            {
                v_obj_excel_report.Export2Grid(
                m_fg_oto_excel
                , 5
                , v_i_grid_col
                , v_i_grid_col);
            }
            for (int v_i_cur_row = m_fg_oto_excel.Rows.Count - 1; v_i_cur_row > m_fg_oto_excel.Rows.Fixed; v_i_cur_row--)
            {
                if (m_fg_oto_excel[v_i_cur_row, 1] == null)
                {
                    m_fg_oto_excel.Rows.Remove(v_i_cur_row);
                }
                else
                    if (m_fg_oto_excel[v_i_cur_row, 1].ToString().Trim().Length == 0)
                    {
                        m_fg_oto_excel.Rows.Remove(v_i_cur_row);
                    }
            }
        }
        private void load_excel_2_grid_excel()
        {
            IP.Core.IPExcelReport.CExcelReport v_obj_excel_report
               = new IP.Core.IPExcelReport.CExcelReport(m_txt_file_path.Text);
            int v_int_excel_row_cout = v_obj_excel_report.GetCountRow();
            m_fg_nha.Rows.Count = v_int_excel_row_cout;
            m_fg_excel_nha.Rows.Count = v_int_excel_row_cout;

            for (int v_i_grid_col = 1; v_i_grid_col < m_fg_excel_nha.Cols.Count; v_i_grid_col++)
            {
                v_obj_excel_report.Export2Grid(
                m_fg_excel_nha
                , 5
                , v_i_grid_col
                , v_i_grid_col);
            }
            for (int v_i_cur_row = m_fg_excel_nha.Rows.Count - 1; v_i_cur_row > m_fg_excel_nha.Rows.Fixed; v_i_cur_row--)
            {
                if (m_fg_excel_nha[v_i_cur_row, 1] == null)
                {
                    m_fg_excel_nha.Rows.Remove(v_i_cur_row);
                }
                else
                    if (m_fg_excel_nha[v_i_cur_row, 1].ToString().Trim().Length == 0)
                    {
                        m_fg_excel_nha.Rows.Remove(v_i_cur_row);
                    }
            }
        }
        private void load_danh_sach_excel()
        {
            //Chọn đường dẫn tới file excel
            var m_obj_dialog = new System.Windows.Forms.OpenFileDialog();
            m_obj_dialog.ShowDialog();

            //Mở sheet đầu tiên
            Workbook wb = null;
            wb = Workbook.getWorkbook(m_obj_dialog.FileName);
            Sheet sheet = wb.getSheet(0);
            //->Cái này để thêm hàng vào grid, cho tới khi row ở cột barcode rỗng
            int v_count_row = 1;
            while(sheet.getCell(3, v_count_row).Contents != "") {
                v_count_row = v_count_row + 1;
                //m_fg.Rows.Add();
            }
            m_fg.Rows.Count = v_count_row + 1;

            wb.close();//Đóng connection khi sử dụng NExcel

            //Load dữ liệu lên lưới
            CExcelReport v_obj_excel_rpt = new CExcelReport(m_obj_dialog.FileName);
            m_lbl_loading.Visible = true;
            int v_i_start_excel_row = 2;
            int v_i_sheet_col = 1;
            for(int v_i_cur_col = m_fg.Cols.Fixed; v_i_cur_col < m_fg.Cols.Count; v_i_cur_col++) {
                progressBar1.Visible = true;
                progressBar1.Minimum = 1;
                progressBar1.Maximum = m_fg.Cols.Count;
                progressBar1.Value = v_i_cur_col;
                v_obj_excel_rpt.Export2Grid(m_fg,
                    v_i_start_excel_row
                    , v_i_sheet_col
                    , v_i_cur_col);
                v_i_sheet_col = v_i_sheet_col + 1;
            }
            //m_fg.Rows[m_fg.Rows.Count - 1].Clear(C1.Win.C1FlexGrid.ClearFlags.All);
            m_lbl_loading.Visible = false;
            progressBar1.Visible = false;
            m_fg.Select(0,0);
        }