protected void btnAdicionar_Click(object sender, ImageClickEventArgs e) { ReportFilter filter; // // Create the filter object that will persist // int reportColumnsSchemaId = int.Parse(cboColumns.SelectedValue.Split('|')[0]); int reportDataTypeId = int.Parse(cboColumns.SelectedValue.Split('|')[1]); // // If the filter is string, int or date then add, else read each item in chkFilterList // if ((DataType)reportDataTypeId == DataType.ForeignKey) { foreach (ListItem item in chkFilterList.Items) { if (item.Selected) { filter = new ReportFilter(); filter.ReportTablesSchemaId = Page.Settings.Report.ReportTablesSchemaId.Value; filter.ReportColumnsSchemaId = reportColumnsSchemaId; //filter.ReportDataTypeId = reportDataTypeId; filter.ReportFilterTypeId = Page.ReportManager.RetrieveFilterType("LIST").ReportFilterTypeId; filter.Name = cboColumns.SelectedItem.Text + Resources.Resource.CanBe + " '" + item.Text + "'"; filter.Value = item.Value; Page.Settings.Filters.Add(filter); } } } else { filter = new ReportFilter(); filter.ReportColumnsSchemaId = reportColumnsSchemaId; filter.ReportTablesSchemaId = Page.Settings.Report.ReportTablesSchemaId.Value; //filter.ReportDataTypeId = reportDataTypeId; filter.ReportFilterTypeId = int.Parse(lstFilters.SelectedValue); filter.Value = txtValue.Text; filter.Name = cboColumns.SelectedItem.Text + " " + lstFilters.SelectedItem.Text + " '" + txtValue.Text + "'"; Page.Settings.Filters.Add(filter); } BindSelectedFilters(); ClearControls(); }
public void Insert(DataClasses.ReportFilter filter) { DbContext.ReportFilters.InsertOnSubmit(filter); DbContext.SubmitChanges(); }
private void detach_ReportFilters(ReportFilter entity) { this.SendPropertyChanging(); entity.ReportColumnsSchema = null; }
partial void DeleteReportFilter(ReportFilter instance);
partial void UpdateReportFilter(ReportFilter instance);
partial void InsertReportFilter(ReportFilter instance);
private void attach_ReportFilters(ReportFilter entity) { this.SendPropertyChanging(); entity.Report = this; }