BKI_DichVuMatDat.BaoCao.f409_rpt_bang_luong_nv_v2.load_data_excel_to_grid C# (CSharp) Method

load_data_excel_to_grid() private method

private load_data_excel_to_grid ( string ip_path_excel ) : void
ip_path_excel string
return void
        private void load_data_excel_to_grid(string ip_path_excel)
        {
            if(ip_path_excel == "")
            {
                return;
            }
            try
            {
                var v_dlg_confirm = XtraMessageBox.Show("Bạn có chắc chắn muốn import dữ liệu từ file Excel lương?"
                                                            , "XÁC NHẬN"
                                                            , MessageBoxButtons.YesNo
                                                            , MessageBoxIcon.Question);
                if(v_dlg_confirm == System.Windows.Forms.DialogResult.No)
                {
                    XtraMessageBox.Show("Bạn đã hủy thao tác!", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                SplashScreenManager.ShowForm(typeof(F_wait_form));
                m_grc_main.DataSource = null;
                m_lst_luong_v2 = new BindingList<DTO_BANG_LUONG_V2>();
                DataTable v_dt_src = new DataTable();
                WinFormControls.load_xls_to_data_table(ip_path_excel, ref v_dt_src);
                format_table_source_after_import(v_dt_src);
                load_data_2_list_bang_luong(v_dt_src);
                m_grc_main.Visible = true;
                m_grc_main.DataSource = m_lst_luong_v2;
            }
            catch(Exception)
            {
                throw;
            }
            finally
            {
                SplashScreenManager.CloseForm();
            }
        }