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


C# SqlDataSourceSelectingEventArgs类代码示例

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


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


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