• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# SqlDataSourceSelectingEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中SqlDataSourceSelectingEventArgs的典型用法代码示例。如果您正苦于以下问题:C# SqlDataSourceSelectingEventArgs类的具体用法?C# SqlDataSourceSelectingEventArgs怎么用?C# SqlDataSourceSelectingEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SqlDataSourceSelectingEventArgs类属于命名空间,在下文中一共展示了SqlDataSourceSelectingEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: sqlcompanySearch

 protected void sqlcompanySearch(object sender, SqlDataSourceSelectingEventArgs e)
 {
     if (String.IsNullOrEmpty(txtCname.Text))
     {
         e.Cancel = true;
     }
 }
开发者ID:CYHuangMike,项目名称:Collections,代码行数:7,代码来源:companyList.aspx.cs


示例2: onItemSelecting

    protected void onItemSelecting(object sender, SqlDataSourceSelectingEventArgs e)
    {
        string asin = Request.QueryString["asin"];

        // Assign asin to select parameter
        e.Command.Parameters["@asin"].Value = asin;
    }
开发者ID:rgreuel,项目名称:amznpricewatcher,代码行数:7,代码来源:ItemDetail.aspx.cs


示例3: DSData_Selecting

    protected void DSData_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
    {
        if (sessionMemberCard.IsAdmin)
        {
            e.Command.CommandText = @"SELECT [MemberId], [MemberName], [closed],
            (SELECT Syndicate FROM CDSyndicate WHERE SyndicateId = TBLAllMember.SyndicateId) AS Syndicate,
            (SELECT SubCommitte FROM CDSubCommitte WHERE SubCommitteId = TBLAllMember.SubCommitteId) AS SubCommitte
             FROM [TBLAllMember]";
        }
        else
        {
            if (sessionMemberCard.usersub == sessionMemberCard.UserSubType.SubType)
            {
                e.Command.CommandText = @"SELECT [MemberId], [MemberName], [closed],
            (SELECT Syndicate FROM CDSyndicate WHERE SyndicateId = TBLAllMember.SyndicateId) AS Syndicate,
            (SELECT SubCommitte FROM CDSubCommitte WHERE SubCommitteId = TBLAllMember.SubCommitteId) AS SubCommitte
             FROM [TBLAllMember] WHERE closed = False AND userin = " + sessionMemberCard.UserID;

            }
            else if(sessionMemberCard.usersub == sessionMemberCard.UserSubType.SubSyn)
            {
                e.Command.CommandText = @"SELECT [MemberId], [MemberName], [closed],
            (SELECT Syndicate FROM CDSyndicate WHERE SyndicateId = TBLAllMember.SyndicateId) AS Syndicate,
            (SELECT SubCommitte FROM CDSubCommitte WHERE SubCommitteId = TBLAllMember.SubCommitteId) AS SubCommitte
             FROM [TBLAllMember] WHERE closed = False AND SyndicateId = " + sessionMemberCard.SyndicateId;
            }

        }
    }
开发者ID:EgyFalseX,项目名称:WebSites,代码行数:29,代码来源:TBLMembersClosedField.ascx.cs


示例4: DSCDSyndicate_Selecting

 protected void DSCDSyndicate_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
 {
     if (TheSessions.IsAdmin)
         e.Command.CommandText = "SELECT [SyndicateId], [Syndicate] FROM [CDSyndicate]";
     else
         e.Command.CommandText = "SELECT [SyndicateId], [Syndicate] FROM [CDSyndicate] WHERE SyndicateId = " + TheSessions.SyndicateId;
 }
开发者ID:EgyFalseX,项目名称:WebSites,代码行数:7,代码来源:OldCompanionEditor.aspx.cs


示例5: dsTasks_Selecting

    protected void dsTasks_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
    {
        string qryCat = Request.QueryString["cid"];
        string qrySubCat = Request.QueryString["scid"];
        string qryServ = Request.QueryString["ser"];
        string qrySec = Request.QueryString["sec"];
        string qryEmp = Request.QueryString["eid"];
        string qrySta = Request.QueryString["sta"];
        string qryRev = Request.QueryString["rev"];
        string qryCom = Request.QueryString["com"];
        string qryRec = Request.QueryString["rec"];
        string qrySort = Request.QueryString["srt"];
        string qryDdline = Request.QueryString["dl"];

        //Before passing all those query string parameters wrap those bad boys in wildcards if they're empty, if not set each control value and border colour

        if (qryCat != null)
        { dropCategory.SelectedValue = qryCat; dropCategory.BorderColor = Color.Black; SelectSubCategory(); }
        else { e.Command.Parameters["@category"].Value = "%" + e.Command.Parameters["@category"].Value + "%"; }

        if (qrySubCat != null)
        { dropSubcategory.SelectedValue = qrySubCat; dropSubcategory.BorderColor = Color.Black; }
        else { e.Command.Parameters["@subcat"].Value = "%" + e.Command.Parameters["@subcat"].Value + "%"; }

        if (qryServ != null)
        { dropService.SelectedValue = qryServ; dropService.BorderColor = Color.Black; }
        else { e.Command.Parameters["@service"].Value = "%" + e.Command.Parameters["@service"].Value + "%"; }

        if (qrySec != null)
        { dropSection.SelectedValue = qrySec; dropSection.BorderColor = Color.Black; SelectEmployee(); }
        else { e.Command.Parameters["@section"].Value = "%" + e.Command.Parameters["@section"].Value + "%"; }

        if (qryEmp != null)
        { dropEmployee.SelectedValue = qryEmp; dropEmployee.BorderColor = Color.Black; }
        else { e.Command.Parameters["@employee"].Value = "%" + e.Command.Parameters["@employee"].Value + "%"; }

        if (qrySta != null)
        { dropStatus.SelectedValue = qrySta; dropStatus.BorderColor = Color.Black; }
        else { e.Command.Parameters["@status"].Value = "%" + e.Command.Parameters["@status"].Value + "%"; }

        if (qryRev != null)
        { dropReview.SelectedValue = qryRev; dropReview.BorderColor = Color.Black; }
        else { e.Command.Parameters["@review"].Value = "%" + e.Command.Parameters["@review"].Value + "%"; }

        if (qryCom == "1")
        { chkCom.Checked = true; chkCom.ForeColor = Color.Maroon; }
        else { e.Command.Parameters["@committee"].Value = "%" + e.Command.Parameters["@committee"].Value + "%"; }

        if (qryRec == "1")
        { chkRec.Checked = true; chkRec.ForeColor = Color.Maroon; }
        else { e.Command.Parameters["@recurring"].Value = "%" + e.Command.Parameters["@recurring"].Value + "%"; }

        if (qryDdline == "1")
        { chkDeadline.Checked = true; chkDeadline.ForeColor = Color.Maroon; }
        else { chkDeadline.Checked = false; }

        if (qrySort != null)
        { dropSort.SelectedValue = qrySort; }
    }
开发者ID:williamrobinson90,项目名称:ImprovementWorkflow,代码行数:59,代码来源:tasks.aspx.cs


示例6: DSData_Selecting

 protected void DSData_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
 {
     //        if (sessionMaintenance.MaintenanceIsAdmin)
     //        {
     //            e.Command.CommandText = @"SELECT Maintenance.MaintenanceId, Maintenance.MaintenanceDate, Maintenance.maddres, Maintenance.mclosed, Users.realname, Maintenance.read_code FROM
     //            (Maintenance LEFT OUTER JOIN Users ON Maintenance.UserID = Users.UserID)";
     //        }
 }
开发者ID:EgyFalseX,项目名称:WebSites,代码行数:8,代码来源:MaintenanceEditorOutbox.aspx.cs


示例7: departmentDataSource_Selecting

 protected void departmentDataSource_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
 {
     DropDownList buDropDownList = (DropDownList)NfteDetailsView.FindControl("buDropDownList");
     DropDownList deptDropDownList = (DropDownList)NfteDetailsView.FindControl("deptDropDownList");
     if (deptDropDownList != null)
     {
         e.Command.Parameters["@bu_id"].Value = buDropDownList.SelectedValue;
     }
 }
开发者ID:kanke,项目名称:Outsourced-Non-FTEs,代码行数:9,代码来源:edit.aspx.cs


示例8: DSData_Selecting

 protected void DSData_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
 {
     //SELECT studentcode FROM download WHERE (id_prog = ?)
     string dbpath = MCDownloadCenter.LoginDatabasePath.Substring(0, MCDownloadCenter.LoginDatabasePath.Length - 4);
     e.Command.CommandText = string.Format(@"SELECT studentcode, downdate,
     (SELECT stu_name FROM {0}.student WHERE stu_code = download.studentcode) AS stu_name,
     (SELECT alsofof_name FROM alsofof WHERE alsofof_code = (SELECT alsofof_code FROM {0}.student_t WHERE stu_code = download.studentcode AND asase_code = (SELECT MAX(asase_code) FROM {0}.student_t))) AS alsofof_name,
     (SELECT faslname FROM fasl WHERE faslcode = (SELECT fasl_code FROM {0}.student_t WHERE stu_code = download.studentcode AND asase_code = (SELECT MAX(asase_code) FROM {0}.student_t))) AS name_al_fasl
     FROM download WHERE (id_prog = {1})", dbpath, Request.QueryString["id"]);
 }
开发者ID:EgyFalseX,项目名称:WebSites,代码行数:10,代码来源:Qry002a.aspx.cs


示例9: DSData_Selecting

 protected void DSData_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
 {
     if (sessionMemberCard.IsAdmin)
     {
         e.Command.CommandText = @"SELECT tblestefa.MemberId, tblestefa.SyndicateId, tblestefa.SubCommitteId,
         tblestefa.MemberName, tblestefa.resoon, tblestefa.datein, CDSyndicate.Syndicate,
         CDSubCommitte.SubCommitte FROM ((tblestefa LEFT OUTER JOIN
         CDSubCommitte ON tblestefa.SubCommitteId = CDSubCommitte.SubCommitteId) LEFT OUTER JOIN
         CDSyndicate ON tblestefa.SyndicateId = CDSyndicate.SyndicateId)";
     }
 }
开发者ID:EgyFalseX,项目名称:WebSites,代码行数:11,代码来源:tblestefaViewer.ascx.cs


示例10: SqlDataSource1_Selecting

 protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
 {
     //使用SqlDataSourceSelectingEventArgs的Command属性获取当前的命令对象。
     //然后使用命令对象的Parameters集合来获取参数值。
     if ((int)e.Command.Parameters[0].Value == 7)
     {
         //如果参数值为7,则停止查询的执行
         e.Cancel = true;
     }
        // e.Command.CommandText = "select * from product";
 }
开发者ID:AJLoveChina,项目名称:workAtQmm,代码行数:11,代码来源:SqlDataSourceDemo.aspx.cs


示例11: DSData_Selecting

 protected void DSData_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
 {
     if (!TheSessions.IsAdmin)
     {
         e.Command.CommandText = @"SELECT [MemberId], [MemberName] FROM [TBLMembers] WHERE ([SyndicateId] = " + TheSessions.SyndicateId + ") order by MemberName";
     }
     else
     {
         e.Command.CommandText = @"SELECT [MemberId], [MemberName] FROM [TBLMembers] WHERE ([SyndicateId] = ?) order by MemberName";
     }
 }
开发者ID:EgyFalseX,项目名称:WebSites,代码行数:11,代码来源:OldCompanionEditor.aspx.cs


示例12: UserProfileDataSource_Selecting

    protected void UserProfileDataSource_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
    {
        // Get a reference to the currently logged on user
        MembershipUser currentUser = Membership.GetUser();

        // Determine the currently logged on user's UserId value
        Guid currentUserId = (Guid)currentUser.ProviderUserKey;

        // Assign the currently logged on user's UserId to the @UserId parameter
        e.Command.Parameters["@UserId"].Value = currentUserId;
    }
开发者ID:cweber-wou,项目名称:capstone,代码行数:11,代码来源:AdditionalUserInfo.aspx.cs


示例13: DSData_Selecting

 protected void DSData_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
 {
     if (sessionRetirementWeb.SubCommitteId != null)
     {
         e.Command.CommandText = string.Format(@"SELECT [rid], [sonid], [sonname], [SyndicateId], [SubCommitteId], [sarfnumber], [remark], [membername] FROM [stopsarf]
     WHERE SyndicateId = {0} AND SubCommitteId = {1}", sessionRetirementWeb.SyndicateId, sessionRetirementWeb.SubCommitteId);
     }
     else
     {
         e.Command.CommandText = string.Format(@"SELECT [rid], [sonid], [sonname], [SyndicateId], [SubCommitteId], [sarfnumber], [remark], [membername] FROM [stopsarf] WHERE SyndicateId = {0}", sessionRetirementWeb.SyndicateId);
     }
 }
开发者ID:EgyFalseX,项目名称:WebSites,代码行数:12,代码来源:stopsarf.ascx.cs


示例14: sourceEmployees_Selecting

	protected void sourceEmployees_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
	{
		if ((string)e.Command.Parameters["@City"].Value == "(Choose a City)")
		{
			// Do nothing.
			e.Cancel = true;
		}
		else if ((string)e.Command.Parameters["@City"].Value == "(All Cities)")
		{
			// Manually change the command.
			e.Command.CommandText = "SELECT * FROM Employees";
		}
	}
开发者ID:Helen1987,项目名称:edu,代码行数:13,代码来源:SqlDataSourceLimits.aspx.cs


示例15: DSData_Selecting

 protected void DSData_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
 {
     if (sessionRetirementWeb.SubCommitteId != null)
     {
         e.Command.CommandText = string.Format(@"SELECT [memberid], [membername], [sarfno], [SyndicateId], [SubCommitteId], [useredit], [dateedit], [delmember], [remm] FROM [tblwarasa]
     WHERE SyndicateId = {0} AND SubCommitteId = {1}", sessionRetirementWeb.SyndicateId, sessionRetirementWeb.SubCommitteId);
     }
     else
     {
         e.Command.CommandText = string.Format(@"SELECT [memberid], [membername], [sarfno], [SyndicateId], [SubCommitteId], [useredit], [dateedit], [delmember], [remm]
     FROM [tblwarasa] WHERE SyndicateId = {0}", sessionRetirementWeb.SyndicateId);
     }
 }
开发者ID:EgyFalseX,项目名称:WebSites,代码行数:13,代码来源:tblwarasa.ascx.cs


示例16: DSData_Selecting

 protected void DSData_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
 {
     if (TheSessions.IsAdmin)
     {
         e.Command.CommandText = @"SELECT TBLMembers.MemberId, TBLMembers.MemberName, TBLMembers.cardr, TBLMembers.dater, CDSyndicate.Syndicate FROM
         (TBLMembers LEFT OUTER JOIN CDSyndicate ON TBLMembers.SyndicateId = CDSyndicate.SyndicateId) ORDER BY TBLMembers.datein";
     }
     else
     {
         e.Command.CommandText = String.Format(@"SELECT TBLMembers.MemberId, TBLMembers.MemberName, TBLMembers.cardr, TBLMembers.dater, CDSyndicate.Syndicate
         FROM (TBLMembers LEFT OUTER JOIN CDSyndicate ON TBLMembers.SyndicateId = CDSyndicate.SyndicateId)
         WHERE TBLMembers.SyndicateId = {0} ORDER BY TBLMembers.datein", TheSessions.SyndicateId);
     }
 }
开发者ID:EgyFalseX,项目名称:WebSites,代码行数:14,代码来源:MemCardEditor.ascx.cs


示例17: DSData_Selecting

 protected void DSData_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
 {
     if (TheSessionsDownloadCenter.IsAdmin)
     {
         e.Command.CommandText = @"SELECT id_prog, code_al_fasl, alsofof_code, id_type_prog, name_prog, date_up, Description, ExternalLink, link FROM center ";
     }
     else
     {
         e.Command.CommandText = string.Format(@"SELECT id_prog, code_al_fasl, alsofof_code, id_type_prog, name_prog, date_up, Description, ExternalLink, link
         FROM center
         WHERE alsofof_code = " + TheSessionsDownloadCenter.alsofof_code);
     }
     DSData.DataBind();
 }
开发者ID:EgyFalseX,项目名称:WebSites,代码行数:14,代码来源:centerViewer.aspx.cs


示例18: DSData_Selecting

 protected void DSData_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
 {
     if (TheSessions.IsAdmin)
     {
         e.Command.CommandText = @"SELECT [CompanionId], [CompanionName], [MemberId], (SELECT MemberName FROM TBLMembers WHERE MemberId = TBLCompanion.MemberId) AS MemberName,
         CompanionImage, (SELECT CompanionType FROM CDCompanionType WHERE CompanionTypeId = TBLCompanion.CompanionTypeId) AS CompanionType, cardr,
         (SELECT Syndicate FROM CDSyndicate WHERE SyndicateId = (SELECT MemberSyndicateId FROM TBLMembers WHERE MemberId = TBLCompanion.MemberId)) AS SyndicateMem,
         (SELECT Syndicate FROM CDSyndicate WHERE SyndicateId = (SELECT SyndicateId FROM TBLMembers WHERE MemberId = TBLCompanion.MemberId)) AS Syndicate
         FROM [TBLCompanion]";
     }
     else
     {
         e.Command.CommandText = @"SELECT [CompanionId], [CompanionName], [MemberId], (SELECT MemberName FROM TBLMembers WHERE MemberId = TBLCompanion.MemberId) AS MemberName,
         CompanionImage, (SELECT CompanionType FROM CDCompanionType WHERE CompanionTypeId = TBLCompanion.CompanionTypeId) AS CompanionType, cardr,
         (SELECT Syndicate FROM CDSyndicate WHERE SyndicateId = (SELECT MemberSyndicateId FROM TBLMembers WHERE MemberId = TBLCompanion.MemberId)) AS SyndicateMem,
         (SELECT Syndicate FROM CDSyndicate WHERE SyndicateId = (SELECT SyndicateId FROM TBLMembers WHERE MemberId = TBLCompanion.MemberId)) AS Syndicate
         FROM [TBLCompanion] WHERE EXISTS (SELECT SyndicateId FROM TBLMembers WHERE userin = ? AND MemberId = TBLMembers.MemberId)";
     }
 }
开发者ID:EgyFalseX,项目名称:WebSites,代码行数:19,代码来源:ViewTBLCompanion.ascx.cs


示例19: SqlDataSource1_Selecting

 protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
 {
     e.Command.Parameters["@SupervisorID"].Value = HttpContext.Current.User.Identity.Name.ToString();
 }
开发者ID:chathamadmin,项目名称:NCDSS-DaySheets,代码行数:4,代码来源:review.aspx.cs


示例20: Program_Selecting

    protected void Program_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
    {

    }
开发者ID:abdojobs,项目名称:paombonghealthcare,代码行数:4,代码来源:mReport.aspx.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SqlDataSourceStatusEventArgs类代码示例发布时间:2022-05-24
下一篇:
C# SqlDataSourceCommandEventArgs类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap