20220315 代码初始化上传
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
namespace FineUIPro.Web.HSSE.License
|
||||
{
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
public partial class ApplyView : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
private string LicenseApplyId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["LicenseApplyId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["LicenseApplyId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.SimpleForm1.Title = UnitService.GetUnitNameByUnitId(Const.UnitId_CD) + this.Title;
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.LicenseApplyId = Request.Params["LicenseApplyId"];
|
||||
if (!string.IsNullOrEmpty(this.LicenseApplyId))
|
||||
{
|
||||
var getApply = LicensePublicService.GetApplyById(this.LicenseApplyId);
|
||||
if (getApply != null)
|
||||
{
|
||||
this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getApply.ApplyUnitId);
|
||||
this.txtApplyManName.Text = UserService.GetUserNameByUserId(getApply.ApplyManId);
|
||||
if (!string.IsNullOrEmpty(getApply.LicenseTypeId))
|
||||
{
|
||||
this.txtType.Text = LicenseTypeService.GetLicenseTypeById(getApply.LicenseTypeId).LicenseTypeName;
|
||||
}
|
||||
if (getApply.ApplyStartTime.HasValue)
|
||||
{
|
||||
this.txtApplyDate.Text = getApply.ApplyStartTime.Value.ToString("yyyy-MM-dd HH:mm");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 流程列表绑定数据
|
||||
/// <summary>
|
||||
/// 流程列表绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
DataTable getDataTable = new DataTable();
|
||||
if (!string.IsNullOrEmpty(this.LicenseApplyId))
|
||||
{
|
||||
string strSql = @"SELECT FlowOperateId,MenuId,DataId,SortIndex,AuditFlowName,OperaterId,Users.UserName AS OperaterName,OperaterTime,Opinion,IsClosed "
|
||||
+ @" FROM dbo.Sys_FlowOperate LEFT JOIN Sys_User AS Users ON OperaterId = Users.UserId"
|
||||
+ @" WHERE IsClosed = 1 AND DataId=@DataId ORDER BY SortIndex DESC";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@DataId", this.LicenseApplyId));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
getDataTable = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
}
|
||||
|
||||
Grid1.DataSource = getDataTable;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user