20230428 意见收集

This commit is contained in:
2023-04-28 09:18:02 +08:00
parent e2076852e6
commit f02f92d631
31 changed files with 3544 additions and 41 deletions
+26
View File
@@ -0,0 +1,26 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Look.aspx.cs" Inherits="FineUIPro.Web.AttachFile.Look" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="TabStrip1" runat="server" />
<f:TabStrip ID="TabStrip1" IsFluid="true" ShowBorder="true" ActiveTabIndex="0"
runat="server">
<Tabs>
<f:Tab ID="Tab1" EnableIFrame="true"
Title="预览" runat="server">
</f:Tab>
</Tabs>
</f:TabStrip>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" hidden="true" Text="关闭" runat="server" Icon="SystemClose" Size="Medium">
</f:Button>
<iframe id="LookHtml" runat="server" width="700" height="600" name="LookHtml" hidden="hidden"></iframe>
</form>
</body>
</html>
@@ -0,0 +1,46 @@
using BLL;
using System;
using System.IO;
namespace FineUIPro.Web.AttachFile
{
public partial class Look : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
var url = Request.Params["fileUrl"];
// var Baseurl = "https://view.officeapps.live.com/op/embed.aspx?src=";
var Baseurl = "https://view.xdocin.com/view?src=";
var Fileurl = Funs.SGGLUrl + url.Replace(Funs.RootPath, "");
var newurl = "";
var FiletExtension = Path.GetExtension(url);
if (FiletExtension == ".docx" || FiletExtension == ".doc"|| FiletExtension == ".xls" || FiletExtension == ".xlsx")
{
newurl = Baseurl + Fileurl;
}
else if (FiletExtension == ".txt"|| FiletExtension== "pdf")
{
newurl = Fileurl;
}
else
{
newurl = Fileurl;
}
this.LookHtml.Src = newurl;
this.Tab1.IFrameUrl = newurl;
//StreamReader fread = new StreamReader(url, System.Text.Encoding.GetEncoding("gb2312"));
//string ss = fread.ReadToEnd();
//Response.Write(ss);
//fread.Close();
//fread.Dispose();
}
}
}
}
+71
View File
@@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.AttachFile
{
public partial class Look
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// TabStrip1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TabStrip TabStrip1;
/// <summary>
/// Tab1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tab Tab1;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
/// <summary>
/// LookHtml 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlIframe LookHtml;
}
}
+10 -9
View File
@@ -1,5 +1,4 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="webuploader.aspx.cs" Inherits="FineUIPro.Web.AttachFile.webuploader" %>
<!DOCTYPE html>
<html>
<head runat="server">
@@ -29,16 +28,17 @@
<Toolbars>
<f:Toolbar runat="server" ID="toolBar" Hidden="true" ToolbarAlign="Right">
<Items>
<f:Button ID="btnImageMagnify" runat="server" IconFont="Inbox" ToolTip="扫描文件" OnClick="btnImageMagnify_Click"></f:Button>
<f:Button ID="btnImageMagnify" runat="server" IconFont="Inbox" Text="扫描"
ToolTip="扫描文件" OnClick="btnImageMagnify_Click"></f:Button>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
<f:Button ID="btnSelectFiles" ToolTip="选择文件上传" IconFont="Upload" runat="server" EnablePostBack="false">
<f:Button ID="btnSelectFiles" Text="上传" ToolTip="选择文件上传" IconFont="Upload" runat="server" EnablePostBack="false">
</f:Button>
<f:ToolbarSeparator runat="server"></f:ToolbarSeparator>
<f:Button ID="btnDelete" ToolTip="删除选中文件" IconFont="Trash" runat="server" OnClick="btnDelete_Click">
<f:Button ID="btnDelete" Text="删除" ToolTip="删除选中文件" IconFont="Trash" runat="server" OnClick="btnDelete_Click">
</f:Button>
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server"></f:ToolbarSeparator>
<f:Button ID="btnSave" ToolTip="保存" IconFont="Save" runat="server" OnClick="btnSave_Click">
<f:Button ID="btnSave" Text="保存" ToolTip="保存" IconFont="Save" runat="server" OnClick="btnSave_Click">
</f:Button>
</Items>
</f:Toolbar>
@@ -48,7 +48,8 @@
ExpandUnusedSpace="True" CommandName="Attach" EnableAjax="false" />
<f:BoundField ColumnID="FileType" DataField="type" HeaderText="类型" Width="100px" />
<f:RenderField ColumnID="FileSize" DataField="size" HeaderText="大小" Renderer="FileSize" Width="90px" />
<f:BoundField ColumnID='FileStatus' DataField="status" NullDisplayText="已完成" HeaderText="状态" Width="90px" />
<f:BoundField ColumnID='FileStatus' DataField="status" NullDisplayText="已完成" HeaderText="状态" Width="90px" />
<f:LinkButtonField CommandName="Preview" Width="60px" Text="预览" />
<f:LinkButtonField Width="60px" ConfirmText="你确定要删除这个文件吗?" ConfirmTarget="Parent" Text="删除"
HeaderText="删除" CommandName="Delete" IconUrl="~/res/icon/delete.png" Hidden="true"/>
</Columns>
@@ -57,7 +58,7 @@
注:本多附件上传支持的浏览器版本为:Chrome、Firefox、Safari、IE10+ 。
<f:Window ID="Window1" Title="播放" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true"
Width="700px" Height="600px">
Width="1024px" Height="650px">
</f:Window>
</form>
<script src="res/webuploader/webuploader.nolog.js" type="text/javascript"></script>
@@ -85,8 +86,8 @@
formData: {
owner: '<%= ParamStr%>'
},
// 单个文件大小限制(单位:byte),这里限制为 500M
fileSingleSizeLimit: 500 * 1024 * 1024
// 单个文件大小限制(单位:byte),这里限制为 800M
fileSingleSizeLimit: 6000 * 1024 * 1024
});
@@ -1,11 +1,11 @@
using System;
using BLL;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using BLL;
using Newtonsoft.Json.Linq;
using WIA;
using System.Collections.Generic;
using System.Text;
using WIA;
namespace FineUIPro.Web.AttachFile
{
@@ -240,6 +240,7 @@ namespace FineUIPro.Web.AttachFile
/// <returns></returns>
private JArray SourceData()
{
if (Session[sessionName] == null && !string.IsNullOrEmpty(ToKeyId))
{
//Session[sessionName] = new JArray();
@@ -334,7 +335,75 @@ namespace FineUIPro.Web.AttachFile
DeleteRow(e.RowID);
BindGrid();
}
if (e.CommandName == "Preview")
{
JArray source = GetSourceData();
for (int i = 0, count = source.Count; i < count; i++)
{
JObject item = source[i] as JObject;
if (item.Value<string>("id") == e.RowID)
{
try
{
string savedName = item.Value<string>("savedName");
string folder = item.Value<string>("folder");
string xnUrl = AttachPath + "\\" + savedName;
if (!string.IsNullOrEmpty(folder))
{
xnUrl = folder + savedName;
}
string url = Funs.RootPath + xnUrl;
if (savedName.Contains("FileUpLoad"))
{
url = Funs.RootPath + savedName.Replace('/', '\\');
}
FileInfo info = new FileInfo(url);
if (!info.Exists || string.IsNullOrEmpty(savedName))
{
url = Funs.RootPath + "Images//Null.jpg";
info = new FileInfo(url);
}
var FiletExtension = Path.GetExtension(savedName);
bool isSupportType = AttachFileService.IsSupportFileType(FiletExtension);
if (isSupportType)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/Look.aspx?fileUrl={0}", url, "查看 -")));
}
else
{
ShowNotify("不支持预览", MessageBoxIcon.Warning);
}
//if (FiletExtension == ".docx" || FiletExtension == ".pdf")
//{
// string httpUrl = BLL.AsposeWordHelper.WordToHtml(url);
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -")));
//}
//else if (FiletExtension == ".txt")
//{
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/Look.aspx?fileUrl={0}", url, "查看 -")));
//}
//else if (FiletExtension == ".xls")
//{
// string httpUrl = BLL.AsposeWordHelper.PriviewExcel(url);
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -")));
//}
//else
//{
// ShowNotify("不支持预览", MessageBoxIcon.Warning);
//}
}
catch (Exception)
{
}
}
}
}
if (e.CommandName == "Attach")
{
JArray source = GetSourceData();
@@ -393,7 +462,7 @@ namespace FineUIPro.Web.AttachFile
}
}
}
catch (Exception)
catch (Exception ex)
{
}
-21
View File
@@ -1,21 +0,0 @@
错误信息开始=====>
错误类型:HttpException
错误信息:文件“/ZHGL/Information/WorkSummaryReport.aspx”不存在。
错误堆栈:
在 System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
在 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
在 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
在 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
在 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
在 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
在 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
在 System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
出错时间:03/30/2023 09:48:15
出错文件:http://localhost:3345/ZHGL/Information/WorkSummaryReport.aspx
IP地址:::1
出错时间:03/30/2023 09:48:15
+25
View File
@@ -197,6 +197,7 @@
<Content Include="AttachFile\lib\popcorn.js" />
<Content Include="AttachFile\lib\popcorn.player.js" />
<Content Include="AttachFile\lib\popcorn.subtitle.js" />
<Content Include="AttachFile\Look.aspx" />
<Content Include="AttachFile\player.aspx" />
<Content Include="AttachFile\res\webuploader\Uploader.swf" />
<Content Include="AttachFile\res\webuploader\webuploader.nolog.js" />
@@ -298,6 +299,7 @@
<Content Include="common\Menu_HTGL.xml" />
<Content Include="common\Menu_JDGL.xml" />
<Content Include="common\Menu_Notice.xml" />
<Content Include="common\Menu_Opinion.xml" />
<Content Include="common\Menu_Party.xml" />
<Content Include="common\Menu_PDigData.xml" />
<Content Include="common\Menu_Person.xml" />
@@ -1291,6 +1293,8 @@
<Content Include="OfficeCheck\Check\RectifyEdit.aspx" />
<Content Include="OfficeCheck\ProjectEvaluation\ProjectEvaluation.aspx" />
<Content Include="OfficeCheck\ProjectEvaluation\ProjectEvaluationEdit.aspx" />
<Content Include="Opinion\OpinionCollection.aspx" />
<Content Include="Opinion\OpinionCollectionEdit.aspx" />
<Content Include="Party\BasicInformation.aspx" />
<Content Include="Party\CommentPartyer.aspx" />
<Content Include="Party\CommentPartyerEdit.aspx" />
@@ -5884,6 +5888,13 @@
<Compile Include="AttachFile\fileupload.ashx.cs">
<DependentUpon>fileupload.ashx</DependentUpon>
</Compile>
<Compile Include="AttachFile\Look.aspx.cs">
<DependentUpon>Look.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="AttachFile\Look.aspx.designer.cs">
<DependentUpon>Look.aspx</DependentUpon>
</Compile>
<Compile Include="AttachFile\player.aspx.cs">
<DependentUpon>player.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -13076,6 +13087,20 @@
<Compile Include="OfficeCheck\ProjectEvaluation\ProjectEvaluationEdit.aspx.designer.cs">
<DependentUpon>ProjectEvaluationEdit.aspx</DependentUpon>
</Compile>
<Compile Include="Opinion\OpinionCollection.aspx.cs">
<DependentUpon>OpinionCollection.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Opinion\OpinionCollection.aspx.designer.cs">
<DependentUpon>OpinionCollection.aspx</DependentUpon>
</Compile>
<Compile Include="Opinion\OpinionCollectionEdit.aspx.cs">
<DependentUpon>OpinionCollectionEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Opinion\OpinionCollectionEdit.aspx.designer.cs">
<DependentUpon>OpinionCollectionEdit.aspx</DependentUpon>
</Compile>
<Compile Include="Party\BasicInformation.aspx.cs">
<DependentUpon>BasicInformation.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -0,0 +1,121 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OpinionCollection.aspx.cs" Inherits="FineUIPro.Web.Opinion.OpinionCollection" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>意见收集</title>
<link href="~/res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="意见收集" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="OpinionCollectionId" EnableColumnLines="true" DataIDField="OpinionCollectionId" AllowSorting="true"
SortField="CompileDate" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true" ForceFit="true"
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
<Items>
<%--<f:DropDownList ID="drpCompileMan" runat="server" Label="提出人" Width="180px" LabelWidth="80px" LabelAlign="Right"
AutoPostBack="true" OnSelectedIndexChanged="Text_TextChanged">
</f:DropDownList>--%>
<f:TextBox ID="txtCompileManName" runat="server" Label="提出人" EmptyText="输入查询条件" Width="220px" LabelWidth="80px" LabelAlign="Right" AutoPostBack="true" OnTextChanged="Text_TextChanged"></f:TextBox>
<f:DropDownList ID="drpUnitId" runat="server" Label="所属单位" AutoPostBack="true" OnSelectedIndexChanged="Text_TextChanged"
LabelAlign="Right" LabelWidth="80px" Width="260px">
</f:DropDownList>
<f:DropDownList ID="drpProblemClass" runat="server" Label="问题分类" Width="210px" LabelWidth="80px" LabelAlign="Right"
AutoPostBack="true" OnSelectedIndexChanged="Text_TextChanged">
</f:DropDownList>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnNew" ToolTip="增加" Icon="Add" runat="server" OnClick="btnNew_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="300px" ColumnID="Opinion" DataField="Opinion" SortField="Opinion"
FieldType="String" HeaderText="意见" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="CompileManName" DataField="CompileManName" SortField="CompileManName"
FieldType="String" HeaderText="提出人" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<%--<f:RenderField Width="90px" ColumnID="RoleName" DataField="RoleName" SortField="RoleName"
FieldType="String" HeaderText="角色" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>--%>
<f:TemplateField HeaderText="角色" HeaderTextAlign="Center" >
<ItemTemplate>
<f:Label ID="lblRoleName" runat="server" Text='<%# ConvertRoleName(Eval("RoleId")) %>'></f:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="180px" ColumnID="UnitName" DataField="UnitName" SortField="UnitName"
FieldType="String" HeaderText="所属单位" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="ProblemClass" DataField="ProblemClass" SortField="ProblemClass"
FieldType="String" HeaderText="问题分类" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="CompileDate" DataField="CompileDate"
SortField="CompileDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
HeaderText="提出时间" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="140px" ColumnID="FlowOperateName" DataField="FlowOperateName"
SortField="FlowOperateName" FieldType="String" HeaderText="状态" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="意见收集" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="900px" Height="550px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Icon="Pencil" Text="编辑">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
ConfirmText="删除选中行?" Icon="Delete" ConfirmTarget="Parent" runat="server"
Text="删除">
</f:MenuButton>
</f:Menu>
</form>
<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false,来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
</script>
</body>
</html>
@@ -0,0 +1,300 @@
using BLL;
using FineUIPro.Web.BoSheng;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using AspNet = System.Web.UI.WebControls;
namespace FineUIPro.Web.Opinion
{
public partial class OpinionCollection : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
public string OpinionCollectionId
{
get
{
return (string)ViewState["OpinionCollectionId"];
}
set
{
ViewState["OpinionCollectionId"] = value;
}
}
#endregion
#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);
this.btnMenuDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!");
this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的&nbsp;<b><script>{0}</script></b>&nbsp;行数据吗?", Grid1.GetSelectedCountReference());
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList1(this.drpUnitId, this.CurrUser.LoginProjectId, true);
BLL.ConstValue.InitConstNameDropDownList(this.drpProblemClass, "MenuType_P", true);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
BindGrid();
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
string strSql = "select Opinion.OpinionCollectionId"
+ @",Opinion.ProjectId"
+ @",Opinion.UnitId"
+ @",Opinion.RoleId"
+ @",Opinion.ProblemClass"
+ @",Opinion.Opinion"
+ @",Opinion.CompileMan"
+ @",Opinion.CompileDate"
+ @",Opinion.State"
+ @",Opinion.ProjectName"
+ @",Opinion.UnitName"
+ @",Opinion.CompileManName"
+ @",(CASE WHEN Opinion.State = " + BLL.Const.State_0 + " OR Opinion.State IS NULL THEN '待['+Opinion.CompileManName+']提交' WHEN Opinion.State = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
+ @" from View_Opinion_OpinionCollection AS Opinion "
+ @" LEFT JOIN Opinion_OpinionCollectionApprove AS FlowOperate ON Opinion.OpinionCollectionId=FlowOperate.OpinionCollectionId and ApproveDate is null"
+ @" LEFT JOIN Sys_User AS OperateUser ON OperateUser.UserId=FlowOperate.ApproveMan WHERE 1=1";
List<SqlParameter> listStr = new List<SqlParameter>();
strSql += " AND Opinion.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (!string.IsNullOrEmpty(this.txtCompileManName.Text.Trim()))
{
strSql += " AND Opinion.CompileManName like @userName";
listStr.Add(new SqlParameter("@userName", "%" + this.txtCompileManName.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.drpUnitId.SelectedValue) && this.drpUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND Opinion.UnitId = @unitId";
listStr.Add(new SqlParameter("@unitId", this.drpUnitId.SelectedValue));
}
if (!string.IsNullOrEmpty(this.drpProblemClass.SelectedValue) && this.drpProblemClass.SelectedValue != BLL.Const._Null)
{
strSql += " AND Opinion.ProblemClass = @ProblemClass";
listStr.Add(new SqlParameter("@ProblemClass", this.drpProblemClass.SelectedValue));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion
#region
/// <summary>
/// 页索引改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <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();
}
#endregion
#region
/// <summary>
/// 增加
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnNew_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OpinionCollectionEdit.aspx", "编辑 - ")));
}
#endregion
#region
/// <summary>
/// Grid行双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
this.EditData();
}
/// <summary>
/// 右键编辑事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
this.EditData();
}
/// <summary>
/// 编辑
/// </summary>
private void EditData()
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
this.OpinionCollectionId = Grid1.SelectedRowID;
var opinion = OpinionCollectionService.GetOpinionCollectionById(this.OpinionCollectionId);
if (opinion != null)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OpinionCollectionEdit.aspx?opinionCollectionId={0}", this.OpinionCollectionId, "编辑 - ")));
}
}
#endregion
#region
/// <summary>
/// 右键删除事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
this.DeleteData();
}
/// <summary>
/// 删除方法
/// </summary>
private void DeleteData()
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
bool isShow = false;
if (Grid1.SelectedRowIndexArray.Length == 1)
{
isShow = true;
}
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
if (this.judgementDelete(rowID, isShow))
{
var opinionCollection = OpinionCollectionService.GetOpinionCollectionById(rowID);
if (opinionCollection != null)
{
OpinionCollectionApproveService.DeleteApproveByOpinionCollectionId(rowID);
OpinionCollectionService.DeleteOpinionCollectionById(rowID);
BindGrid();
ShowNotify("删除数据成功!(表格数据已重新绑定)", MessageBoxIcon.Success);
}
}
}
}
}
/// <summary>
/// 判断是否可删除
/// </summary>
/// <param name="rowID"></param>
/// <param name="isShow"></param>
/// <returns></returns>
private bool judgementDelete(string rowID, bool isShow)
{
string content = string.Empty;
if (string.IsNullOrEmpty(content))
{
return true;
}
else
{
if (isShow)
{
Alert.ShowInTop(content);
}
return false;
}
}
#endregion
#region
/// <summary>
/// 关闭弹出窗
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 查询事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Text_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
#endregion
#region
/// <summary>
/// 根据角色Id获取角色名称
/// </summary>
/// <param name="roleId"></param>
/// <returns></returns>
protected string ConvertRoleName(object roleId)
{
string roleName = string.Empty;
if (roleId != null)
{
roleName = BLL.RoleService.getRoleNamesRoleIds(roleId.ToString());
}
return roleName;
}
#endregion
}
}
@@ -0,0 +1,186 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Opinion {
public partial class OpinionCollection {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtCompileManName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCompileManName;
/// <summary>
/// drpUnitId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnitId;
/// <summary>
/// drpProblemClass 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpProblemClass;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// lblNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblNumber;
/// <summary>
/// lblRoleName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lblRoleName;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDelete;
}
}
@@ -0,0 +1,149 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OpinionCollectionEdit.aspx.cs" Inherits="FineUIPro.Web.Opinion.OpinionCollectionEdit" %>
<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl"
TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑意见收集</title>
<link href="~/res/css/common.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.labcenter {
text-align: center;
}
.f-grid-row.Red {
background-color: red;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:DropDownList ID="drpProblemClass" runat="server" Label="问题分类" Required="true" ShowRedStar="true"></f:DropDownList>
<f:Label ID="Label1" runat="server"></f:Label>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtOpinion" runat="server" Label="意见" LabelAlign="Right" Required="true" ShowRedStar="true" MaxLength="2000"></f:TextArea>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpCompileMan" runat="server" Label="提出人" LabelAlign="Right" Required="true" ShowRedStar="true" Readonly="true"></f:DropDownList>
<f:DatePicker ID="txtCompileDate" runat="server" Label="提出时间" LabelAlign="Right" Required="true" ShowRedStar="true" Readonly="true"></f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpUnitId" runat="server" Label="所属单位" LabelAlign="Right" Readonly="true"></f:DropDownList>
<%--<f:DropDownList ID="drpRoleId" runat="server" Label="角色" LabelAlign="Right" Readonly="true"></f:DropDownList>--%>
<f:TextBox ID="txtRole" runat="server" Label="角色" LabelAlign="Right" Readonly="true"></f:TextBox>
</Items>
</f:FormRow>
<%--<f:FormRow>
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true"
BodyPadding="0px">
<uc1:FlowOperateControl ID="ctlAuditFlow" runat="server" />
</f:ContentPanel>
</Items>
</f:FormRow>--%>
<%--<f:FormRow ID="agree">
<Items>
<f:RadioButtonList runat="server" ID="rblIsAgree" Label="是否同意" ShowRedStar="true">
<f:RadioItem Text="同意" Value="true" Selected="true" />
<f:RadioItem Text="不同意" Value="false" />
</f:RadioButtonList>
</Items>
</f:FormRow>--%>
<f:FormRow ID="options">
<Items>
<f:TextArea ID="txtidea" ShowRedStar="true" runat="server" Label="办理意见" MaxLength="3000">
</f:TextArea>
</Items>
</f:FormRow>
<f:FormRow ID="nextStep" ColumnWidths=" 12% 18% 70%">
<Items>
<f:Label ID="Label2" runat="server"></f:Label>
<f:DropDownList ID="drpNextStep" runat="server" AutoPostBack="true" OnSelectedIndexChanged="drpNextStep_SelectedIndexChanged">
<f:ListItem Value="下一步" Text="下一步" Selected="true" />
<f:ListItem Value="审核完成" Text="审核完成" />
</f:DropDownList>
<f:Label ID="Label3" runat="server"></f:Label>
</Items>
</f:FormRow>
<f:FormRow ID="audit">
<Items>
<f:DropDownList runat="server" Label="核实人角色" ID="drpAuditRoleId" ShowRedStar="true" Required="true" AutoPostBack="true" OnSelectedIndexChanged="drpAuditRoleId_SelectedIndexChanged"></f:DropDownList>
<f:DropDownList runat="server" Label="核实人" ID="drpAudit" ShowRedStar="true" Required="true">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="审批流程" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="OpinionCollectionApproveId" EnableColumnLines="true" DataIDField="OpinionCollectionApproveId" AllowSorting="true"
SortField="ApproveDate" SortDirection="DESC" EnableTextSelection="True">
<Columns>
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="90px" ColumnID="ApproveManName" DataField="ApproveManName" SortField="ApproveManName"
FieldType="String" HeaderText="审核人" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="ApproveDate" DataField="ApproveDate" SortField="ApproveDate"
FieldType="Date" Renderer="Date" HeaderText="审核日期" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<%--<f:RenderField Width="90px" ColumnID="IsAgree" DataField="IsAgree" SortField="IsAgree"
FieldType="String" HeaderText="是否同意" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>--%>
<f:RenderField Width="90px" ColumnID="ApproveIdea" DataField="ApproveIdea" SortField="ApproveIdea"
FieldType="String" HeaderText="意见" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:HiddenField ID="hdRoleId" runat="server"></f:HiddenField>
<f:Label runat="server" ID="lbTemp">
</f:Label>
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1">
</f:Button>
<f:ToolbarFill ID="ToolbarFill1" 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" runat="server" Icon="SystemClose" MarginRight="10px">
</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>
@@ -0,0 +1,394 @@
using BLL;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
namespace FineUIPro.Web.Opinion
{
public partial class OpinionCollectionEdit : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
public string OpinionCollectionId
{
get
{
return (string)ViewState["OpinionCollectionId"];
}
set
{
ViewState["OpinionCollectionId"] = value;
}
}
/// <summary>
/// 主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 状态
/// </summary>
public string State
{
get
{
return (string)ViewState["State"];
}
set
{
ViewState["State"] = value;
}
}
/// <summary>
/// 定义集合
/// </summary>
private static List<Model.View_Opinion_OpinionCollectionApprove> approveLists = new List<Model.View_Opinion_OpinionCollectionApprove>();
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHidePostBackReference();
this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList1(this.drpUnitId, this.ProjectId, true);
BLL.UserService.InitUserDropDownList(this.drpCompileMan, this.ProjectId, true);
BLL.ConstValue.InitConstNameDropDownList(this.drpProblemClass, "MenuType_P", true);
BLL.ProjectUserService.InitProjectUserRoleIdDropDownList(this.drpAuditRoleId, this.ProjectId, false);
this.drpAuditRoleId.SelectedValue = BLL.Const.QAManager;
BLL.UserService.InitUserByRoleIdDropDownList(this.drpAudit, this.ProjectId, this.drpAuditRoleId.SelectedValue, false);
this.OpinionCollectionId = Request.Params["opinionCollectionId"];
var opinionCollection = OpinionCollectionService.GetOpinionCollectionById(this.OpinionCollectionId);
if (opinionCollection != null)
{
this.State = opinionCollection.State.Trim();
this.ProjectId = opinionCollection.ProjectId;
this.txtOpinion.Text = opinionCollection.Opinion;
if (!string.IsNullOrEmpty(opinionCollection.CompileMan))
{
this.drpCompileMan.SelectedValue = opinionCollection.CompileMan;
}
this.txtCompileDate.Text = opinionCollection.CompileDate.HasValue ? string.Format("{0:yyyy-MM-dd}", opinionCollection.CompileDate) : "";
if (!string.IsNullOrEmpty(opinionCollection.RoleId))
{
this.hdRoleId.Text = opinionCollection.RoleId;
this.txtRole.Text = BLL.RoleService.getRoleNamesRoleIds(opinionCollection.RoleId);
}
if (!string.IsNullOrEmpty(opinionCollection.UnitId))
{
this.drpUnitId.SelectedValue = opinionCollection.UnitId;
}
if (!string.IsNullOrEmpty(opinionCollection.ProblemClass))
{
this.drpProblemClass.SelectedValue = opinionCollection.ProblemClass;
}
#region
var approveList = BLL.OpinionCollectionApproveService.GetApproveListByOpinionCollectionId(this.OpinionCollectionId);
if (approveList.Count > 0)
{
var app = approveList.FirstOrDefault(x => x.ApproveDate == null && x.ApproveMan != this.CurrUser.UserId);
if (app != null)
{
this.drpAuditRoleId.SelectedValue = app.ApproveManRoleId;
this.drpAudit.Items.Clear();
BLL.UserService.InitUserByRoleIdDropDownList(this.drpAudit, this.ProjectId, this.drpAuditRoleId.SelectedValue, false);
this.drpAudit.SelectedValue = app.ApproveMan;
}
}
#endregion
//加载审批流程
approveLists = BLL.OpinionCollectionApproveService.getViewApproveLists(this.OpinionCollectionId);
if (approveLists.Count > 0)
{
this.Grid1.Hidden = false;
this.Grid1.DataSource = approveLists;
this.Grid1.DataBind();
}
else
{
this.Grid1.Hidden = true;
}
}
else
{
this.Grid1.Hidden = true;
//this.agree.Hidden = true;
this.options.Hidden = true;
this.nextStep.Hidden = true;
if (!string.IsNullOrEmpty(this.CurrUser.UserId))
{
var user = BLL.UserService.GetUserByUserId(this.CurrUser.UserId);
if (user != null)
{
this.drpCompileMan.SelectedValue = this.CurrUser.UserId;
//this.drpRoleId.SelectedValue = user.RoleId;
this.drpUnitId.SelectedValue = user.UnitId;
var projectUser = BLL.ProjectUserService.GetCurrProjectUserByUserId(this.CurrUser.UserId);
if (projectUser != null)
{
if (!string.IsNullOrEmpty(projectUser.RoleId))
{
this.hdRoleId.Text = projectUser.RoleId;
this.txtRole.Text = BLL.RoleService.getRoleNamesRoleIds(projectUser.RoleId);
}
}
}
}
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
}
if (this.State == BLL.Const.State_0)
{
//this.agree.Hidden = true;
this.options.Hidden = true;
this.nextStep.Hidden = true;
}
else
{
var approveList = BLL.OpinionCollectionApproveService.GetApproveListByOpinionCollectionId(this.OpinionCollectionId);
if (approveList.Count > 0)
{
var app = approveList.FirstOrDefault(x => x.ApproveDate == null && x.ApproveMan == this.CurrUser.UserId);
if (app != null)
{
//agree.Hidden = false;
options.Hidden = false;
this.nextStep.Hidden = false;
}
else
{
//agree.Hidden = true;
options.Hidden = true;
nextStep.Hidden = true;
this.btnSubmit.Hidden = true;
this.btnSave.Hidden = true;
}
}
}
}
}
#endregion
#region
/// <summary>
/// 提交按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSubmit_Click(object sender, EventArgs e)
{
this.SaveData(BLL.Const.BtnSubmit);
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
#endregion
#region
/// <summary>
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
this.SaveData(BLL.Const.BtnSave);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
#endregion
#region
/// <summary>
/// 保存数据
/// </summary>
/// <param name="type"></param>
private void SaveData(string type)
{
Model.Opinion_OpinionCollection opinionCollection = new Model.Opinion_OpinionCollection
{
ProjectId = this.ProjectId,
Opinion = this.txtOpinion.Text.Trim(),
CompileDate = Funs.GetNewDateTime(this.txtCompileDate.Text.Trim()),
RoleId = this.hdRoleId.Text.Trim()
};
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
{
opinionCollection.UnitId = this.drpUnitId.SelectedValue;
}
if (this.drpProblemClass.SelectedValue != BLL.Const._Null)
{
opinionCollection.ProblemClass = this.drpProblemClass.SelectedValue;
}
////单据状态
opinionCollection.State = BLL.Const.State_0.Trim();
if (!string.IsNullOrEmpty(this.OpinionCollectionId))
{
opinionCollection.OpinionCollectionId = this.OpinionCollectionId;
BLL.OpinionCollectionService.UpdateOpinionCollection(opinionCollection);
}
else
{
opinionCollection.CompileMan = this.CurrUser.UserId;
opinionCollection.OpinionCollectionId = SQLHelper.GetNewID(typeof(Model.Opinion_OpinionCollection));
this.OpinionCollectionId = opinionCollection.OpinionCollectionId;
BLL.OpinionCollectionService.AddOpinionCollection(opinionCollection);
}
if (type == Const.BtnSubmit)
{
var approves = BLL.OpinionCollectionApproveService.GetApproveListByOpinionCollectionId(this.OpinionCollectionId);
if (approves.Count == 0)
{
if (this.CurrUser.UserId == this.drpCompileMan.SelectedValue)
{
Model.Opinion_OpinionCollectionApprove newApprove = new Model.Opinion_OpinionCollectionApprove();
newApprove.OpinionCollectionApproveId = SQLHelper.GetNewID(typeof(Model.Opinion_OpinionCollectionApprove));
newApprove.OpinionCollectionId = this.OpinionCollectionId;
if (this.drpAuditRoleId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpAuditRoleId.SelectedValue))
{
newApprove.ApproveManRoleId = this.drpAuditRoleId.SelectedValue;
}
if (this.drpAudit.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{
newApprove.ApproveMan = this.drpAudit.SelectedValue;
}
BLL.OpinionCollectionApproveService.AddOpinionCollectionApprove(newApprove);
}
}
else
{
var approve = approves.Where(x => x.ApproveDate == null && x.ApproveMan == this.CurrUser.UserId).FirstOrDefault();
if (approve != null)
{
approve.ApproveDate = DateTime.Now;
//if (rblIsAgree.SelectedValue == "true")
//{
// approve.IsAgree = true;
//}
//else
//{
// approve.IsAgree = false;
//}
approve.ApproveIdea = this.txtidea.Text.Trim();
BLL.OpinionCollectionApproveService.UpdateOpinionCollectionApprove(approve);
if (this.drpNextStep.SelectedValue == "下一步")
{
Model.Opinion_OpinionCollectionApprove newApprove = new Model.Opinion_OpinionCollectionApprove();
newApprove.OpinionCollectionApproveId = SQLHelper.GetNewID(typeof(Model.Opinion_OpinionCollectionApprove));
newApprove.OpinionCollectionId = this.OpinionCollectionId;
if (this.drpAuditRoleId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpAuditRoleId.SelectedValue))
{
newApprove.ApproveManRoleId = this.drpAuditRoleId.SelectedValue;
}
if (this.drpAudit.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{
newApprove.ApproveMan = this.drpAudit.SelectedValue;
}
BLL.OpinionCollectionApproveService.AddOpinionCollectionApprove(newApprove);
}
}
}
//更改状态
var opin = BLL.OpinionCollectionService.GetOpinionCollectionById(this.OpinionCollectionId);
if (opin!=null)
{
//if (rblIsAgree.SelectedValue == "true")
//{
if (this.drpNextStep.SelectedValue == "审核完成")
{
opin.State = BLL.Const.State_2;
}
else
{
opin.State = BLL.Const.State_1;
}
//}
//else
//{
// opin.State = BLL.Const.State_0;
//}
BLL.OpinionCollectionService.UpdateOpinionCollection(opin);
}
}
}
#endregion
#region
/// <summary>
/// 上传附件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
if (this.drpProblemClass.SelectedValue == BLL.Const._Null)
{
ShowNotify("请选择问题分类!", MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrEmpty(this.OpinionCollectionId))
{
this.SaveData(BLL.Const.BtnSave);
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/OpinionCollection&menuId={1}&type=0", this.OpinionCollectionId, BLL.Const.OpinionCollectionMenuId)));
}
#endregion
#region DropDownList下拉选择事件
/// <summary>
/// 核实人角色下拉选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void drpAuditRoleId_SelectedIndexChanged(object sender, EventArgs e)
{
this.drpAudit.Items.Clear();
if (!string.IsNullOrEmpty(this.drpAuditRoleId.SelectedValue)&&this.drpAuditRoleId.SelectedValue!=BLL.Const._Null)
{
BLL.UserService.InitUserByRoleIdDropDownList(this.drpAudit, this.ProjectId, this.drpAuditRoleId.SelectedValue, false);
this.drpAudit.SelectedIndex = 0;
}
}
/// <summary>
///下一步选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void drpNextStep_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.drpNextStep.SelectedText=="审核完成")
{
audit.Hidden = true;
}
else
{
audit.Hidden = false;
}
}
#endregion
}
}
@@ -0,0 +1,285 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Opinion {
public partial class OpinionCollectionEdit {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// drpProblemClass 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpProblemClass;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// txtOpinion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtOpinion;
/// <summary>
/// drpCompileMan 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCompileMan;
/// <summary>
/// txtCompileDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtCompileDate;
/// <summary>
/// drpUnitId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnitId;
/// <summary>
/// txtRole 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRole;
/// <summary>
/// options 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow options;
/// <summary>
/// txtidea 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtidea;
/// <summary>
/// nextStep 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow nextStep;
/// <summary>
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label2;
/// <summary>
/// drpNextStep 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpNextStep;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label3;
/// <summary>
/// audit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow audit;
/// <summary>
/// drpAuditRoleId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpAuditRoleId;
/// <summary>
/// drpAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpAudit;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// lblNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblNumber;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// hdRoleId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdRoleId;
/// <summary>
/// lbTemp 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbTemp;
/// <summary>
/// btnAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnSubmit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSubmit;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
}
}
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Tree>
<TreeNode id="D801290C-1FD9-4467-AFF9-7D788C6344B1" Text="意见收集" NavigateUrl="Opinion/OpinionCollection.aspx">
</TreeNode>
</Tree>
+5
View File
@@ -244,6 +244,11 @@
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnPDigData">
</f:Button>
</li>
<li>
<f:Button runat="server" CssClass="bgbtn" Text="意见收集" OnClick="btnOpinion_Click" OnClientClick="parent.removeActiveTab();"
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnOpinion">
</f:Button>
</li>
<li>
<f:Button runat="server" CssClass="bgbtn" Text="施工综合" Enabled="false" Hidden="true" OnClick="btnPZHGL_Click" OnClientClick="parent.removeActiveTab();"
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnPZHGL">
+13 -2
View File
@@ -600,7 +600,7 @@ namespace FineUIPro.Web
this.XmlDataSource1.DataFile = "common/Menu_Personal.xml";
this.leftPanel.Hidden = true;
var projectUser = BLL.ProjectUserService.GetProjectUserByUserIdProjectId(this.CurrUser.LoginProjectId, this.CurrUser.UserId);
if (projectUser != null)
if (projectUser != null&&type!=BLL.Const.Menu_Opinion)
{
string roleTypes = string.Empty;
string roleCNs = string.Empty;
@@ -671,8 +671,14 @@ namespace FineUIPro.Web
this.Tab1.IFrameUrl = "~/CLGL/PipelineMaterialSumList.aspx";
this.Tab1.Title = "管道材料汇总表";
}
else
else if (type == Const.Menu_Opinion)
{
this.leftPanel.Hidden = true;
this.Tab1.IFrameUrl = "~/Opinion/OpinionCollection.aspx";
this.Tab1.Title = "意见收集";
}
else
{
this.Tab1.Title = "首页";
}
}
@@ -775,5 +781,10 @@ namespace FineUIPro.Web
{
this.MenuSwitchMethod(Const.Menu_JDGL);
}
protected void btnOpinion_Click(object sender, EventArgs e)
{
this.MenuSwitchMethod(Const.Menu_Opinion);
}
}
}
+9
View File
@@ -147,6 +147,15 @@ namespace FineUIPro.Web {
/// </remarks>
protected global::FineUIPro.Button btnPDigData;
/// <summary>
/// btnOpinion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOpinion;
/// <summary>
/// btnPZHGL 控件。
/// </summary>