150 lines
5.1 KiB
C#
150 lines
5.1 KiB
C#
using BLL;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace FineUIPro.Web.PZHGL.GJSX
|
|
{
|
|
public partial class GJSXInfoCount : PageBase
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
///单位
|
|
UnitService.InitUnitDropDownList(this.DropUnitId, this.CurrUser.LoginProjectId, true);
|
|
//专业
|
|
CNProfessionalService.InitCNProfessional(this.DropCNProfessional_ID, true);
|
|
//编号
|
|
string projectCode = BLL.ProjectService.GetProjectCodeByProjectId(this.CurrUser.LoginProjectId);
|
|
//问题类别
|
|
QuestionTypeService.InitQuestionTypeDropDownList(this.DropQuestionTypeID, true);
|
|
//验收人
|
|
UserService.InitUserDropDownList(DropUser_ReceiveID, CurrUser.LoginProjectId, false, string.Empty);
|
|
//接收人
|
|
UserService.InitUserDropDownList(DropUser_Acceptance, CurrUser.LoginProjectId, false, string.Empty);
|
|
UserService.InitUserDropDownList(DropCreatuser, CurrUser.LoginProjectId, false, string.Empty);
|
|
|
|
BindGrid();
|
|
}
|
|
|
|
}
|
|
|
|
protected void TextBox_TextChanged(object sender, EventArgs e)
|
|
{
|
|
this.BindGrid();
|
|
}
|
|
private void BindGrid()
|
|
{
|
|
|
|
// @UserID nvarchar(50)= null, --提出人
|
|
//@unit nvarchar(50)= null, --责任单位
|
|
//@projectId nvarchar(50) = null, --所属项目
|
|
//@CNProfessional_ID nvarchar(500) = null, --专业
|
|
//@questionType nvarchar(500)= null, --问题类别
|
|
//@processMan nvarchar(50) = null, --接收人
|
|
//@User_Acceptance nvarchar(50) = null--验收人
|
|
|
|
string userid = DropCreatuser.SelectedValue;
|
|
string unit = DropUnitId.SelectedValue;
|
|
string projectid = CurrUser.LoginProjectId;
|
|
string CNProfessional_ID = DropCNProfessional_ID.SelectedValue;
|
|
string questionType = DropQuestionTypeID.SelectedValue;
|
|
string processMan = DropUser_ReceiveID.SelectedValue;
|
|
string User_Acceptance = DropUser_Acceptance.SelectedValue;
|
|
//if (userid is null)
|
|
//{
|
|
// userid = "";
|
|
//}
|
|
if (unit == "null")
|
|
{
|
|
unit = null;
|
|
}
|
|
//if (projectid is null)
|
|
//{
|
|
// projectid = "";
|
|
//}
|
|
if (CNProfessional_ID == "null")
|
|
{
|
|
CNProfessional_ID = null;
|
|
}
|
|
if (questionType == "null")
|
|
{
|
|
questionType = null;
|
|
}
|
|
//if (processMan is null)
|
|
//{
|
|
// processMan = "";
|
|
//}
|
|
//if (User_Acceptance is null)
|
|
//{
|
|
// userid = "";
|
|
//}
|
|
|
|
|
|
Model.GJSX gjsx = BLL.GJSXService.GetGJSXById(ID);
|
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
|
|
|
listStr.Add(new SqlParameter("@UserID", userid));
|
|
listStr.Add(new SqlParameter("@unit", unit));
|
|
listStr.Add(new SqlParameter("@projectid", projectid));
|
|
listStr.Add(new SqlParameter("@CNProfessional_ID", CNProfessional_ID));
|
|
listStr.Add(new SqlParameter("@questionType", questionType));
|
|
listStr.Add(new SqlParameter("@processMan", processMan));
|
|
listStr.Add(new SqlParameter("@User_Acceptance", User_Acceptance));
|
|
|
|
|
|
SqlParameter[] parameter = listStr.ToArray();
|
|
DataTable tb = SQLHelper.GetDataTableRunProc("Sp_GJSXStatistic", parameter);
|
|
|
|
|
|
Grid1.RecordCount = tb.Rows.Count;
|
|
var table = this.GetPagedDataTable(Grid1, tb);
|
|
this.Grid1.DataSource = table;
|
|
this.Grid1.DataBind();
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 分页显示条数下拉框
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
|
BindGrid();
|
|
}
|
|
/// <summary>
|
|
/// 排序
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
|
{
|
|
BindGrid();
|
|
}
|
|
|
|
|
|
/// <param name="e"></param>
|
|
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
|
{
|
|
BindGrid();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Grid行双击事件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
|
{
|
|
// this.EditData();
|
|
}
|
|
}
|
|
} |