2023-09-06 16:25:07 +08:00
|
|
|
|
using BLL;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
|
|
namespace FineUIPro.Web.DigData
|
|
|
|
|
|
{
|
|
|
|
|
|
public partial class HTGLDataDW : PageBase
|
|
|
|
|
|
{
|
|
|
|
|
|
#region 加载
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 加载页面
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!IsPostBack)
|
|
|
|
|
|
{
|
|
|
|
|
|
Funs.DropDownPageSize(this.ddlPageSize);
|
|
|
|
|
|
ProjectService.InitProjectDropDownList(this.drpProject, false);
|
|
|
|
|
|
Funs.FineUIPleaseSelect(drpProject, "请选择项目");
|
|
|
|
|
|
// 绑定表格
|
|
|
|
|
|
this.BindGrid();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 绑定数据Grid1
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 绑定数据Grid1
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private void BindGrid()
|
|
|
|
|
|
{
|
2025-10-10 14:33:21 +08:00
|
|
|
|
var getData = HTGLDataDWService.getDataDWList(this.drpProject.SelectedValue, this.Grid1);
|
2023-09-06 16:25:07 +08:00
|
|
|
|
Grid1.RecordCount = HTGLDataDWService.count;
|
|
|
|
|
|
Grid1.DataSource = getData;
|
|
|
|
|
|
Grid1.DataBind();
|
2023-09-07 21:54:58 +08:00
|
|
|
|
//this.OutputSummaryData(); ///取合计值
|
2023-09-06 16:25:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 计算合计
|
|
|
|
|
|
/// </summary>
|
2023-09-07 21:54:58 +08:00
|
|
|
|
//private void OutputSummaryData( )
|
|
|
|
|
|
//{
|
|
|
|
|
|
// int aCount1 = 0;
|
|
|
|
|
|
// for (int i = 0; i < Grid1.Rows.Count(); i++)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// aCount1 += Funs.GetNewIntOrZero(Grid1.Rows[i].Values[3].ToString());
|
|
|
|
|
|
// }
|
2025-10-10 14:33:21 +08:00
|
|
|
|
|
2023-09-07 21:54:58 +08:00
|
|
|
|
// JObject summary = new JObject
|
|
|
|
|
|
// {
|
|
|
|
|
|
// { "ProjectName", "合计" },
|
|
|
|
|
|
// { "Count1", aCount1.ToString() },
|
|
|
|
|
|
// };
|
|
|
|
|
|
// Grid1.SummaryData = summary;
|
|
|
|
|
|
//}
|
2023-09-06 16:25:07 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 改变索引事件
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
BindGrid();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 分页下拉选择事件
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
|
|
|
|
|
|
BindGrid();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 排序
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.BindGrid();
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 查询
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void TextBox_TextChanged(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.BindGrid();
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void btSearch_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.BindGrid();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#region 导出按钮
|
|
|
|
|
|
/// 导出按钮
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
|
protected void btnOut_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response.ClearContent();
|
|
|
|
|
|
string filename = Funs.GetNewFileName();
|
|
|
|
|
|
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("合同数据仓库" + filename, System.Text.Encoding.UTF8) + ".xls");
|
|
|
|
|
|
Response.ContentType = "application/excel";
|
|
|
|
|
|
Response.ContentEncoding = Encoding.UTF8;
|
|
|
|
|
|
this.Grid1.PageSize = this.Grid1.RecordCount;
|
|
|
|
|
|
this.BindGrid();
|
|
|
|
|
|
Response.Write(GetGridTableHtml(Grid1));
|
|
|
|
|
|
Response.End();
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|