private void REPORT_Register_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) { string cName = ""; int nAccountID = 0; DevExpress.XtraReports.Parameters.Parameter param = (DevExpress.XtraReports.Parameters.Parameter)((DevExpress.XtraReports.UI.XtraReport)sender). Parameters["accountID"]; if (param != null) { //REPORT_Register xafParameter = // (REPORT_Register)param.Value; nAccountID = (int)param.Value; } DataSet xx = new coolBlue.AccountsDataSet(); coolBlue.AccountsDataSet.USP_getAllAccountsDataTable dt = new coolBlue.AccountsDataSet.USP_getAllAccountsDataTable(); coolBlue.AccountsDataSetTableAdapters.USP_getAllAccountsTableAdapter accountsDataSetUSP_getAllAccountsTableAdapter = new coolBlue.AccountsDataSetTableAdapters.USP_getAllAccountsTableAdapter(); accountsDataSetUSP_getAllAccountsTableAdapter.Connection.ConnectionString = ProgramSettings.coolblueconnectionString; accountsDataSetUSP_getAllAccountsTableAdapter.Fill(dt); // DataRow[] foundRowC = xx.Tables[USP_getAllAccountsforAccounts].Select("ID = " + nAccountID.ToString()); DataRow[] foundRowC = dt.Select("ID = " + nAccountID.ToString()); if (foundRowC.Count() > 0) { cName = (string)foundRowC[0]["cName"]; xrLabelAccountName.Text = cName; } }
private void ThemedWindow_Loaded(object sender, RoutedEventArgs e) { coolBlue.AccountsDataSet accountsDataSet = ((coolBlue.AccountsDataSet)(this.FindResource("accountsDataSet"))); // TODO: Add code here to load data into the table USP_getAllAccountTypes. // This code could not be generated, because the accountsDataSetUSP_getAllAccountTypesTableAdapter.Fill method is missing, or has unrecognized parameters. coolBlue.AccountsDataSetTableAdapters.USP_getAllAccountTypesTableAdapter accountsDataSetUSP_getAllAccountTypesTableAdapter = new coolBlue.AccountsDataSetTableAdapters.USP_getAllAccountTypesTableAdapter(); System.Windows.Data.CollectionViewSource uSP_getAllAccountTypesViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("uSP_getAllAccountTypesViewSource"))); uSP_getAllAccountTypesViewSource.View.MoveCurrentToFirst(); // TODO: Add code here to load data into the table USP_getAllAccounts. // This code could not be generated, because the accountsDataSetUSP_getAllAccountsTableAdapter.Fill method is missing, or has unrecognized parameters. coolBlue.AccountsDataSetTableAdapters.USP_getAllAccountsTableAdapter accountsDataSetUSP_getAllAccountsTableAdapter = new coolBlue.AccountsDataSetTableAdapters.USP_getAllAccountsTableAdapter(); System.Windows.Data.CollectionViewSource uSP_getAllAccountTypesUSP_getAllAccountsViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("uSP_getAllAccountTypesUSP_getAllAccountsViewSource"))); uSP_getAllAccountTypesUSP_getAllAccountsViewSource.View.MoveCurrentToFirst(); }