提交定制会内容
This commit is contained in:
@@ -27,8 +27,8 @@
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="90px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<%--<f:DropDownList ID="drpUnitId" runat="server" Label="单位" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" LabelWidth="70px" Width="250px">
|
||||
</f:DropDownList>--%>
|
||||
<f:DropDownList ID="drpUnitId" runat="server" Label="单位" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" LabelWidth="70px" Width="250px">
|
||||
</f:DropDownList>
|
||||
<f:TextBox runat="server" Label="演练名称" ID="txtDrillRecordName" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="90px"
|
||||
LabelAlign="right">
|
||||
|
||||
@@ -40,8 +40,18 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
{
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.UnitId = Const.UnitId_SEDIN;
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("DrillRecordListEdit.aspx") + "return false;";
|
||||
//var thisUnit = CommonService.GetIsThisUnit();
|
||||
//if (thisUnit != null)
|
||||
//{
|
||||
// this.UnitId = thisUnit.UnitId;
|
||||
//}
|
||||
|
||||
BLL.UnitService.InitBranchUnitDropDownList(this.drpUnitId, BLL.Const.UnitId_SEDIN, true);
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("DrillRecordListEdit.aspx") + "return false;";
|
||||
//if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
//{
|
||||
// Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||
//}
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
@@ -52,25 +62,30 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT DrillRecordList.DrillRecordListId,DrillRecordList.ProjectId,DrillRecordType.ConstText AS DrillRecordTypeName,DrillRecordList.JointPersonNum,DrillRecordList.DrillCost,CodeRecords.Code AS DrillRecordCode,DrillRecordList.DrillRecordName,DrillRecordList.DrillRecordDate,DrillRecordList.CompileMan,Users.PersonName AS CompileManName,DrillRecordList.UnitIds,DrillRecordList.UnitNames,DrillRecordList.UserNames,DrillRecordList.States "
|
||||
+ @" ,(CASE WHEN DrillRecordList.States = " + BLL.Const.State_0 + " OR DrillRecordList.States IS NULL THEN '待['+OperateUser.PersonName+']提交' WHEN DrillRecordList.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.PersonName+']办理' END) AS FlowOperateName"
|
||||
string strSql = @"SELECT DrillRecordList.DrillRecordListId,DrillRecordList.ProjectId,DrillRecordType.ConstText AS DrillRecordTypeName,DrillRecordList.JointPersonNum,DrillRecordList.DrillCost,CodeRecords.Code AS DrillRecordCode,DrillRecordList.DrillRecordName,DrillRecordList.DrillRecordDate,DrillRecordList.CompileMan,Users.UserName AS CompileManName,DrillRecordList.UnitIds,DrillRecordList.UnitNames,DrillRecordList.UserNames,DrillRecordList.States "
|
||||
+ @" ,(CASE WHEN DrillRecordList.States = " + BLL.Const.State_0 + " OR DrillRecordList.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN DrillRecordList.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
||||
+ @" FROM Emergency_DrillRecordList_Unit AS DrillRecordList "
|
||||
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON DrillRecordList.DrillRecordListId=CodeRecords.DataId "
|
||||
+ @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON DrillRecordList.DrillRecordListId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1"
|
||||
+ @" LEFT JOIN Sys_Const AS DrillRecordType ON DrillRecordType.ConstValue = DrillRecordList.DrillRecordType and DrillRecordType.GroupId='DrillRecordType'"
|
||||
+ @" LEFT JOIN Person_Persons AS OperateUser ON FlowOperate.OperaterId=OperateUser.PersonId"
|
||||
+ @" LEFT JOIN Person_Persons AS Users ON DrillRecordList.CompileMan=Users.PersonId WHERE 1=1 ";
|
||||
+ @" LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId"
|
||||
+ @" LEFT JOIN Sys_User AS Users ON DrillRecordList.CompileMan=Users.UserId WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND DrillRecordList.UnitIds =@UnitId";
|
||||
//strSql += " AND DrillRecordList.UnitIds =@UnitId";
|
||||
if (!string.IsNullOrEmpty(this.UnitId)) ///是否文件柜查看页面传项目值
|
||||
{
|
||||
listStr.Add(new SqlParameter("@UnitId", this.UnitId));
|
||||
//listStr.Add(new SqlParameter("@UnitId", this.UnitId));
|
||||
strSql += " AND DrillRecordList.States = @States"; ///状态为已完成
|
||||
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
|
||||
}
|
||||
else
|
||||
{
|
||||
listStr.Add(new SqlParameter("@UnitId", this.UnitId));
|
||||
//listStr.Add(new SqlParameter("@UnitId", this.UnitId));
|
||||
}
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND DrillRecordList.UnitIds = @UnitId";
|
||||
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtDrillRecordCode.Text.Trim()))
|
||||
@@ -78,7 +93,7 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
strSql += " AND DrillRecordCode LIKE @DrillRecordCode";
|
||||
listStr.Add(new SqlParameter("@DrillRecordCode", "%" + this.txtDrillRecordCode.Text.Trim() + "%"));
|
||||
}
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtDrillRecordName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND DrillRecordList.DrillRecordName LIKE @DrillRecordName";
|
||||
@@ -208,7 +223,6 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
BLL.UnitDrillRecordListService.DeleteDrillRecordListById(rowID);
|
||||
}
|
||||
}
|
||||
|
||||
this.BindGrid();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
@@ -232,7 +246,7 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 导出方法
|
||||
/// </summary>
|
||||
@@ -299,6 +313,10 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
this.btnMenuDelete.Hidden = false;
|
||||
}
|
||||
}
|
||||
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
//{
|
||||
// btnNew.Hidden = true;
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -68,6 +68,15 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtDrillRecordCode;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitId;
|
||||
|
||||
/// <summary>
|
||||
/// txtDrillRecordName 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -31,9 +31,11 @@
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtUnit" runat="server" Label="参与单位" Required="true" ShowRedStar="true" Readonly="true"
|
||||
<%-- <f:TextBox ID="txtUnit" runat="server" Label="参与单位" Required="true" ShowRedStar="true" Readonly="true"
|
||||
LabelAlign="Right" MaxLength="500" FocusOnPageLoad="true">
|
||||
</f:TextBox>
|
||||
</f:TextBox>--%>
|
||||
<f:DropDownList ID="drpUnit" runat="server" EmptyText="请选择单位" Label="参与单位" ShowRedStar="true" Required="true" AutoSelectFirstItem="true" >
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
@@ -74,9 +76,9 @@
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<%-- <f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" ToolTip="提交" ValidateForms="SimpleForm1"
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" ToolTip="提交" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSubmit_Click">
|
||||
</f:Button>--%>
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
|
||||
@@ -21,17 +21,17 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
ViewState["DrillRecordListId"] = value;
|
||||
}
|
||||
}
|
||||
public string UnitId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["UnitId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["UnitId"] = value;
|
||||
}
|
||||
}
|
||||
//public string UnitId
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return (string)ViewState["UnitId"];
|
||||
// }
|
||||
// set
|
||||
// {
|
||||
// ViewState["UnitId"] = value;
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
@@ -59,7 +59,11 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
{
|
||||
this.drpDrillRecordType.SelectedValue = DrillRecordList.DrillRecordType;
|
||||
}
|
||||
this.txtUnit.Text = DrillRecordList.UnitNames;
|
||||
//this.txtUnit.Text = DrillRecordList.UnitNames;
|
||||
if (!string.IsNullOrEmpty(DrillRecordList.UnitIds))
|
||||
{
|
||||
this.drpUnit.SelectedValue = DrillRecordList.UnitIds;
|
||||
}
|
||||
this.txtDrillRecordDate.Text = string.Format("{0:yyyy-MM-dd}", DrillRecordList.DrillRecordDate);
|
||||
if (DrillRecordList.JointPersonNum != null)
|
||||
{
|
||||
@@ -81,9 +85,11 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
// this.txtDrillRecordContents.Text = HttpUtility.HtmlDecode(codeTemplateRule.Template);
|
||||
//}
|
||||
|
||||
var thisUnit = BLL.CommonService.GetIsThisUnit();
|
||||
////自动生成编码
|
||||
this.txtDrillRecordCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.UnitDrillRecordListMenuId, null, this.UnitId);
|
||||
this.txtDrillRecordCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.UnitDrillRecordListMenuId, null, thisUnit.UnitId);
|
||||
this.txtDrillRecordName.Text = this.SimpleForm1.Title;
|
||||
this.drpUnit.SelectedValue = thisUnit.UnitId;
|
||||
}
|
||||
|
||||
///初始化审核菜单
|
||||
@@ -100,12 +106,13 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
private void InitDropDownList()
|
||||
{
|
||||
//BLL.UnitService.InitUnitDropDownList(this.drpUnits, this.ProjectId, false);
|
||||
var thisUnit = UnitService.GetUnitByUnitId(Const.UnitId_SEDIN);
|
||||
if (thisUnit != null)
|
||||
{
|
||||
this.txtUnit.Text = thisUnit.UnitName;
|
||||
this.UnitId = thisUnit.UnitId;
|
||||
}
|
||||
//var thisUnit = CommonService.GetIsThisUnit();
|
||||
//if (thisUnit != null)
|
||||
//{
|
||||
// this.txtUnit.Text = thisUnit.UnitName;
|
||||
// this.UnitId = thisUnit.UnitId;
|
||||
//}
|
||||
BLL.UnitService.InitBranchUnitDropDownList(this.drpUnit, BLL.Const.UnitId_SEDIN, false);
|
||||
BLL.ConstValue.InitConstValueDropDownList(this.drpDrillRecordType, BLL.ConstValue.Group_DrillRecordType, false);
|
||||
}
|
||||
#endregion
|
||||
@@ -155,8 +162,10 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
DrillCost = Funs.GetNewDecimalOrZero(this.txtDrillCost.Text.Trim())
|
||||
};
|
||||
//参与单位
|
||||
DrillRecordList.UnitIds = this.UnitId;
|
||||
DrillRecordList.UnitNames = this.txtUnit.Text;
|
||||
//DrillRecordList.UnitIds = this.UnitId;
|
||||
//DrillRecordList.UnitNames = this.txtUnit.Text;
|
||||
DrillRecordList.UnitIds = this.drpUnit.SelectedValue;
|
||||
DrillRecordList.UnitNames = this.drpUnit.SelectedText;
|
||||
|
||||
////单据状态
|
||||
DrillRecordList.States = BLL.Const.State_2;
|
||||
|
||||
@@ -69,13 +69,13 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
protected global::FineUIPro.DatePicker txtDrillRecordDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtUnit 控件。
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUnit;
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
/// <summary>
|
||||
/// drpDrillRecordType 控件。
|
||||
@@ -140,6 +140,15 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="90px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<%--<f:DropDownList ID="drpUnitId" runat="server" Label="单位" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" LabelWidth="70px" Width="250px">
|
||||
</f:DropDownList>--%>
|
||||
<f:DropDownList ID="drpUnitId" runat="server" Label="单位" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" LabelWidth="70px" Width="250px">
|
||||
</f:DropDownList>
|
||||
<f:TextBox runat="server" Label="文件名称" ID="txtEmergencyName" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="90px"
|
||||
LabelAlign="right">
|
||||
|
||||
@@ -37,7 +37,13 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.UnitId = Const.UnitId_SEDIN;
|
||||
//var thisUnit = CommonService.GetIsThisUnit();
|
||||
//if (thisUnit != null)
|
||||
//{
|
||||
// this.UnitId = thisUnit.UnitId;
|
||||
//}
|
||||
|
||||
BLL.UnitService.InitBranchUnitDropDownList(this.drpUnitId, BLL.Const.UnitId_SEDIN, true);
|
||||
//BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
|
||||
//if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
//{
|
||||
@@ -45,7 +51,10 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
// this.drpUnitId.Enabled = false;
|
||||
//}
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("EmergencyListEdit.aspx") + "return false;";
|
||||
|
||||
//if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
//{
|
||||
// Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||
//}
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
@@ -56,28 +65,28 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT EmergencyList.EmergencyListId,EmergencyList.ProjectId,CodeRecords.Code AS EmergencyCode,EmergencyList.UnitId,EmergencyList.EmergencyName,EmergencyList.CompileDate,EmergencyList.CompileMan,Users.PersonName AS CompileManName,EmergencyType.EmergencyTypeName,EmergencyList.VersionCode,Unit.UnitName,EmergencyList.States,AuditMan.PersonName AS AuditMan,ApproveMan.PersonName AS ApproveMan "
|
||||
+ @" ,(CASE WHEN EmergencyList.States = " + BLL.Const.State_0 + " OR EmergencyList.States IS NULL THEN '待['+OperateUser.PersonName+']提交' WHEN EmergencyList.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.PersonName+']办理' END) AS FlowOperateName"
|
||||
string strSql = @"SELECT EmergencyList.EmergencyListId,EmergencyList.ProjectId,CodeRecords.Code AS EmergencyCode,EmergencyList.UnitId,EmergencyList.EmergencyName,EmergencyList.CompileDate,EmergencyList.CompileMan,Users.UserName AS CompileManName,EmergencyType.EmergencyTypeName,EmergencyList.VersionCode,Unit.UnitName,EmergencyList.States,AuditMan.UserName AS AuditMan,ApproveMan.UserName AS ApproveMan "
|
||||
+ @" ,(CASE WHEN EmergencyList.States = " + BLL.Const.State_0 + " OR EmergencyList.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN EmergencyList.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
||||
+ @" FROM Emergency_EmergencyList_Unit AS EmergencyList "
|
||||
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON EmergencyList.EmergencyListId=CodeRecords.DataId "
|
||||
+ @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON EmergencyList.EmergencyListId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1"
|
||||
+ @" LEFT JOIN Person_Persons AS OperateUser ON FlowOperate.OperaterId=OperateUser.PersonId"
|
||||
+ @" LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId"
|
||||
+ @" LEFT JOIN Base_Unit AS Unit ON EmergencyList.UnitId=Unit.UnitId "
|
||||
+ @" LEFT JOIN Base_EmergencyType AS EmergencyType ON EmergencyList.EmergencyTypeId=EmergencyType.EmergencyTypeId"
|
||||
+ @" LEFT JOIN Person_Persons AS AuditMan ON AuditMan.PersonId=EmergencyList.AuditMan"
|
||||
+ @" LEFT JOIN Person_Persons AS ApproveMan ON ApproveMan.PersonId=EmergencyList.ApproveMan"
|
||||
+ @" LEFT JOIN Person_Persons AS Users ON EmergencyList.CompileMan=Users.PersonId WHERE 1=1 ";
|
||||
+ @" LEFT JOIN Sys_User AS AuditMan ON AuditMan.UserId=EmergencyList.AuditMan"
|
||||
+ @" LEFT JOIN Sys_User AS ApproveMan ON ApproveMan.UserId=EmergencyList.ApproveMan"
|
||||
+ @" LEFT JOIN Sys_User AS Users ON EmergencyList.CompileMan=Users.UserId WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND EmergencyList.UnitId = @UnitId";
|
||||
//strSql += " AND EmergencyList.UnitId = @UnitId";
|
||||
if (!string.IsNullOrEmpty(this.UnitId)) ///是否文件柜查看页面传项目值
|
||||
{
|
||||
listStr.Add(new SqlParameter("@UnitId", this.UnitId));
|
||||
//listStr.Add(new SqlParameter("@UnitId", this.UnitId));
|
||||
strSql += " AND EmergencyList.States = @States"; ///状态为已完成
|
||||
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
|
||||
}
|
||||
else
|
||||
{
|
||||
listStr.Add(new SqlParameter("@UnitId", this.UnitId));
|
||||
//listStr.Add(new SqlParameter("@UnitId", this.UnitId));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtEmergencyCode.Text.Trim()))
|
||||
@@ -85,11 +94,11 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
strSql += " AND EmergencyCode LIKE @EmergencyCode";
|
||||
listStr.Add(new SqlParameter("@EmergencyCode", "%" + this.txtEmergencyCode.Text.Trim() + "%"));
|
||||
}
|
||||
//if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
//{
|
||||
// strSql += " AND EmergencyList.UnitId = @UnitId";
|
||||
// listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
|
||||
//}
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND EmergencyList.UnitId = @UnitId";
|
||||
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtEmergencyName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND EmergencyList.EmergencyName LIKE @EmergencyName";
|
||||
@@ -252,6 +261,12 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
this.btnMenuDelete.Hidden = false;
|
||||
}
|
||||
}
|
||||
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
//{
|
||||
// btnNew.Hidden = true;
|
||||
// btnMenuEdit.Hidden = true;
|
||||
// btnMenuDelete.Hidden = true;
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -68,6 +68,15 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtEmergencyCode;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitId;
|
||||
|
||||
/// <summary>
|
||||
/// txtEmergencyName 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EmergencyListEdit.aspx.cs"
|
||||
Inherits="FineUIPro.Web.ZHGL.Emergency.EmergencyListEdit" ValidateRequest="false" %>
|
||||
|
||||
<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
@@ -10,53 +11,53 @@
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1"/>
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" Title="应急预案管理清单" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtEmergencyCode" runat="server" Label="编号" LabelAlign="Right"
|
||||
MaxLength="50" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtEmergencyName" runat="server" Label="文件名称" Required="true" ShowRedStar="true"
|
||||
LabelAlign="Right" MaxLength="500" FocusOnPageLoad="true">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpEmergencyType" runat="server" Label="类型" LabelAlign="Right" >
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtVersionCode" runat="server" Label="版本号" LabelAlign="Right" MaxLength="50">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtUnit" runat="server" Label="单位" LabelAlign="Right" MaxLength="50" Readonly="true">
|
||||
</f:TextBox>
|
||||
<%--<f:DropDownList ID="drpUnit" runat="server" Label="单位" LabelAlign="Right" >
|
||||
</f:DropDownList>--%>
|
||||
<f:DropDownList ID="drpCompileMan" runat="server" Label="整理人" LabelAlign="Right" >
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker ID="txtCompileDate" runat="server" Label="整理日期" LabelAlign="Right"
|
||||
EnableEdit="true">
|
||||
</f:DatePicker>
|
||||
<%-- <f:DropDownList ID="drpAuditMan" runat="server" Label="审核人" LabelAlign="Right" >
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" Title="应急预案管理清单" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtEmergencyCode" runat="server" Label="编号" LabelAlign="Right"
|
||||
MaxLength="50" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtEmergencyName" runat="server" Label="文件名称" Required="true" ShowRedStar="true"
|
||||
LabelAlign="Right" MaxLength="500" FocusOnPageLoad="true">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpEmergencyType" runat="server" Label="类型" LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtVersionCode" runat="server" Label="版本号" LabelAlign="Right" MaxLength="50">
|
||||
</f:TextBox>
|
||||
<%--<f:TextBox ID="txtUnit" runat="server" Label="单位" LabelAlign="Right" MaxLength="50" Readonly="true">
|
||||
</f:TextBox>--%>
|
||||
<f:DropDownList ID="drpUnit" runat="server" EmptyText="请选择单位" Label="单位" ShowRedStar="true" Required="true" AutoSelectFirstItem="true" AutoPostBack="true" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpCompileMan" runat="server" Label="整理人" LabelAlign="Right" AutoSelectFirstItem="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker ID="txtCompileDate" runat="server" Label="整理日期" LabelAlign="Right"
|
||||
EnableEdit="true">
|
||||
</f:DatePicker>
|
||||
<%-- <f:DropDownList ID="drpAuditMan" runat="server" Label="审核人" LabelAlign="Right" >
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpApproveMan" runat="server" Label="批准人" LabelAlign="Right" >
|
||||
</f:DropDownList> --%>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:HtmlEditor runat="server" Label="应急预案内容" ID="txtEmergencyContents" ShowLabel="false"
|
||||
Editor="UMEditor" BasePath="~/res/umeditor/" ToolbarSet="Full" Height="200" LabelAlign="Right">
|
||||
</f:HtmlEditor>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<%-- <f:FormRow>
|
||||
</f:DropDownList> --%>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:HtmlEditor runat="server" Label="应急预案内容" ID="txtEmergencyContents" ShowLabel="false"
|
||||
Editor="UMEditor" BasePath="~/res/umeditor/" ToolbarSet="Full" Height="200" LabelAlign="Right">
|
||||
</f:HtmlEditor>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<%-- <f:FormRow>
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true"
|
||||
BodyPadding="0px">
|
||||
@@ -64,30 +65,30 @@
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:FormRow>--%>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1" MarginLeft="5px">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"> </f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" ToolTip="提交" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSubmit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1" MarginLeft="5px">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" ToolTip="提交" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSubmit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -21,20 +21,20 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
ViewState["EmergencyListId"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public string UnitId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["UnitId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["UnitId"] = value;
|
||||
}
|
||||
}
|
||||
///// <summary>
|
||||
///// 单位
|
||||
///// </summary>
|
||||
//public string UnitId
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return (string)ViewState["UnitId"];
|
||||
// }
|
||||
// set
|
||||
// {
|
||||
// ViewState["UnitId"] = value;
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
@@ -47,7 +47,7 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.InitDropDownList();
|
||||
|
||||
this.EmergencyListId = Request.Params["EmergencyListId"];
|
||||
@@ -56,26 +56,31 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
Model.Emergency_EmergencyList_Unit EmergencyList = BLL.UnitEmergencyListService.GetEmergencyListById(this.EmergencyListId);
|
||||
if (EmergencyList != null)
|
||||
{
|
||||
///读取编号
|
||||
///读取编号
|
||||
this.txtEmergencyCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.EmergencyListId);
|
||||
this.txtEmergencyName.Text = EmergencyList.EmergencyName;
|
||||
txtUnit.Text = BLL.UnitService.GetUnitNameByUnitId(EmergencyList.UnitId);
|
||||
if (!string.IsNullOrEmpty(EmergencyList.EmergencyTypeId))
|
||||
{
|
||||
this.drpEmergencyType.SelectedValue = EmergencyList.EmergencyTypeId;
|
||||
}
|
||||
this.txtVersionCode.Text = EmergencyList.VersionCode;
|
||||
//txtUnit.Text = BLL.UnitService.GetUnitNameByUnitId(EmergencyList.UnitId);
|
||||
if (!string.IsNullOrEmpty(EmergencyList.UnitId))
|
||||
{
|
||||
this.drpUnit.SelectedValue = EmergencyList.UnitId;
|
||||
BLL.Person_PersonsService.InitUserUnitIdDropDownList(this.drpCompileMan, drpUnit.SelectedValue, true);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(EmergencyList.CompileMan))
|
||||
{
|
||||
this.drpCompileMan.SelectedValue = EmergencyList.CompileMan;
|
||||
}
|
||||
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", EmergencyList.CompileDate);
|
||||
|
||||
|
||||
this.txtEmergencyContents.Text = HttpUtility.HtmlDecode(EmergencyList.EmergencyContents);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
this.drpCompileMan.SelectedValue = this.CurrUser.PersonId;
|
||||
this.txtVersionCode.Text = "V1.0";
|
||||
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
@@ -87,6 +92,9 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
////自动生成编码
|
||||
this.txtEmergencyCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.UnitEmergencyListMenuId, null, this.CurrUser.UnitId);
|
||||
this.txtEmergencyName.Text = this.SimpleForm1.Title;
|
||||
var thisUnit = BLL.CommonService.GetIsThisUnit();
|
||||
this.drpUnit.SelectedValue = thisUnit.UnitId;
|
||||
BLL.Person_PersonsService.InitUserUnitIdDropDownList(this.drpCompileMan, thisUnit.UnitId, true);
|
||||
}
|
||||
|
||||
///初始化审核菜单
|
||||
@@ -97,23 +105,35 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 初始化下拉框
|
||||
/// </summary>
|
||||
private void InitDropDownList()
|
||||
{
|
||||
var thisUnit = UnitService.GetUnitByUnitId(Const.UnitId_SEDIN);
|
||||
if (thisUnit != null)
|
||||
{
|
||||
this.txtUnit.Text = thisUnit.UnitName;
|
||||
this.UnitId = thisUnit.UnitId;
|
||||
}
|
||||
// BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
||||
BLL.Person_PersonsService.InitUserUnitIdDepartIdDropDownList(this.drpCompileMan, this.UnitId, null, true);
|
||||
//var thisUnit = CommonService.GetIsThisUnit();
|
||||
//if (thisUnit != null)
|
||||
//{
|
||||
// //this.txtUnit.Text = thisUnit.UnitName;
|
||||
// this.UnitId = thisUnit.UnitId;
|
||||
//}
|
||||
//BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
||||
//BLL.UserService.InitUserUnitIdDropDownList(this.drpCompileMan, this.UnitId, true);
|
||||
BLL.UnitService.InitBranchUnitDropDownList(this.drpUnit, BLL.Const.UnitId_SEDIN, false);
|
||||
BLL.EmergencyTypeService.InitEmergencyTypeDropDownList(this.drpEmergencyType, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 单位下拉加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
//整理人
|
||||
BLL.Person_PersonsService.InitUserUnitIdDropDownList(this.drpCompileMan, this.drpUnit.SelectedValue, true);
|
||||
}
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
@@ -121,7 +141,7 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
this.SaveData(BLL.Const.BtnSave);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
@@ -150,23 +170,27 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
{
|
||||
Model.Emergency_EmergencyList_Unit EmergencyList = new Model.Emergency_EmergencyList_Unit
|
||||
{
|
||||
UnitId = this.UnitId,
|
||||
//UnitId = this.UnitId,
|
||||
EmergencyCode = this.txtEmergencyCode.Text.Trim(),
|
||||
EmergencyName = this.txtEmergencyName.Text.Trim()
|
||||
};
|
||||
|
||||
|
||||
if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
EmergencyList.UnitId = this.drpUnit.SelectedValue;
|
||||
}
|
||||
if (this.drpEmergencyType.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
EmergencyList.EmergencyTypeId = this.drpEmergencyType.SelectedValue;
|
||||
}
|
||||
EmergencyList.VersionCode = this.txtVersionCode.Text.Trim();
|
||||
EmergencyList.CompileDate = Funs.GetNewDateTime(this.txtCompileDate.Text.Trim());
|
||||
if (this.drpCompileMan.SelectedValue!=BLL.Const._Null)
|
||||
if (this.drpCompileMan.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
EmergencyList.CompileMan = this.drpCompileMan.SelectedValue;
|
||||
}
|
||||
EmergencyList.EmergencyContents = HttpUtility.HtmlEncode(this.txtEmergencyContents.Text);
|
||||
|
||||
|
||||
////单据状态
|
||||
EmergencyList.States = BLL.Const.State_2;
|
||||
//if (type == BLL.Const.BtnSubmit)
|
||||
@@ -203,7 +227,7 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
{
|
||||
SaveData(BLL.Const.BtnSave);
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/EmergencyListAttachUrl&menuId={1}", EmergencyListId,BLL.Const.UnitEmergencyListMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/EmergencyListAttachUrl&menuId={1}", EmergencyListId, BLL.Const.UnitEmergencyListMenuId)));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -78,13 +78,13 @@ namespace FineUIPro.Web.ZHGL.Emergency
|
||||
protected global::FineUIPro.TextBox txtVersionCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtUnit 控件。
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUnit;
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
/// <summary>
|
||||
/// drpCompileMan 控件。
|
||||
|
||||
Reference in New Issue
Block a user