本文整理汇总了C#中ObjectDataSourceEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ObjectDataSourceEventArgs类的具体用法?C# ObjectDataSourceEventArgs怎么用?C# ObjectDataSourceEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectDataSourceEventArgs类属于命名空间,在下文中一共展示了ObjectDataSourceEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ObjectDataSource1_ObjectCreating
protected void ObjectDataSource1_ObjectCreating (object sender, ObjectDataSourceEventArgs e)
{
int[] listedPersons = ViewState["persons"] as int[];
ListPersonDataSource ds = new ListPersonDataSource(listedPersons);
ds.selectedOrgId = int.Parse(DropOrganizations.SelectedValue);
e.ObjectInstance = ds;
}
示例2: OnDataSourceObjectCreated
private void OnDataSourceObjectCreated(object sender, ObjectDataSourceEventArgs e)
{
RequestObjectHistoryDataSource dataSource = e.ObjectInstance as RequestObjectHistoryDataSource;
if (dataSource == null)
return;
dataSource.ObjectID = ObjectID.Value;
}
示例3: TheWikiDataSource_ObjectCreating
protected void TheWikiDataSource_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = new WikiResult(TitleTextBox.Text, DescriptionTextBox.Text, string.Empty, AuthorTextBox.Text, string.Empty,
null, string.Empty, string.Empty,
!string.IsNullOrEmpty(DateCreatedTextBox.Text) ? DateTime.Parse(DateCreatedTextBox.Text) : DateTime.MinValue,
!string.IsNullOrEmpty(DateCreatedTextBox.Text) ? DateTime.Parse(DateCreatedTextBox.Text).AddDays(1) : DateTime.MinValue,
!string.IsNullOrEmpty(DateModifiedTextBox.Text) ? DateTime.Parse(DateModifiedTextBox.Text) : DateTime.MinValue,
!string.IsNullOrEmpty(DateModifiedTextBox.Text) ? DateTime.Parse(DateModifiedTextBox.Text).AddDays(1) : DateTime.MinValue,
LastModifiedByTextBox.Text);
}
示例4: CategoryDataSource_ObjectCreating
protected void CategoryDataSource_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
ICategory item = null;
if (CategoryTreeView.SelectedNode != null)
item = ContentManagementService.GetCategory(CategoryTreeView.SelectedNode.DataPath);
if (item != null)
e.ObjectInstance = new CategoriesSource(item.ID);
else
e.ObjectInstance = new CategoriesSource(null);
}
示例5: CreateNotesWhatsModifiedDataSource
/// <summary>
/// Creates the notes whats modified data source.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="System.Web.UI.WebControls.ObjectDataSourceEventArgs"/> instance containing the event data.</param>
protected void CreateNotesWhatsModifiedDataSource(object sender, ObjectDataSourceEventArgs e)
{
if (_ModifiedNotesLastPageIndex)
{
int pageIndex = 0;
int recordCount = WNRequest.GetRecordCount();
int pageSize = grdModifiedNotes.PageSize;
decimal numberOfPages = recordCount / pageSize;
pageIndex = Convert.ToInt32(Math.Ceiling(numberOfPages));
grdModifiedNotes.PageIndex = pageIndex;
}
e.ObjectInstance = WNRequest;
}
示例6: TheDataSource_ObjectCreating
protected void TheDataSource_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
DateTime fechaInicio = DateTime.MinValue;
DateTime fechaFin = DateTime.MinValue;
if (!string.IsNullOrEmpty(FechaInicioTextBox.Text))
fechaInicio = DateTime.Parse(FechaInicioTextBox.Text);
if (!string.IsNullOrEmpty(FechaFinTextBox.Text))
fechaFin = DateTime.Parse(FechaFinTextBox.Text).AddDays(1);
e.ObjectInstance = new StatisticTraceReport(new DateTime(fechaInicio.Year, fechaInicio.Month, fechaInicio.Day),
new DateTime(fechaFin.Year, fechaFin.Month, fechaFin.Day), string.Empty, string.Empty, null, string.Empty, string.Empty);
}
示例7: SectionDataSource_ObjectCreating
protected void SectionDataSource_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
Guid? sectionId = Guid.Empty;
if (SectionTreeView.SelectedNode != null)
{
ISection item = ContentManagementService.GetSection(SectionTreeView.SelectedNode.DataPath);
if (item != null)
sectionId = item.ID;
}
e.ObjectInstance = new SectionsSource(sectionId);
}
示例8: ResultsDataSource_ObjectCreating
protected void ResultsDataSource_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = new WikiSearchResult(
HttpUtility.UrlDecode(!string.IsNullOrEmpty(Request.QueryString["q"]) ?
Request.QueryString["q"] :
(!string.IsNullOrEmpty(Request.QueryString["key"]) ?
Request.QueryString["key"] : string.Empty)),
HttpUtility.UrlDecode(!string.IsNullOrEmpty(Request.QueryString["cat"]) ?
Request.QueryString["cat"] :
(!string.IsNullOrEmpty(Request.QueryString["key"]) ?
Request.QueryString["key"] : string.Empty)),
HttpUtility.UrlDecode(!string.IsNullOrEmpty(Request.QueryString["key"]) ?
Request.QueryString["key"] :
(!string.IsNullOrEmpty(Request.QueryString["q"]) ?
Request.QueryString["q"] : string.Empty)));
}
示例9: TheUploadedFilesDataSource_ObjectCreating
protected void TheUploadedFilesDataSource_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
Guid? sectionId = null;
if (SectionTreeView.SelectedNode != null)
{
Section item = null;
//ContentManagementService.GetSection(SectionTreeView.SelectedNode.DataPath);
if (item != null)
sectionId = item.ID;
}
e.ObjectInstance = new UploadedFilesCatalogSource(null,
// Avoid to search all files
sectionId.HasValue ? sectionId.Value : Guid.Empty,
null, null, null, null, null, null);
}
示例10: CreateTargetsViewDataSource
/// <summary>
/// Creates the targets view data source.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="System.Web.UI.WebControls.ObjectDataSourceEventArgs"/> instance containing the event data.</param>
protected void CreateTargetsViewDataSource(object sender, ObjectDataSourceEventArgs e)
{
TargetsViewDataSource dataSource = new TargetsViewDataSource();
dataSource.SelectedFilterState = _filterState;
if (!String.IsNullOrEmpty(grdTargets.SortExpression))
dataSource.SortExpression = grdTargets.SortExpression;
dataSource.IsAscending = grdTargets.SortDirection.Equals(SortDirection.Ascending);
if (_setLastPageIndex)
{
int pageIndex = 0;
int recordCount = dataSource.GetDataCount();
int pageSize = grdTargets.PageSize;
decimal numberOfPages = recordCount / pageSize;
pageIndex = Convert.ToInt32(Math.Ceiling(numberOfPages));
grdTargets.PageIndex = pageIndex;
}
e.ObjectInstance = dataSource;
}
示例11: ObjDs1_ObjectCreating
protected void ObjDs1_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
var typename = new ItemsManager<Item, ItemsFilter>(true, true);
e.ObjectInstance = typename;
}
示例12: odsSKUDetails_ObjectCreated
protected void odsSKUDetails_ObjectCreated(object sender, ObjectDataSourceEventArgs e)
{
SalesReimburseBLL bll = (SalesReimburseBLL)e.ObjectInstance;
bll.FormDataSet = this.InnerDS;
}
示例13: ObjDs1_ObjectCreating
protected void ObjDs1_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
var typename = new CouponsManager();
e.ObjectInstance = typename;
}
示例14: odsFormTravelApplyDetails_ObjectCreated
protected void odsFormTravelApplyDetails_ObjectCreated(object sender, ObjectDataSourceEventArgs e)
{
PersonalReimburseBLL bll = (PersonalReimburseBLL)e.ObjectInstance;
bll.FormDataSet = this.InnerDS;
}
示例15: CreateActivitiesWhatsNewDataSource
/// <summary>
/// Creates the activities whats new data source.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="System.Web.UI.WebControls.ObjectDataSourceEventArgs"/> instance containing the event data.</param>
protected void CreateActivitiesWhatsNewDataSource(object sender, ObjectDataSourceEventArgs e)
{
ActivitiesWhatsNewDataSource dataSource = new ActivitiesWhatsNewDataSource();
dataSource.ActivitySearchOptions = SearchOptions;
SearchOptions.ModifiedActivitiesOnly = false;
if (_NewActivitiesLastPageIndex)
{
int pageIndex = 0;
int recordCount = dataSource.GetRecordCount();
int pageSize = grdNewActivities.PageSize;
decimal numberOfPages = recordCount / pageSize;
pageIndex = Convert.ToInt32(Math.Ceiling(numberOfPages));
grdNewActivities.PageIndex = pageIndex;
}
e.ObjectInstance = dataSource;
}