Exemplo n.º 1
0
 private void xlueSheet_EditValueChanged(object sender, EventArgs e)
 {
     try
     {
         SplashScreenManager.ShowDefaultWaitForm();
         if (xlueSheet.ItemIndex >= 0)
         {
             FormatterHelper.LoadExcel(openFileDialog.FileName, xlueSheet.ItemIndex, ref _listSheetsName,
                                       ref _dtExcelData);
         }
     }
     catch (Exception exception)
     {
         XtraMessageBox.Show(exception.Message + "\r\n" + exception.StackTrace);
     }
     finally
     {
         SplashScreenManager.CloseDefaultWaitForm();
     }
 }
Exemplo n.º 2
0
 private void xbeExcelFile_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     try
     {
         SplashScreenManager.ShowDefaultWaitForm();
         if (openFileDialog.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         xbeExcelFile.Text = openFileDialog.FileName;
         FormatterHelper.LoadExcel(xbeExcelFile.Text, 0, ref _listSheetsName, ref _dtExcelData);
         xlueSheet.Properties.DataSource = _listSheetsName;
     }
     catch (Exception exception)
     {
         XtraMessageBox.Show(exception.Message + "\r\n" + exception.StackTrace);
     }
     finally
     {
         SplashScreenManager.CloseDefaultWaitForm();
     }
 }
Exemplo n.º 3
0
        private void FormatData()
        {
            switch (xlueFormatType.EditValue.ToString())
            {
            case "A":
                xgcResult.DataSource = FormatterHelper.FormatDemand(_dtExcelData);
                break;

            case "B":
                xgcResult.DataSource = FormatterHelper.FormatEntity(_dtExcelData);
                break;

            case "C":
                xgcResult.DataSource = FormatterHelper.GetCaseType(_dtExcelData);
                break;

            case "D":
                xgcResult.DataSource = FormatterHelper.MergeInventorInfo(_dtExcelData);
                break;

            default:
                break;
            }
        }