当前位置: 首页>>代码示例>>C#>>正文


C# ObjectDataSourceEventArgs类代码示例

本文整理汇总了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;
 }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:7,代码来源:HandlePaymentStatus.aspx.cs

示例2: OnDataSourceObjectCreated

    private void OnDataSourceObjectCreated(object sender, ObjectDataSourceEventArgs e)
    {
        RequestObjectHistoryDataSource dataSource = e.ObjectInstance as RequestObjectHistoryDataSource;
        if (dataSource == null)
            return;

        dataSource.ObjectID = ObjectID.Value;
    }
开发者ID:Confirmit,项目名称:Portal,代码行数:8,代码来源:ObjectHistoryGrid.ascx.cs

示例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);
 }
开发者ID:kohku,项目名称:codefactory,代码行数:10,代码来源:wikiReport.aspx.cs

示例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);
    }
开发者ID:kohku,项目名称:codefactory,代码行数:12,代码来源:manageCategories.aspx.cs

示例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;
 }
开发者ID:RyanTest,项目名称:SalesLogix_Eval,代码行数:18,代码来源:NotesWhatsNew.ascx.cs

示例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);
    }
开发者ID:kohku,项目名称:codefactory,代码行数:14,代码来源:EstadisticasConsulta.aspx.cs

示例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);
    }
开发者ID:kohku,项目名称:codefactory,代码行数:14,代码来源:manageSections.aspx.cs

示例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)));
 }
开发者ID:kohku,项目名称:codefactory,代码行数:16,代码来源:WikiSearch.aspx.cs

示例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);
    }
开发者ID:kohku,项目名称:codefactory,代码行数:18,代码来源:UploadedFilesCatalog.aspx.cs

示例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;
 }
开发者ID:vishalrajpure,项目名称:SLX_v80_TUV_VFS,代码行数:23,代码来源:UpdateTargets.ascx.cs

示例11: ObjDs1_ObjectCreating

 protected void ObjDs1_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
 {
     var typename = new ItemsManager<Item, ItemsFilter>(true, true);
     e.ObjectInstance = typename;
 }
开发者ID:liqueflies,项目名称:pigeoncms,代码行数:5,代码来源:Default.ascx.cs

示例12: odsSKUDetails_ObjectCreated

 protected void odsSKUDetails_ObjectCreated(object sender, ObjectDataSourceEventArgs e)
 {
     SalesReimburseBLL bll = (SalesReimburseBLL)e.ObjectInstance;
     bll.FormDataSet = this.InnerDS;
 }
开发者ID:hijoy,项目名称:VSL_ERS,代码行数:5,代码来源:ReimburseGoodsApply.aspx.cs

示例13: ObjDs1_ObjectCreating

 protected void ObjDs1_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
 {
     var typename = new CouponsManager();
     e.ObjectInstance = typename;
 }
开发者ID:liqueflies,项目名称:pigeoncms,代码行数:5,代码来源:Default.ascx.cs

示例14: odsFormTravelApplyDetails_ObjectCreated

 protected void odsFormTravelApplyDetails_ObjectCreated(object sender, ObjectDataSourceEventArgs e)
 {
     PersonalReimburseBLL bll = (PersonalReimburseBLL)e.ObjectInstance;
     bll.FormDataSet = this.InnerDS;
 }
开发者ID:hijoy,项目名称:VSL_ERS,代码行数:5,代码来源:TravelApproval.aspx.cs

示例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;
 }
开发者ID:RyanTest,项目名称:SalesLogix_Eval,代码行数:21,代码来源:ActivitiesWhatsNew.ascx.cs


注:本文中的ObjectDataSourceEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。