2023-04-28 天辰质量报验移植

This commit is contained in:
2023-04-28 17:46:41 +08:00
parent dbfd7086e1
commit 03c6364f47
171 changed files with 17248 additions and 2071 deletions
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
namespace FineUIPro.Web.Comprehensive
{
@@ -30,13 +30,24 @@ namespace FineUIPro.Web.Comprehensive
/// </summary>
public void BindGrid()
{
string strSql = @"select DataReceivingId, DataReceivingDate, FileCode, FileName, SendUnit, SendMan,
string strSql = @"select DataReceivingId, DataReceivingDate, FileCode, FileName, SendUnit, SendMan, Status,
(CASE WHEN FileType='1' THEN '纸质' ELSE '电子' END)as FileType, CopiesCount, ReceivingMan, FileHandler, (CASE WHEN IsReply='true' THEN '是' ELSE '否' END)as IsReply, ReplyCode, ReplyDate,
Remark, AttachUrl, CompileMan, CompileDate
from Comprehensive_DataReceiving C
where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (!string.IsNullOrEmpty(this.stxtFileCode.Text.Trim()))
{
strSql += " AND C.FileCode LIKE @stxtFileCode";
listStr.Add(new SqlParameter("@stxtFileCode", "%" + stxtFileCode.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.stxtFileName.Text.Trim()))
{
strSql += " AND C.FileName LIKE @stxtFileName";
listStr.Add(new SqlParameter("@stxtFileName", "%" + stxtFileName.Text.Trim() + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@@ -254,23 +265,33 @@ namespace FineUIPro.Web.Comprehensive
}
#endregion
#region
/// 导出按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e)
public static string ConvertState(object Status)
{
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 = Grid1.RecordCount;
this.BindGrid();
Response.Write(GetGridTableHtml2(Grid1));
Response.End();
if (Status != null)
{
if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile)
{
return "重报";
}
else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect)
{
return "驳回";
}
else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile)
{
return "编制";
}
else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit)
{
return "待审批";
}
else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete)
{
return "审批完成";
}
}
return "编制";
}
#endregion
}
}