本文整理汇总了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;
}
}