/**
|
* MyQuoteList.aspx.cs
|
*
|
* 功 能: 我的报价页面
|
* 类 名: MyQuoteList
|
*
|
* Ver 变更日期 负责人 变更内容
|
* ───────────────────────────────────
|
* V0.01 2013-4-17 9:23 吴崎均 初版
|
* V0.02 2013-4-18 吴崎均 实现查看、管理个人报价列表
|
*
|
*
|
*
|
*
|
*
|
*
|
*/
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Web.UI;
|
using System.Web.UI.WebControls;
|
using CY.BLL.EC;
|
using CY.Infrastructure.Common;
|
|
namespace CY.WebForm.Pages.business
|
{
|
|
/// <summary>
|
/// 我的报价
|
/// </summary>
|
public partial class MyQuoteList : BasePage
|
{
|
|
private EC_DemandQuoteBLL _eC_DemandQuoteBLL = null;//报价需求逻辑操作对象
|
/// <summary>
|
/// 初始化
|
/// </summary>
|
public MyQuoteList()
|
{
|
_eC_DemandQuoteBLL = new EC_DemandQuoteBLL();
|
}
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
|
try
|
{
|
switch (Request["Target"])
|
{
|
case "BatchDelete":
|
CY.WebForm.cs.WebUtil.DeleteData(_eC_DemandQuoteBLL.DeleteDataByIds, CurrentUser.ShortName);//调用通用删除方法
|
break;
|
default:
|
|
UCPager1.AspNetPager.PageChanged += AspNetPager1_PageChanged;
|
btn_Search.Click += new EventHandler(btn_Search_Click);
|
if (!IsPostBack && !IsCallback)
|
{
|
BingData();
|
}
|
else { }
|
return;
|
}
|
}
|
catch (Exception ex)
|
{
|
PAGEHandleException(ex);
|
Response.Clear();
|
Response.Write("-1");
|
|
}
|
|
|
Response.End();
|
|
|
}
|
/// <summary>
|
/// 查询按钮点击事件
|
/// </summary>
|
/// <param name="sender"></param>
|
/// <param name="e"></param>
|
private void btn_Search_Click(object sender, EventArgs e)
|
{
|
BeginDate = MyConvert.ConvertToDateTime(txtBeginDate.Value);
|
EndDate = MyConvert.ConvertToDateTime(txtEndDate.Value);
|
UCPager1.AspNetPager.CurrentPageIndex = 1;
|
BingData();
|
}
|
/// <summary>
|
/// 分页事件
|
/// </summary>
|
/// <param name="src"></param>
|
/// <param name="e"></param>
|
protected void AspNetPager1_PageChanged(object src, EventArgs e)
|
{
|
BingData();
|
}
|
|
|
|
/// <summary>
|
/// 绑定数据
|
/// </summary>
|
private void BingData()
|
{
|
|
txtBeginDate.Value = BeginDate.HasValue ? BeginDate.Value.ToString(UtilConst.DATEFORMAT) : "";
|
txtEndDate.Value = EndDate.HasValue ? EndDate.Value.ToString(UtilConst.DATEFORMAT) : "";
|
|
|
Infrastructure.Query.Pagination pagination = new Infrastructure.Query.Pagination() { PageSize = UCPager1.AspNetPager.PageSize, PageIndex = UCPager1.AspNetPager.CurrentPageIndex };
|
rptData.DataSource = _eC_DemandQuoteBLL.SelectModelPageByQuoterId(pagination, CurrentUser.MemberId, BeginDate, EndDate);
|
UCPager1.AspNetPager.RecordCount = pagination.RecordCount;
|
rptData.DataBind();
|
}
|
#region 查询参数
|
|
private DateTime? BeginDate
|
{
|
get { object obj = ViewState["BeginDate"]; return null == obj ? null : MyConvert.ConvertToDateTime(obj); }
|
set { ViewState["BeginDate"] = value; }
|
}
|
private DateTime? EndDate
|
{
|
get { object obj = ViewState["EndDate"]; return null == obj ? null : MyConvert.ConvertToDateTime(obj); }
|
set { ViewState["EndDate"] = value; }
|
}
|
|
#endregion
|
}
|
}
|