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


C# ClsBAL.SearchAgentBookedTicketsForAdminUser方法代码示例

本文整理汇总了C#中BAL.ClsBAL.SearchAgentBookedTicketsForAdminUser方法的典型用法代码示例。如果您正苦于以下问题:C# ClsBAL.SearchAgentBookedTicketsForAdminUser方法的具体用法?C# ClsBAL.SearchAgentBookedTicketsForAdminUser怎么用?C# ClsBAL.SearchAgentBookedTicketsForAdminUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BAL.ClsBAL的用法示例。


在下文中一共展示了ClsBAL.SearchAgentBookedTicketsForAdminUser方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnSearch_Click

    protected void btnSearch_Click(object sender, EventArgs e)
    {
        try
        {

            if (ddlPageSize.SelectedIndex != 0)
            { gvBookings.AllowPaging = true; gvBookings.PageSize = Convert.ToInt32(ddlPageSize.SelectedItem.Text.ToString()); }
            else
            { gvBookings.AllowPaging = false; }

            if (Session["UserID"] != null)
            {
                ClsBAL objManabusBAL = new ClsBAL();
                if (txtfromdate.Text == "") { objManabusBAL.dateOFJourney = null; }
                else { objManabusBAL.dateOFJourney = Convert.ToDateTime(txtfromdate.Text); }
                if (txttodate.Text == "") { objManabusBAL.dateOFBooking = null; }
                else { objManabusBAL.dateOFBooking = Convert.ToDateTime(txttodate.Text); }
                if (ddlSources.SelectedItem.Text != "ALL") { objManabusBAL.sourceName = ddlSources.SelectedItem.Text; }
                if (ddlDestinations.SelectedItem.Text != "ALL") { objManabusBAL.destinationName = ddlDestinations.SelectedItem.Text; }
                if (txtName.Text != "") { objManabusBAL.fullName = txtName.Text.Trim(); }
                if (txtEmailID.Text != "") { objManabusBAL.emailId = txtEmailID.Text; }
                if (txtManabusRefNo.Text != "") { objManabusBAL.manabusRefNo = txtManabusRefNo.Text; }
                // if (ddlOperator.SelectedItem.Text != "-Please Select-") { objManabusBAL.travelName = ddlOperator.SelectedItem.Text; }
                if (txtContact.Text != "") { objManabusBAL.mobileNo = txtContact.Text; }
                if (ddlStatus.SelectedItem.Text != "ALL") { objManabusBAL.status = ddlStatus.SelectedItem.Text; }
                if (txtName.Text != "")
                {
                    ListItem value = ddlOperator.Items.FindByText(txtName.Text.ToString());
                    if (value != null)
                    {
                        ddlOperator.SelectedItem.Value = value.Value;
                        AgentId = Convert.ToInt32(ddlOperator.SelectedValue);
                    }
                    else
                    {
                        AgentId = -1;
                    }

                }
                DataSet ObjDataset = (DataSet)objManabusBAL.SearchAgentBookedTicketsForAdminUser(AgentId);
                if (ObjDataset != null)
                {
                    if (ObjDataset.Tables.Count > 0)
                    {
                        if (ObjDataset.Tables[0].Rows.Count > 0)
                        {
                            //ddlPageSize.Enabled = true;
                            //lbtnXport2Xcel.Enabled = true;
                            //ImageButton3.Visible = true;
                        }
                        else
                        {
                            //lbtnXport2Xcel.Enabled = false;
                        }
                        gvBookings.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
                        gvBookings.DataSource = ObjDataset.Tables[0];
                        gvBookings.DataBind();
                        ViewState["Data"] = ObjDataset.Tables[0];
                    }
                    else
                    {
                        gvBookings.DataSource = ObjDataset;
                        gvBookings.DataBind();
                    }
                }
            }
        }
        catch (Exception ex)
        {
            lblMsg.InnerHtml = ex.Message;
            throw;
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:73,代码来源:UserReport.aspx.cs


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