private void InitPageData() { ExcelFilePath.Init(null, null, false, true, UCValueExpression.eBrowserType.File, "xlsx"); xExcelExportQuery.Init(null, mExcelConfig, nameof(ExportToExcelConfig.ExportQueryValue), true); xExportSheetName.Init(null, mExcelConfig, nameof(ExportToExcelConfig.ExcelSheetName), true); xRdoByCustomExport.IsChecked = true; if (mWhereConditionList == null) { mWhereConditionList = new ObservableList <ActDSConditon>(); } xGrdExportCondition.DataSourceList = mWhereConditionList; ExcelFilePath.ValueTextBox.TextChanged += ExcelFilePathTextBox_TextChanged; xExportSheetName.ValueTextBox.TextChanged += ExcelSheetNameTextBox_TextChanged; xExcelExportQuery.ValueTextBox.TextChanged += ExcelExportQuery_ValueTextBox_TextChanged; SetConditionGridView(); }
public DataSourceExportToExcel(ActDSTableElement actDSTableElement) { InitializeComponent(); mActDSTableElement = actDSTableElement; if (mActDSTableElement.ExcelConfig == null) { mActDSTableElement.ExcelConfig = new ExportToExcelConfig(); } SetFilePath(); SetDataTable(); SetSheetName(); ExcelFilePath.Init(Context.GetAsContext(mActDSTableElement.Context), mActDSTableElement.ExcelConfig, nameof(ExportToExcelConfig.ExcelPath), true, true, UCValueExpression.eBrowserType.File, "xlsx"); xExcelExportQuery.Init(Context.GetAsContext(mActDSTableElement.Context), mActDSTableElement.ExcelConfig, nameof(ExportToExcelConfig.ExportQueryValue), true); xExportSheetName.Init(Context.GetAsContext(mActDSTableElement.Context), mActDSTableElement.ExcelConfig, nameof(ExportToExcelConfig.ExcelSheetName), true); BindingHandler.ObjFieldBinding(xRdoByCustomExport, RadioButton.IsCheckedProperty, mActDSTableElement.ExcelConfig, nameof(ExportToExcelConfig.IsCustomExport)); BindingHandler.ObjFieldBinding(xRdoByQueryExport, RadioButton.IsCheckedProperty, mActDSTableElement.ExcelConfig, nameof(ExportToExcelConfig.IsExportByQuery)); BindingHandler.ObjFieldBinding(xExportWhereChkBox, CheckBox.IsCheckedProperty, mActDSTableElement.ExcelConfig, nameof(ExportToExcelConfig.ExportByWhere)); ExcelFilePath.ValueTextBox.TextChanged += ExcelFilePathTextBox_TextChanged; xExportSheetName.ValueTextBox.TextChanged += ExcelSheetNameTextBox_TextChanged; xExcelExportQuery.ValueTextBox.TextChanged += ExcelExportQuery_ValueTextBox_TextChanged; if (mDataTable != null) { InitColumnListGrid(mDataTable.Columns); } SetConditionGridView(); UpdateQueryValue(); }
public DataSourceExportToExcel(string sTableName = "") { InitializeComponent(); ExcelFilePath.Init(null, false, true, UCValueExpression.eBrowserType.File, "xlsx", new RoutedEventHandler(BrowseButton_Click)); if (sTableName == "") { SheetRow.Height = new GridLength(0); this.Height = 30; } else { OutSheetName.Text = sTableName; SheetRow.Height = new GridLength(30); this.Height = 60; } }