コード例 #1
0
ファイル: BPQuickReports.cs プロジェクト: alexan1/marketweb
			public BEQuickReports SelectAll()
			{
				BEQuickReports ds = new BEQuickReports();
				DATokens da = new DATokens();
				da.SelectAll(ds.tbl_Tokens);
				return ds;
			}
コード例 #2
0
ファイル: BPQuickReports.cs プロジェクト: alexan1/marketweb
			public BEQuickReports SelectByQuickReportID(int quickReportID)
			{
				BEQuickReports ds = new BEQuickReports();
				DATokens da = new DATokens();

				da.SelectByQuickReportID(quickReportID, ds.tbl_Tokens);
				return ds;
			}
コード例 #3
0
ファイル: BPQuickReports.cs プロジェクト: alexan1/marketweb
			public BEQuickReports SelectByID(int TokenID)
			{
				BEQuickReports ds = new BEQuickReports();
				DATokens da = new DATokens();

				da.SelectByID(TokenID.ToString(), ds.tbl_Tokens);
				return ds;
			}
コード例 #4
0
ファイル: BPQuickReports.cs プロジェクト: alexan1/marketweb
			public BEQuickReports SelectByGeneratedReportID(int generatedReportID)
			{
				BEQuickReports ds = new BEQuickReports();
				DATokens da = new DATokens();

				da.SelectByGeneratedReportID(generatedReportID, ds.tbl_Tokens);
				return ds;
			}
コード例 #5
0
ファイル: BPQuickReports.cs プロジェクト: alexan1/marketweb
			public BEQuickReports SelectByTokenCategoryID(int TokenCategoryID)
			{
				BEQuickReports ds = new BEQuickReports();
				DATokens da = new DATokens();

				da.SelectByTokenCategoryID(TokenCategoryID, ds.tbl_Tokens);
				return ds;
			}
コード例 #6
0
		protected void BindQuickReportsList()
		{
			BPGeneratedReports bp = new BPGeneratedReports();
			DSQuickReports = bp.SelectGeneratedReportsByAdminIDQuickReportIDGeneratedReportTypeAndCompanyID(QuickReportID, GeneratedReportType, GlobalCompanyID, Convert.ToInt32(OryxUser.OryxIdentity.MemberID));
			DSQuickReports.tbl_GeneratedReports.DefaultView.Sort = "GeneratedReportName";
		}
コード例 #7
0
ファイル: BaseBrowse.cs プロジェクト: alexan1/marketweb
		public LinkButtonTemplate(string columnName, int generatedReportID)
		{
			_ColumnName = columnName;

			BPQuickReports bp = new BPQuickReports();
			BEQuickReports DSQuickReports = new BEQuickReports();
			DSQuickReports = bp.SelectByGeneratedReportID(generatedReportID);
			_editPage = ((BEQuickReports.tbl_QuickReportsRow) DSQuickReports.tbl_QuickReports.Rows[0]).EditPage;	
			_primaryKey = ((BEQuickReports.tbl_QuickReportsRow) DSQuickReports.tbl_QuickReports.Rows[0]).TablePrimaryKey;
		}
コード例 #8
0
ファイル: BPQuickReports.cs プロジェクト: alexan1/marketweb
			public BEQuickReports SelectByAdminIDandQuickReportID(int adminID, int quickReportID)
			{
				BEQuickReports ds = new BEQuickReports();
				DAGeneratedReports da = new DAGeneratedReports();

				da.SelectByAdminIDandQuickReportID(adminID, quickReportID, ds.tbl_GeneratedReports);
				return ds;
			}
コード例 #9
0
		public void Remove(BEQuickReports.tbl_TokensRow row)
		{
			Token tkn = GetTokenByTokenID(row.TokenID);
			if (tkn != null)
			{
				this.InnerList.Remove(tkn);
			}
		}
コード例 #10
0
		private bool SaveBaseReport()
		{
			if (txtReportAlias.Text == "")
			{
				lblError2.Visible=true;
				return false;
			}
			else
			{
				lblError2.Visible = false;
				DSQuickReports = new BEQuickReports();
				BEQuickReports.tbl_GeneratedReportsRow reportRow;
				BPGeneratedReports bpReport = new BPGeneratedReports();
				if (GeneratedReportID == 0)
				{
					reportRow = DSQuickReports.tbl_GeneratedReports.Newtbl_GeneratedReportsRow();
					reportRow.DateCreated = DateTime.Now;
					reportRow.CreatedByCompanyUserID = Convert.ToInt32(OryxUser.OryxIdentity.MemberID);
				}
				else
				{
					DSQuickReports = bpReport.SelectAll();
					reportRow = DSQuickReports.tbl_GeneratedReports.FindByGeneratedReportID(GeneratedReportID);
				}
				reportRow.QuickReportID = QuickReportID;
				reportRow.GeneratedReportType = Convert.ToInt32(GeneratedReportType);
				reportRow.GeneratedReportName = txtReportAlias.Text;
				reportRow.GeneralReport = Convert.ToBoolean(Convert.ToInt32(ddlVisibility.SelectedValue));
				reportRow.GeneratedReportActive = true;
				reportRow.DateModified = DateTime.Now;
				reportRow.ModifiedByAdminID = Convert.ToInt32(OryxUser.OryxIdentity.MemberID);
				reportRow.CompanyID = CompanyID;
				if (GeneratedReportID == 0)
				{
					DSQuickReports.tbl_GeneratedReports.Rows.Add(reportRow);
				}
				bpReport.Update(DSQuickReports);
				GeneratedReportID = reportRow.GeneratedReportID;
				return true;
			}
		}
コード例 #11
0
ファイル: BPQuickReports.cs プロジェクト: alexan1/marketweb
			public BEQuickReports SelectByCompanyUserIDandQuickReportIDAndCompanyID(int companyUserID, int QuickReportID, int CompanyID)
			{
				BEQuickReports ds = new BEQuickReports();
				DAGeneratedReports da = new DAGeneratedReports();

				da.SelectByCompanyUserIDAndQuickReportIDAndCompanyID(companyUserID, QuickReportID, CompanyID, ds.tbl_GeneratedReports);
				return ds;
			}
コード例 #12
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);
			}
		}
コード例 #13
0
ファイル: BPQuickReports.cs プロジェクト: alexan1/marketweb
			public void Update(BEQuickReports ds)
			{
				DAGeneratedReportTokens da = new DAGeneratedReportTokens();
				da.Update(ds.tbl_GeneratedReportTokens);
			}
コード例 #14
0
ファイル: BPQuickReports.cs プロジェクト: alexan1/marketweb
			public BEQuickReports SelectGeneratedReportsByQuickReportIDAndGeneratedReportTypeAndCompanyUserID(int QuickReportID, int GeneratedReportType, int companyUserID)
			{
				BEQuickReports ds = new BEQuickReports();
				DAGeneratedReports da = new DAGeneratedReports();

				da.SelectGeneratedReportsByQuickReportIDAndGeneratedReportTypeAndCompanyUserID(QuickReportID, GeneratedReportType, companyUserID, ds.tbl_GeneratedReports);
				return ds;
			}
コード例 #15
0
ファイル: BPQuickReports.cs プロジェクト: alexan1/marketweb
			public BEQuickReports SelectGeneratedReportsByQuickReportIDAndGeneratedReportType(int QuickReportID, int GeneratedReportType)
			{
				BEQuickReports ds = new BEQuickReports();
				DAGeneratedReports da = new DAGeneratedReports();

				da.SelectGeneratedReportsByQuickReportIDAndGeneratedReportType(QuickReportID, GeneratedReportType, ds.tbl_GeneratedReports);
				return ds;
			}
コード例 #16
0
ファイル: BPQuickReports.cs プロジェクト: alexan1/marketweb
			public BEQuickReports SelectGeneratedReportsByQuickReportID(int QuickReportID)
			{
				BEQuickReports ds = new BEQuickReports();
				DAGeneratedReports da = new DAGeneratedReports();

				da.SelectGeneratedReportsByQuickReportID(QuickReportID, ds.tbl_GeneratedReports);
				return ds;
			}
コード例 #17
0
		public Token(BEQuickReports.tbl_TokensRow row, string companyColumnAlias)
		{
			_TokenID = row.TokenID;
			_TokenAlias = row.TokenAlias.Replace('_',' '); //.Replace added, part of bug fix 20090603 - hs;
			_CompanyColumnAlias = companyColumnAlias;
			_DataType = (QuickReport.DataTypes) row.DataTypeID;
			_TokenType = QuickReport.TokenTypes.Regular;
		}
コード例 #18
0
		private void btnCancel_Click(object sender, System.EventArgs e)
		{
			if(GeneratedReportType == QuickReport.GeneratedReportTypes.Report)
			{
				Response.Redirect("BrowseQuickReports.aspx?QuickReportID=" + Convert.ToInt32(QuickReportID));
			}
			else
			{
				BPQuickReports bp = new BPQuickReports();
				DSQuickReports = bp.SelectByID(QuickReportID);
				BEQuickReports.tbl_QuickReportsRow quickReport = DSQuickReports.tbl_QuickReports.FindByQuickReportID(QuickReportID);
				Response.Redirect(quickReport.BrowsePage);
			}
		}
コード例 #19
0
		public Token(BEQuickReports.tbl_GeneratedReportTokensRow row, string companyColumnAlias)
		{
			_TokenID = row.TokenID;
			_TokenAlias = row.TokenAlias.Replace('_',' '); //.Replace added, part of bug fix 20090603 - hs;
			_CompanyColumnAlias = companyColumnAlias;
			_Hidden = (row.TokenType == Convert.ToInt32(QuickReport.TokenTypes.Hidden));
			_TokenOrder = row.TokenOrder;
			switch(row.TokenSort)
			{
				case 0:
				{
					SortBy = false;
					SortDirection = "asc";
					break;
				}
				case 1:
				{
					SortBy = true;
					SortDirection = "asc";
					break;
				}
				case 2:
				{
					SortBy = true;
					SortDirection = "desc";
					break;
				}
			}
			_DataType = (QuickReport.DataTypes) row.DataTypeID;
			_TokenType = (QuickReport.TokenTypes) row.TokenType;
			if (! row.IsTokenFilterNull())
			{
				_Function = row.TokenFilter;
				string Expression = row.TokenFilterExpression.Replace("'","").Replace(" AND ","|");
			
				switch(_DataType)
				{
					case QuickReport.DataTypes.DateTime:
					{
						if (Function == "between")
						{
							DateFrom = Convert.ToDateTime(Expression.Split('|')[0]);
							DateTo = Convert.ToDateTime(Expression.Split('|')[1]);
						}
						else
						{
							SingleDate = Convert.ToDateTime(Expression);
						}
						break;
					}
					case QuickReport.DataTypes.Boolean:
					{
						ActiveValue = Expression;
						break;
					}
					case QuickReport.DataTypes.Integer:
					case QuickReport.DataTypes.String:
					{
						if (Function == "between")
						{
							strFrom = Expression.Split('|')[0];
							strTo = Expression.Split('|')[1];
						}
						else
						{
							SingleText = Expression;
						}
						break;		
					}
				}
			}
		}
コード例 #20
0
		protected void FillAvailableTokens()
		{
			ddlAvailableTokens.Items.Clear();
			if (ddlTokenCategories.SelectedValue != "0")
			{
				BPTokens bpTokens = new BPTokens();
				BEQuickReports dsTokens = new BEQuickReports();
				BPCompanyAliases bpAliases = new BPCompanyAliases();
				Hashtable aliases = bpAliases.SelectColumnMappings(CompanyID);

				dsTokens = bpTokens.SelectByTokenCategoryID(Convert.ToInt32(ddlTokenCategories.SelectedValue));

				ListItem item;
				foreach (BEQuickReports.tbl_TokensRow row in dsTokens.tbl_Tokens)
				{
					item = new ListItem();
					item.Value = row.TokenID.ToString();
					if (!row.LookupAlias)
					{
						item.Text = row.TokenAlias.Replace('_',' ');
						ddlAvailableTokens.Items.Add(item);
					}
					else
					{
						string columnName = row.TokenColumns.Replace("|","");
						if (aliases.Count > 0 && aliases.ContainsKey(columnName) && aliases[columnName].ToString()!="")
						{
							item.Text = aliases[columnName].ToString();	
							ddlAvailableTokens.Items.Add(item);
						}
						else if (! columnName.StartsWith("ExtraColumn"))
						{
							item.Text = row.TokenAlias.Replace('_',' ');
							ddlAvailableTokens.Items.Add(item);
						}
					}
				}
			}
		}
コード例 #21
0
		private void btnGenerate_Click(object sender, EventArgs e)
		{
			if (GeneratedReportID == 0)
			{
				lblError.Visible = true;
			}
			else
			{

				if (GeneratedReportType == QuickReport.GeneratedReportTypes.Browse)
				{
					BPQuickReports bp = new BPQuickReports();
					DSQuickReports = bp.SelectByID(QuickReportID);
					BEQuickReports.tbl_QuickReportsRow quickReport = DSQuickReports.tbl_QuickReports.FindByQuickReportID(QuickReportID);
					Response.Redirect(quickReport.BrowsePage + "?GeneratedReportID=" + GeneratedReportID);
				}
				else
				{
					Response.Redirect("ViewReport.aspx?GeneratedReportID=" + GeneratedReportID + "&CompanyID=" + CompanyID);
				}
			}
		}
コード例 #22
0
ファイル: BPQuickReports.cs プロジェクト: alexan1/marketweb
			public BEQuickReports SelectAll()
			{
				BEQuickReports ds = new BEQuickReports();
				DAGeneratedReports da = new DAGeneratedReports();
				da.SelectAll(ds.tbl_GeneratedReports);
				return ds;
			}
コード例 #23
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);
		}
コード例 #24
0
ファイル: BPQuickReports.cs プロジェクト: alexan1/marketweb
			public void Update(BEQuickReports ds)
			{
				DATokens da = new DATokens();
				da.Update(ds.tbl_Tokens);
			}
コード例 #25
0
		protected void FillSelectedTokens()
		{
			if (GeneratedReportID > 0)
			{
				ddlSelectedTokens.Items.Clear();
				BPTokens bpTokens = new BPTokens();
				BEQuickReports dsTokens = new BEQuickReports();
				BPCompanyAliases bpAliases = new BPCompanyAliases();
				Hashtable aliases = bpAliases.SelectColumnMappings(CompanyID);

				dsTokens = bpTokens.SelectByGeneratedReportID(GeneratedReportID);

				ListItem item;
				foreach (BEQuickReports.tbl_TokensRow row in dsTokens.tbl_Tokens)
				{
					item = new ListItem();
					item.Value = row.TokenID.ToString().Replace('_',' ');
					if (!row.LookupAlias)
					{
						item.Text = row.TokenAlias.Replace('_',' '); //.Replace added, part of bug fix 20090603 - hs
					}
					else
					{
						string columnName = row.TokenColumns.Replace("|","");
						if (aliases.Count > 0 && aliases.ContainsKey(columnName) && aliases[columnName].ToString()!="")
						{
							item.Text = aliases[columnName].ToString();	
						}
						else
						{
							item.Text = row.TokenAlias.Replace('_',' ');
						}
					}
					ddlSelectedTokens.Items.Add(item);
					SelectedTokens.Value += item.Value + ",";
				}
			}
		}
コード例 #26
0
ファイル: ViewReport.aspx.cs プロジェクト: alexan1/marketweb
		private void GetQuickReportID()
		{
			BPQuickReports bp = new BPQuickReports();
			DSGeneratedReports = bp.SelectByGeneratedReportID(GeneratedReportID);
			if (DSGeneratedReports.tbl_QuickReports.Count > 0)
			{
				BEQuickReports.tbl_QuickReportsRow row = DSGeneratedReports.tbl_QuickReports[0];
				QuickReportID = row.QuickReportID;
//				lblTitle.Text = row.GeneratedReportName;
			}
		}
コード例 #27
0
		public void Add(BEQuickReports.tbl_TokensRow row, string companyColumnAlias)
		{
			Token tkn = new Token(row, companyColumnAlias);
			tkn.TokenOrder = this.InnerList.Count + 1;
			this.InnerList.Add(tkn);
			Sort();
		}
コード例 #28
0
ファイル: EditTokens.aspx.cs プロジェクト: alexan1/marketweb
		private void SaveToken_Click(object sender, EventArgs e)
		{
			if (txtResult.Text.Length > 0 && txtTokenAlias.Text.Length >0)
			{
				BPTokens bp = new BPTokens();
				BEQuickReports ds = new BEQuickReports();
				BEQuickReports.tbl_TokensRow row = ds.tbl_Tokens.Newtbl_TokensRow();
				row.TokenAlias = txtTokenAlias.Text;
				row.TokenColumns = txtResult.Text;
				row.TokenCategoryID = Convert.ToInt32(ddlCategories.SelectedValue);
				row.QuickReportID = Convert.ToInt32(ddlTables.SelectedItem.Value);
				ds.tbl_Tokens.Rows.Add(row);
				bp.Update(ds);
			}
			else
			{
				lblError2.Visible = true;
			}
		}
コード例 #29
0
		public void Fill(BEQuickReports.tbl_GeneratedReportTokensDataTable table, Hashtable aliases)
		{
			this.List.Clear();
			string companyColumnAlias = "";

			foreach (BEQuickReports.tbl_GeneratedReportTokensRow row in table)
			{
				if (row.LookupAlias)
				{
					string columnName = row.TokenColumns.Replace("|","");
					if (aliases.Count > 0 && aliases.ContainsKey(columnName) && aliases[columnName].ToString()!="")
					{
						companyColumnAlias = aliases[columnName].ToString();	
					}
					else
					{
						companyColumnAlias = row.TokenAlias.Replace('_',' ');
					}
				}
				else
				{
					companyColumnAlias = "";
				}
				Token tk = new Token(row, companyColumnAlias);
				this.List.Add(tk);
			}
			Sort();
		}
コード例 #30
0
		protected void BindQuickReportsList()
		{
			BPGeneratedReports bp = new BPGeneratedReports();
			DSQuickReports = bp.SelectGeneratedReportsByQuickReportIDAndGeneratedReportTypeAndCompanyUserID(QuickReportTableID, GeneratedReportType,  OryxUser.OryxIdentity.MemberID);
			//filter out all but the the ones this user made.
			DSQuickReports.tbl_GeneratedReports.DefaultView.Sort = "GeneratedReportName";
		}