Exemplo n.º 1
0
		private void btnDelete_Click(object sender, EventArgs e)
		{
			BEQuickReports ds = new BEQuickReports();
			BPGeneratedReports bpMain = new BPGeneratedReports();
			BPGeneratedReportTokens bpTokens = new BPGeneratedReportTokens();
			ds = bpMain.SelectByID(GeneratedReportID);
			ds.Merge(bpTokens.SelectByGeneratedReportID(GeneratedReportID));
			ds.Relations.Add("Rel1",ds.tbl_GeneratedReports.Columns["GeneratedReportID"],ds.tbl_GeneratedReportTokens.Columns["GeneratedReportID"]);
			ds.EnforceConstraints = true;
			ds.tbl_GeneratedReports.FindByGeneratedReportID(GeneratedReportID).Delete();
			bpMain.Update(ds);
			bpTokens.Update(ds);
			btnCancel_Click(null,null);
		}
Exemplo n.º 2
0
		private void FillTextBoxes()
		{
			if (GeneratedReportID != 0)
			{
				BPCompanyAliases bpAliases = new BPCompanyAliases();
				Hashtable aliases = bpAliases.SelectColumnMappings(CompanyID);

				BPGeneratedReports bp = new BPGeneratedReports();
				BPGeneratedReportTokens bpGRT = new BPGeneratedReportTokens();
				BEQuickReports ds = new BEQuickReports();
				ds = bp.SelectByID(GeneratedReportID);
				ds.Merge(bpGRT.SelectByGeneratedReportID(GeneratedReportID));
				BEQuickReports.tbl_GeneratedReportsRow report = ds.tbl_GeneratedReports.FindByGeneratedReportID(GeneratedReportID);
				txtReportAlias.Text = report.GeneratedReportName;
				if (ddlVisibility.Items.FindByValue(Convert.ToInt32(report.GeneralReport).ToString()) != null)
				{
					ddlVisibility.SelectedValue = Convert.ToInt32(report.GeneralReport).ToString();
				}
				QuickReportID = report.QuickReportID;
				GeneratedReportType = (QuickReport.GeneratedReportTypes) report.GeneratedReportType;
				gridDataSource.Fill(ds.tbl_GeneratedReportTokens, aliases);
			}
		}