质量资料收发文调整

This commit is contained in:
夏菊 2025-12-04 15:38:55 +08:00
parent 07b7d8426a
commit 2b61bbe138
21 changed files with 1388 additions and 206 deletions

View File

@ -0,0 +1,50 @@
--
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Base_ReceivingDocType') AND type = N'U')
BEGIN
CREATE TABLE [dbo].[Base_ReceivingDocType](
[TypeId] [nvarchar](50) NOT NULL,
[TypeName] [nvarchar](50) NULL,
[SortIndex] [int] NULL,
CONSTRAINT [PK_Base_ReceivingDocType] PRIMARY KEY CLUSTERED
(
[TypeId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'资料收发文类别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ReceivingDocType'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ReceivingDocType', @level2type=N'COLUMN',@level2name=N'TypeId'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ReceivingDocType', @level2type=N'COLUMN',@level2name=N'TypeName'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ReceivingDocType', @level2type=N'COLUMN',@level2name=N'SortIndex'
END
GO
--
IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = 'DFE17AE1-F23D-4EE2-8F82-116F16E433DF')
BEGIN
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
values('DFE17AE1-F23D-4EE2-8F82-116F16E433DF','资料收发文类别','BaseInfo/ReceivingDocType.aspx',40,'A93BA810-3511-4BB2-9C10-9663351DF79F','Menu_SysSet',1,1,1)
END
GO
--
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = 'DFE17AE1-F23D-4EE2-8F82-116F16E433DF')
BEGIN
INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex])
VALUES (N'7E7863BD-8C46-413E-B6CF-DAE1468ED589', N'DFE17AE1-F23D-4EE2-8F82-116F16E433DF', N'增加', 1);
INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex])
VALUES (N'6BA582C9-3864-4898-9CA4-018284F0E261', N'DFE17AE1-F23D-4EE2-8F82-116F16E433DF', N'修改', 2);
INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex])
VALUES (N'5B576A63-31F7-4440-99CF-AF2B4BD71BCC', N'DFE17AE1-F23D-4EE2-8F82-116F16E433DF', N'删除', 3);
INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex])
VALUES (N'4DA1BA90-7CE5-4CE9-A636-70A3C0F03C60', N'DFE17AE1-F23D-4EE2-8F82-116F16E433DF', N'保存', 4);
END
GO

View File

@ -133,6 +133,7 @@
<Compile Include="API\HSSE\APITrainingTaskService.cs" />
<Compile Include="API\HSSE\APITrainRecordService.cs" />
<Compile Include="BaseInfo\QualificationService.cs" />
<Compile Include="BaseInfo\ReceivingDocTypeService.cs" />
<Compile Include="BaseInfo\SuperviseCheckTypeService.cs" />
<Compile Include="BaseInfo\AccidentTypeService.cs" />
<Compile Include="BaseInfo\BaseFactoryService.cs" />

View File

@ -0,0 +1,125 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
namespace BLL
{
public class ReceivingDocTypeService
{
/// <summary>
/// 获取实体集合
/// </summary>
/// <returns></returns>
public static List<Model.Base_ReceivingDocType> GetList()
{
var q = (from x in Funs.DB.Base_ReceivingDocType orderby x.SortIndex select x).ToList();
return q;
}
/// <summary>
/// 添加
/// </summary>
/// <param name="?"></param>
public static void AddReceivingDocType(Model.Base_ReceivingDocType model)
{
Model.SGGLDB db = Funs.DB;
Model.Base_ReceivingDocType newModel = new Model.Base_ReceivingDocType
{
TypeId = model.TypeId,
TypeName = model.TypeName,
SortIndex = model.SortIndex
};
db.Base_ReceivingDocType.InsertOnSubmit(newModel);
db.SubmitChanges();
}
/// <summary>
/// 修改
/// </summary>
/// <param name="teamGroup"></param>
public static void UpdateReceivingDocType(Model.Base_ReceivingDocType model)
{
Model.SGGLDB db = Funs.DB;
Model.Base_ReceivingDocType newModel = db.Base_ReceivingDocType.FirstOrDefault(e => e.TypeId == model.TypeId);
if (newModel != null)
{
newModel.TypeName = model.TypeName;
newModel.SortIndex = model.SortIndex;
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除信息
/// </summary>
/// <param name="TypeId"></param>
public static void DeleteReceivingDocTypeById(string TypeId)
{
Model.SGGLDB db = Funs.DB;
Model.Base_ReceivingDocType model = db.Base_ReceivingDocType.FirstOrDefault(e => e.TypeId == TypeId);
{
db.Base_ReceivingDocType.DeleteOnSubmit(model);
db.SubmitChanges();
}
}
/// <summary>
/// 资料收发文类别下拉框
/// </summary>
/// <param name="dropName"></param>
/// <param name="isShowPlease"></param>
public static void InitReceivingDocTypeDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
{
dropName.DataValueField = "Value";
dropName.DataTextField = "Text";
dropName.DataSource = GetReceivingDocTypeItem();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
/// <summary>
/// 资料收发文类别下拉框
/// </summary>
/// <param name="dropName"></param>
/// <param name="isShowPlease"></param>
public static void InitReceivingDocType(FineUIPro.DropDownList dropName, bool isShowPlease)
{
dropName.DataValueField = "Text";
dropName.DataTextField = "Text";
dropName.DataSource = GetReceivingDocTypeItem();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
/// <summary>
/// 获取资料收发文类别集合
/// </summary>
/// <returns></returns>
public static ListItem[] GetReceivingDocTypeItem()
{
var q = (from x in Funs.DB.Base_ReceivingDocType orderby x.SortIndex select x).ToList();
ListItem[] list = new ListItem[q.Count()];
for (int i = 0; i < q.Count(); i++)
{
list[i] = new ListItem(q[i].TypeName ?? "", q[i].TypeId);
}
return list;
}
/// <summary>
/// 获取一个资料收发文类别信息
/// </summary>
/// <param name="postId"></param>
/// <returns></returns>
public static Model.Base_ReceivingDocType GetReceivingDocType(string TypeId)
{
return Funs.DB.Base_ReceivingDocType.FirstOrDefault(e => e.TypeId == TypeId);
}
}
}

View File

@ -1132,6 +1132,11 @@ namespace BLL
/// 质量问题类别定义
/// </summary>
public const string QualityQuestionTypeMenuId = "24F9A1ED-0F4C-407C-8EB3-2A8711BB6ECC";
/// <summary>
/// 资料收发文类别
/// </summary>
public const string ReceivingDocTypeMenuId = "24F9A1ED-0F4C-407C-8EB3-2A8711BB6ECC";
#endregion
#region

View File

@ -0,0 +1,100 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReceivingDocType.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.ReceivingDocType" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<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" EnableAjax="false" ShowHeader="false" Title="资料收发文类别" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="TypeId" AllowCellEditing="true" ForceFit="true"
ClicksToEdit="2" DataIDField="TypeId" AllowSorting="true" SortField="SortIndex"
SortDirection="ASC" EnableColumnLines="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="15"
EnableRowDoubleClickEvent="true" AllowFilters="true" EnableTextSelection="True" OnRowDoubleClick="Grid1_RowDoubleClick" OnPageIndexChange="Grid1_PageIndexChange">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox ID="txtTypeName" runat="server" Label="资料收发文类别" Width="250px" LabelWidth="120px"
LabelAlign="Right">
</f:TextBox>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnSearch" Icon="SystemSearch"
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
</f:Button>
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server">
</f:Button>
<f:Button ID="btnNew" Icon="Add" EnablePostBack="true" Hidden="true"
runat="server">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="180px" ColumnID="TypeName" DataField="TypeName"
SortField="TypeName" FieldType="String" HeaderText="资料收发文类别" TextAlign="Center"
HeaderTextAlign="Center">
</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:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="质量问题类别" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="500px" Height="300px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<Items>
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Hidden="true" Text="修改" Icon="Pencil"
OnClick="btnMenuModify_Click">
</f:MenuButton>
<%--<f:MenuButton ID="btnMenuView" EnablePostBack="true" runat="server" Text="查看" Icon="ApplicationViewIcons" OnClick="btnMenuView_Click">
</f:MenuButton>--%>
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Hidden="true" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
OnClick="btnMenuDel_Click">
</f:MenuButton>
</Items>
</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;
}
</script>
</body>
</html>

View File

@ -0,0 +1,177 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
namespace FineUIPro.Web.BaseInfo
{
public partial class ReceivingDocType : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetButtonPower();
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
BindGrid();
btnNew.OnClientClick = Window1.GetShowReference("ReceivingDocTypeEdit.aspx") + "return false;";
}
}
/// <summary>
/// 绑定数据
/// </summary>
public void BindGrid()
{
DataTable tb = BindData();
Grid1.RecordCount = tb.Rows.Count;
tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
protected DataTable BindData()
{
string strSql = @"select TypeId,TypeName,SortIndex from [dbo].[Base_ReceivingDocType] where 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.txtTypeName.Text.Trim()))
{
strSql += " AND TypeName like @TypeName";
listStr.Add(new SqlParameter("@TypeName", "%" + this.txtTypeName.Text.Trim() + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
return tb;
}
protected void btnMenuModify_Click(object sender, EventArgs e)
{
EditData();
}
protected void btnMenuDel_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
BLL.ReceivingDocTypeService.DeleteReceivingDocTypeById(rowID);
}
BindGrid();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
}
/// <summary>
/// 编辑数据方法
/// </summary>
private void EditData()
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return;
}
//if (this.btnMenuModify.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
//{
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReceivingDocTypeView.aspx?TypeId={0}", Grid1.SelectedRowID, "查看 - ")));
//}
//else
//{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReceivingDocTypeEdit.aspx?TypeId={0}", Grid1.SelectedRowID, "编辑 - ")));
//}
}
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
if (Request.Params["value"] == "0")
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ReceivingDocTypeMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))
{
this.btnNew.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnModify))
{
this.btnMenuModify.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnDelete))
{
this.btnMenuDel.Hidden = false;
}
}
}
#endregion
protected void btnSearch_Click(object sender, EventArgs e)
{
BindGrid();
}
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
EditData();
}
protected void btnMenuView_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReceivingDocTypeView.aspx?TypeId={0}", Grid1.SelectedRowID, "查看 - ")));
}
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
/// <summary>
/// 重置
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnRset_Click(object sender, EventArgs e)
{
txtTypeName.Text = "";
BindGrid();
}
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
BindGrid();
}
}
}

View File

@ -0,0 +1,170 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.BaseInfo
{
public partial class ReceivingDocType
{
/// <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>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtTypeName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTypeName;
/// <summary>
/// btnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnRset 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnRset;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// lblPageIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <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>
/// btnMenuModify 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuModify;
/// <summary>
/// btnMenuDel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDel;
}
}

View File

@ -0,0 +1,44 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReceivingDocTypeEdit.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.ReceivingDocTypeEdit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>资料收发文类别</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow runat="server">
<Items>
<f:TextBox ID="txtTypeName" runat="server" Label="类别名称" Required="true" MaxLength="70" ShowRedStar="true" LabelWidth="110px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox runat="server" ID="txtSortIndex" Label="排序" LabelWidth="110px" NoDecimal="true" NoNegative="true"></f:NumberBox>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:HiddenField ID="hdCheckerId" runat="server">
</f:HiddenField>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false"
runat="server" Icon="SystemClose">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</form>
</body>
</html>

View File

@ -0,0 +1,63 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.BaseInfo
{
public partial class ReceivingDocTypeEdit : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
string TypeId = Request.Params["TypeId"];
if (!string.IsNullOrEmpty(TypeId))
{
Model.Base_ReceivingDocType model = BLL.ReceivingDocTypeService.GetReceivingDocType(TypeId);
if (model != null)
{
this.txtTypeName.Text = model.TypeName;
if (model.SortIndex != null)
{
this.txtSortIndex.Text = model.SortIndex.ToString();
}
}
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
SaveData(true);
}
private void SaveData(bool b)
{
string TypeId = Request.Params["TypeId"];
Model.Base_ReceivingDocType model = new Model.Base_ReceivingDocType();
model.TypeName = this.txtTypeName.Text.Trim();
if (!string.IsNullOrEmpty(this.txtSortIndex.Text.Trim()))
{
model.SortIndex = Convert.ToInt32(this.txtSortIndex.Text.Trim());
}
if (!string.IsNullOrEmpty(TypeId))
{
model.TypeId = TypeId;
BLL.ReceivingDocTypeService.UpdateReceivingDocType(model);
}
else
{
model.TypeId = SQLHelper.GetNewID(typeof(Model.Base_ReceivingDocType));
BLL.ReceivingDocTypeService.AddReceivingDocType(model);
}
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
}
}

View File

@ -0,0 +1,98 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.BaseInfo
{
public partial class ReceivingDocTypeEdit
{
/// <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>
/// txtTypeName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTypeName;
/// <summary>
/// txtSortIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtSortIndex;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// hdCheckerId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdCheckerId;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
}
}

View File

@ -22,16 +22,42 @@
<Toolbars>
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="stxtFileCode" Label="文件号" LabelAlign="Right"></f:TextBox>
<f:TextBox ID="stxtFileName" runat="server" CssClass="textboxStyle"
<f:TextBox runat="server" ID="txtFile" Label="文件号" EmptyText="文件号、文件名称" LabelAlign="Right"></f:TextBox>
<%--<f:TextBox ID="stxtFileName" runat="server" CssClass="textboxStyle"
MaxLength="150" Label="文件名称" LabelAlign="Right">
</f:TextBox>
</f:TextBox>--%>
<f:DropDownList ID="drpFileType" runat="server" Label="文件类别" LabelAlign="Right"></f:DropDownList>
<f:DropDownList ID="drpCNProfessionalId" runat="server" Label="专业" LabelAlign="Right"></f:DropDownList>
<f:DropDownList ID="drpSendUnitId" runat="server" Label="发件单位" LabelAlign="Right">
</f:DropDownList>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnSearch" Icon="SystemSearch" OnClick="btnSearch_Click"
EnablePostBack="true" runat="server">
</f:Button>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnNew" Icon="Add" EnablePostBack="true" ToolTip="新增" Hidden="true" runat="server" OnClick="btnNew_Click">
</f:Button>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DatePicker runat="server" Label="日期" ID="txtReceiveDateStart" LabelAlign="Right"
LabelWidth="100px" Width="220px">
</f:DatePicker>
<f:Label ID="Label5" runat="server" Text="至">
</f:Label>
<f:DatePicker runat="server" ID="txtReceiveDateEnd" LabelAlign="Right" Width="110px">
</f:DatePicker>
<f:DatePicker runat="server" Label="上报日期" ID="txtSendDateStart" LabelAlign="Right"
LabelWidth="100px" Width="220px">
</f:DatePicker>
<f:Label ID="Label4" runat="server" Text="至">
</f:Label>
<f:DatePicker runat="server" ID="txtSendDateEnd" LabelAlign="Right" Width="110px">
</f:DatePicker>
<f:DropDownList ID="drpReceiveUnit" runat="server" LabelWidth="120px" Label="上报接收单位" LabelAlign="Right">
</f:DropDownList>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnImport" ToolTip="导入" Hidden="true" Icon="PackageIn" runat="server" OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
@ -82,7 +108,7 @@
</f:GroupField>
<f:GroupField ColumnID="GroupField2" runat="server" HeaderText="文件上报信息" HeaderTextAlign="Center">
<Columns>
<f:RenderField ColumnID="SendDate" DataField="SendDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="发出日期" TextAlign="Center"
<f:RenderField ColumnID="SendDate" DataField="SendDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="上报日期" TextAlign="Center"
HeaderTextAlign="Center" Width="100px">
</f:RenderField>
<f:TemplateField ColumnID="ReceiveUnit" Width="180px" HeaderText="上报接收单位" HeaderTextAlign="Center" TextAlign="Center">

View File

@ -20,6 +20,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
if (!IsPostBack)
{
BLL.UnitService.GetUnit(this.drpSendUnitId, this.CurrUser.LoginProjectId, true);//发件单位
BLL.UnitService.GetUnit(this.drpReceiveUnit, this.CurrUser.LoginProjectId, true);//接收单位
BLL.ReceivingDocTypeService.InitReceivingDocType(this.drpFileType, true);//文件类别
BLL.CNProfessionalService.InitCNProfessionalDocDownList(this.drpCNProfessionalId, true);//专业
GetButtonPower();
BindGrid();
}
@ -62,15 +66,55 @@ namespace FineUIPro.Web.CQMS.Comprehensive
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (!string.IsNullOrEmpty(this.stxtFileCode.Text.Trim()))
//if (!string.IsNullOrEmpty(this.stxtFileName.Text.Trim()))
//{
// strSql += " AND doc.FileName LIKE @stxtFileName";
// listStr.Add(new SqlParameter("@stxtFileName", "%" + stxtFileName.Text.Trim() + "%"));
//}
if (!string.IsNullOrEmpty(this.txtFile.Text.Trim()))
{
strSql += " AND doc.FileCode LIKE @stxtFileCode";
listStr.Add(new SqlParameter("@stxtFileCode", "%" + stxtFileCode.Text.Trim() + "%"));
strSql += " AND (doc.FileCode LIKE @txtFile or doc.FileName LIKE @txtFile)";
listStr.Add(new SqlParameter("@txtFile", "%" + txtFile.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.stxtFileName.Text.Trim()))
if (this.drpFileType.SelectedValue != BLL.Const._Null)
{
strSql += " AND doc.FileName LIKE @stxtFileName";
listStr.Add(new SqlParameter("@stxtFileName", "%" + stxtFileName.Text.Trim() + "%"));
strSql += " AND doc.FileType =@FileType";
listStr.Add(new SqlParameter("@FileType", drpFileType.SelectedValue));
}
if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
{
strSql += " AND doc.CNProfessionalId =@CNProfessionalId";
listStr.Add(new SqlParameter("@CNProfessionalId", drpCNProfessionalId.SelectedValue));
}
if (this.drpSendUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND doc.SendUnit = @SendUnit";
listStr.Add(new SqlParameter("@SendUnit", this.drpSendUnitId.SelectedValue));
}
if (this.drpReceiveUnit.SelectedValue != BLL.Const._Null)
{
strSql += " AND doc.ReceiveUnit like @ReceiveUnit";
listStr.Add(new SqlParameter("@ReceiveUnit", "%" + this.drpReceiveUnit.SelectedValue + "%"));
}
if (!string.IsNullOrEmpty(this.txtReceiveDateStart.Text.Trim()))
{
strSql += " AND doc.ReceiveDate >= @ReceiveDateStart";
listStr.Add(new SqlParameter("@ReceiveDateStart", Funs.GetNewDateTime(this.txtReceiveDateStart.Text.Trim())));
}
if (!string.IsNullOrEmpty(this.txtReceiveDateEnd.Text.Trim()))
{
strSql += " AND doc.ReceiveDate <= @ReceiveDateEnd";
listStr.Add(new SqlParameter("@ReceiveDateEnd", Funs.GetNewDateTime(this.txtReceiveDateEnd.Text.Trim())));
}
if (!string.IsNullOrEmpty(txtSendDateStart.Text.Trim()))
{
strSql += " AND doc.SendDate >= @SendDateStart";
listStr.Add(new SqlParameter("@SendDateStart", Funs.GetNewDateTime(txtSendDateStart.Text.Trim())));
}
if (!string.IsNullOrEmpty(txtSendDateEnd.Text.Trim()))
{
strSql += " AND doc.SendDate <= @SendDateEnd";
listStr.Add(new SqlParameter("@SendDateEnd", Funs.GetNewDateTime(txtSendDateEnd.Text.Trim())));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@ -339,14 +383,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var lists = (from x in Funs.DB.Comprehensive_DataReceivingDoc
where x.ProjectId == this.CurrUser.LoginProjectId
select x);
if (!string.IsNullOrEmpty(this.stxtFileCode.Text.Trim()))
if (!string.IsNullOrEmpty(this.txtFile.Text.Trim()))
{
lists = lists.Where(x => x.FileCode.Contains(stxtFileCode.Text.Trim()));
}
if (!string.IsNullOrEmpty(this.stxtFileName.Text.Trim()))
{
lists = lists.Where(x => x.FileName.Contains(this.stxtFileName.Text.Trim()));
lists = lists.Where(x => x.FileCode.Contains(txtFile.Text.Trim()) || x.FileName.Contains(txtFile.Text.Trim()));
}
//if (!string.IsNullOrEmpty(this.stxtFileName.Text.Trim()))
//{
// lists = lists.Where(x => x.FileName.Contains(this.stxtFileName.Text.Trim()));
//}
lists = lists.OrderBy(x => x.RemarkCode);
if (lists != null)
{

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.Comprehensive {
namespace FineUIPro.Web.CQMS.Comprehensive
{
public partial class DataReceivingDoc {
public partial class DataReceivingDoc
{
/// <summary>
/// form1 控件。
@ -58,22 +60,40 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
protected global::FineUIPro.Toolbar ToolSearch;
/// <summary>
/// stxtFileCode 控件。
/// txtFile 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox stxtFileCode;
protected global::FineUIPro.TextBox txtFile;
/// <summary>
/// stxtFileName 控件。
/// drpFileType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox stxtFileName;
protected global::FineUIPro.DropDownList drpFileType;
/// <summary>
/// drpCNProfessionalId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCNProfessionalId;
/// <summary>
/// drpSendUnitId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpSendUnitId;
/// <summary>
/// btnSearch 控件。
@ -93,6 +113,78 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtReceiveDateStart 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtReceiveDateStart;
/// <summary>
/// Label5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label5;
/// <summary>
/// txtReceiveDateEnd 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtReceiveDateEnd;
/// <summary>
/// txtSendDateStart 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtSendDateStart;
/// <summary>
/// Label4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label4;
/// <summary>
/// txtSendDateEnd 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtSendDateEnd;
/// <summary>
/// drpReceiveUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpReceiveUnit;
/// <summary>
/// btnImport 控件。
/// </summary>

View File

@ -323,6 +323,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
select x;
var cns = from x in Funs.DB.Base_CNProfessional select x;
var docType = from x in Funs.DB.Base_ReceivingDocType select x;
var dataInTemp = from x in Funs.DB.Sys_CQMS_DataInTemp
where x.ProjectId == LoginProjectId && x.UserId == UserId && x.Type == "DataReceivingDoc"
@ -370,7 +371,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
if (!string.IsNullOrEmpty(tempData.Value4.Trim()))
{
Ins.FileType = tempData.Value4.Trim();
//Ins.FileType = tempData.Value4.Trim();
var dType = docType.Where(x => x.TypeName == tempData.Value4.Trim()).FirstOrDefault();
if (dType == null)
{
errInfo += "文件类别[" + tempData.Value4.Trim() + "]不存在;";
}
else
{
Ins.FileType = dType.TypeName;
}
}
else
{

View File

@ -29,8 +29,9 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtFileType" Label="文件类别" runat="server" LabelAlign="Right" LabelWidth="130px" Required="true" ShowRedStar="true">
</f:TextBox>
<%--<f:TextBox ID="txtFileType" Label="文件类别" runat="server" LabelAlign="Right" LabelWidth="130px" Required="true" ShowRedStar="true">
</f:TextBox>--%>
<f:DropDownList ID="drpFileType" runat="server" Label="文件类别" LabelAlign="Right" LabelWidth="130px" Required="true" ShowRedStar="true" EnableEdit="true" ForceSelection="false" AutoSelectFirstItem="false"></f:DropDownList>
<f:DropDownList ID="drpCNProfessionalId" runat="server" Label="专业" LabelAlign="Right" LabelWidth="130px" Required="true" ShowRedStar="true"></f:DropDownList>
<%--<f:DropDownList ID="drpSendUnit" runat="server" Label="发件单位" EnableCheckBoxSelect="true" EnableMultiSelect="true" AutoSelectFirstItem="false" LabelAlign="Right" LabelWidth="130px"></f:DropDownList>--%>
<f:DropDownList ID="drpSendUnitId" runat="server" Label="发件单位" LabelAlign="Right" LabelWidth="130px" ShowRedStar="true" Required="true"></f:DropDownList>

View File

@ -1,5 +1,7 @@
using BLL;
using FineUIPro.Web.OfficeCheck.Check;
using System;
using System.EnterpriseServices.CompensatingResourceManager;
using System.Linq;
using System.Web.UI.WebControls;
@ -55,7 +57,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtFileCode.Readonly = true;
this.txtFileName.Readonly = true;
this.txtReceiveDate.Readonly = true;
this.txtFileType.Readonly = true;
//this.txtFileType.Readonly = true;
this.drpFileType.Readonly = true;
this.drpCNProfessionalId.Readonly = true;
//this.drpSendUnit.Readonly = true;
this.drpSendUnitId.Readonly = true;
@ -92,6 +95,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
BLL.UnitService.GetUnit(this.drpSendUnitId, this.CurrUser.LoginProjectId, false);//发件单位
BLL.UnitService.GetUnit(this.drpReceiveUnit, this.CurrUser.LoginProjectId, false);//接收单位
BLL.UnitService.GetUnit(this.drpIssueToUnit, this.CurrUser.LoginProjectId, false);//下发至单位
BLL.ReceivingDocTypeService.InitReceivingDocType(this.drpFileType, false);//文件类别
BLL.CNProfessionalService.InitCNProfessionalDocDownList(this.drpCNProfessionalId, true);//专业
//LoadAuditSelect();
//this.agree.Hidden = true;
@ -100,33 +104,47 @@ namespace FineUIPro.Web.CQMS.Comprehensive
//this.btnSave.Hidden = true;
//this.btnSubmit.Hidden = true;
this.DataReceivingDocId = Request.Params["DataReceivingDocId"];
Model.Comprehensive_DataReceivingDoc dataReceivingDoc = BLL.DataReceivingDocService.GetDataReceivingDocById(this.DataReceivingDocId);
if (dataReceivingDoc != null)
Model.Comprehensive_DataReceivingDoc model = BLL.DataReceivingDocService.GetDataReceivingDocById(this.DataReceivingDocId);
if (model != null)
{
//this.hdAttachUrl.Text = this.DataReceivingDocId;
this.txtFileCode.Text = dataReceivingDoc.FileCode;
this.txtFileName.Text = dataReceivingDoc.FileName;
this.txtReceiveDate.Text = dataReceivingDoc.ReceiveDate.HasValue ? string.Format("{0:yyyy-MM-dd}", dataReceivingDoc.ReceiveDate) : "";
this.txtFileType.Text = dataReceivingDoc.FileType;
if (!string.IsNullOrEmpty(dataReceivingDoc.SendUnit))
this.txtFileCode.Text = model.FileCode;
this.txtFileName.Text = model.FileName;
this.txtReceiveDate.Text = model.ReceiveDate.HasValue ? string.Format("{0:yyyy-MM-dd}", model.ReceiveDate) : "";
//this.txtFileType.Text = model.FileType;
if (!string.IsNullOrWhiteSpace(model.FileType))
{
//this.drpSendUnit.SelectedValueArray = dataReceivingDoc.SendUnit.Split(',');
this.drpSendUnitId.SelectedValue = dataReceivingDoc.SendUnit;
}
if (!string.IsNullOrEmpty(dataReceivingDoc.CNProfessionalId))
bool containsValue = drpFileType.Items.FindByValue(model.FileType) != null;
if (containsValue)
{
this.drpCNProfessionalId.SelectedValue = dataReceivingDoc.CNProfessionalId;
// 存在指定的值
this.drpFileType.SelectedValue = model.FileType;
}
this.txtCopies.Text = dataReceivingDoc.Copies.HasValue ? dataReceivingDoc.Copies.ToString() : "";
this.txtSendMan.Text = dataReceivingDoc.SendMan;
this.txtDocumentHandler.Text = dataReceivingDoc.DocumentHandler;
this.txtSendDate.Text = dataReceivingDoc.SendDate.HasValue ? string.Format("{0:yyyy-MM-dd}", dataReceivingDoc.SendDate) : "";
if (!string.IsNullOrEmpty(dataReceivingDoc.ReceiveUnit))
else
{
this.drpReceiveUnit.SelectedValueArray = dataReceivingDoc.ReceiveUnit.Split(',');
// 不存在指定的值
this.drpFileType.Text = model.FileType;
}
this.txtReceiveMan.Text = dataReceivingDoc.ReceiveMan;
if (dataReceivingDoc.IsReply == true)
}
if (!string.IsNullOrEmpty(model.SendUnit))
{
//this.drpSendUnit.SelectedValueArray = model.SendUnit.Split(',');
this.drpSendUnitId.SelectedValue = model.SendUnit;
}
if (!string.IsNullOrEmpty(model.CNProfessionalId))
{
this.drpCNProfessionalId.SelectedValue = model.CNProfessionalId;
}
this.txtCopies.Text = model.Copies.HasValue ? model.Copies.ToString() : "";
this.txtSendMan.Text = model.SendMan;
this.txtDocumentHandler.Text = model.DocumentHandler;
this.txtSendDate.Text = model.SendDate.HasValue ? string.Format("{0:yyyy-MM-dd}", model.SendDate) : "";
if (!string.IsNullOrEmpty(model.ReceiveUnit))
{
this.drpReceiveUnit.SelectedValueArray = model.ReceiveUnit.Split(',');
}
this.txtReceiveMan.Text = model.ReceiveMan;
if (model.IsReply == true)
{
this.rblIsReply.SelectedValue = "true";
}
@ -134,17 +152,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
this.rblIsReply.SelectedValue = "false";
}
this.txtReturnWuhuangDate.Text = dataReceivingDoc.ReturnWuhuangDate.HasValue ? string.Format("{0:yyyy-MM-dd}", dataReceivingDoc.ReturnWuhuangDate) : "";
this.txtRetrunWuhuangCopies.Text = dataReceivingDoc.RetrunWuhuangCopies.HasValue ? dataReceivingDoc.RetrunWuhuangCopies.ToString() : "";
if (!string.IsNullOrEmpty(dataReceivingDoc.IssueToUnit))
this.txtReturnWuhuangDate.Text = model.ReturnWuhuangDate.HasValue ? string.Format("{0:yyyy-MM-dd}", model.ReturnWuhuangDate) : "";
this.txtRetrunWuhuangCopies.Text = model.RetrunWuhuangCopies.HasValue ? model.RetrunWuhuangCopies.ToString() : "";
if (!string.IsNullOrEmpty(model.IssueToUnit))
{
this.drpIssueToUnit.SelectedValueArray = dataReceivingDoc.IssueToUnit.Split(',');
this.drpIssueToUnit.SelectedValueArray = model.IssueToUnit.Split(',');
}
this.txtIssueCopies.Text = dataReceivingDoc.IssueCopies.HasValue ? dataReceivingDoc.IssueCopies.ToString() : "";
this.txtIssueUnitReceiver.Text = dataReceivingDoc.IssueUnitReceiver;
if (dataReceivingDoc.IsOnFile.HasValue)
this.txtIssueCopies.Text = model.IssueCopies.HasValue ? model.IssueCopies.ToString() : "";
this.txtIssueUnitReceiver.Text = model.IssueUnitReceiver;
if (model.IsOnFile.HasValue)
{
if (dataReceivingDoc.IsOnFile == true)
if (model.IsOnFile == true)
{
this.rblIsOnFile.SelectedValue = "true";
}
@ -153,13 +171,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.rblIsOnFile.SelectedValue = "false";
}
}
this.txtRemarkCode.Text = dataReceivingDoc.RemarkCode.HasValue ? dataReceivingDoc.RemarkCode.ToString() : "";
this.txtRemarkCode.Text = model.RemarkCode.HasValue ? model.RemarkCode.ToString() : "";
//var currApprove = DataReceivingDocApproveService.GetCurrentApprove(dataReceivingDoc.DataReceivingDocId);
//var currApprove = DataReceivingDocApproveService.GetCurrentApprove(model.DataReceivingDocId);
//if (currApprove != null)
//{ //重新编制 编制人 可以 显示 提交 保存按钮
// this.drpAudit.SelectedValue = currApprove.ApproveMan;
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && dataReceivingDoc.CompileMan == CurrUser.UserId)
// if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && model.CompileMan == CurrUser.UserId)
// {
// this.btnSubmit.Hidden = false;
// this.btnSave.Hidden = false;
@ -177,7 +195,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
//}//没有当前审核人,已完成状态 或者 待提交状态
//else
//{
// if (dataReceivingDoc.Status == BLL.Const.Comprehensive_Compile && dataReceivingDoc.CompileMan == CurrUser.UserId)
// if (model.Status == BLL.Const.Comprehensive_Compile && model.CompileMan == CurrUser.UserId)
// {
// this.btnSubmit.Hidden = false;
// this.btnSave.Hidden = false;
@ -202,30 +220,44 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (drpSendUnitId.SelectedValue==BLL.Const._Null)
if (drpSendUnitId.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择发件单位!", MessageBoxIcon.Warning);
return;
}
if ((string.IsNullOrWhiteSpace(drpFileType.Text) && string.IsNullOrWhiteSpace(drpFileType.SelectedValue)) || drpFileType.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择文件类别!", MessageBoxIcon.Warning);
return;
}
if (drpCNProfessionalId.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DataReceivingDocId != this.DataReceivingDocId || (this.DataReceivingDocId == null && x.DataReceivingDocId != null)));
var q = Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DataReceivingDocId != this.DataReceivingDocId || (this.DataReceivingDocId == null && x.DataReceivingDocId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
return;
}
Model.Comprehensive_DataReceivingDoc dataReceivingDoc = new Model.Comprehensive_DataReceivingDoc();
dataReceivingDoc.ProjectId = this.CurrUser.LoginProjectId;
dataReceivingDoc.FileCode = this.txtFileCode.Text.Trim();
dataReceivingDoc.FileName = this.txtFileName.Text.Trim();
dataReceivingDoc.ReceiveDate = Funs.GetNewDateTime(this.txtReceiveDate.Text.Trim());
dataReceivingDoc.FileType = this.txtFileType.Text.Trim();
dataReceivingDoc.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
Model.Comprehensive_DataReceivingDoc model = new Model.Comprehensive_DataReceivingDoc();
model.ProjectId = this.CurrUser.LoginProjectId;
model.FileCode = this.txtFileCode.Text.Trim();
model.FileName = this.txtFileName.Text.Trim();
model.ReceiveDate = Funs.GetNewDateTime(this.txtReceiveDate.Text.Trim());
//model.FileType = this.txtFileType.Text.Trim();
//model.FileType = this.drpFileType.SelectedValue;
if (this.drpFileType.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpFileType.SelectedValue))
{
model.FileType = this.drpFileType.SelectedValue;
}
else
{
model.FileType = this.drpFileType.Text;
}
model.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
//string unitIds = string.Empty;
//var unitList = this.drpSendUnit.SelectedValueArray;
//foreach (var item in unitList)
@ -236,12 +268,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
//{
// unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
//}
//dataReceivingDoc.SendUnit = unitIds;
dataReceivingDoc.SendUnit = this.drpSendUnitId.SelectedValue;
dataReceivingDoc.SendMan = this.txtSendMan.Text.Trim();
dataReceivingDoc.Copies = Funs.GetNewInt(this.txtCopies.Text.Trim());
dataReceivingDoc.DocumentHandler = this.txtDocumentHandler.Text.Trim();
dataReceivingDoc.SendDate = Funs.GetNewDateTime(this.txtSendDate.Text);
//model.SendUnit = unitIds;
model.SendUnit = this.drpSendUnitId.SelectedValue;
model.SendMan = this.txtSendMan.Text.Trim();
model.Copies = Funs.GetNewInt(this.txtCopies.Text.Trim());
model.DocumentHandler = this.txtDocumentHandler.Text.Trim();
model.SendDate = Funs.GetNewDateTime(this.txtSendDate.Text);
string receivingUnits = string.Empty;
var receivingUnitList = this.drpReceiveUnit.SelectedValueArray;
foreach (var item in receivingUnitList)
@ -252,11 +284,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
receivingUnits = receivingUnits.Substring(0, receivingUnits.LastIndexOf(","));
}
dataReceivingDoc.ReceiveUnit = receivingUnits;
dataReceivingDoc.ReceiveMan = this.txtReceiveMan.Text.Trim();
dataReceivingDoc.IsReply = Convert.ToBoolean(this.rblIsReply.SelectedValue);
dataReceivingDoc.ReturnWuhuangDate = Funs.GetNewDateTime(this.txtReturnWuhuangDate.Text.Trim());
dataReceivingDoc.RetrunWuhuangCopies = Funs.GetNewInt(this.txtRetrunWuhuangCopies.Text.Trim());
model.ReceiveUnit = receivingUnits;
model.ReceiveMan = this.txtReceiveMan.Text.Trim();
model.IsReply = Convert.ToBoolean(this.rblIsReply.SelectedValue);
model.ReturnWuhuangDate = Funs.GetNewDateTime(this.txtReturnWuhuangDate.Text.Trim());
model.RetrunWuhuangCopies = Funs.GetNewInt(this.txtRetrunWuhuangCopies.Text.Trim());
string issueToUnits = string.Empty;
var issueToUnitLists = this.drpIssueToUnit.SelectedValueArray;
foreach (var item in issueToUnitLists)
@ -267,53 +299,53 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
issueToUnits = issueToUnits.Substring(0, issueToUnits.LastIndexOf(","));
}
dataReceivingDoc.IssueToUnit = issueToUnits;
dataReceivingDoc.IssueCopies = Funs.GetNewInt(this.txtIssueCopies.Text.Trim());
dataReceivingDoc.IssueUnitReceiver = this.txtIssueUnitReceiver.Text.Trim();
model.IssueToUnit = issueToUnits;
model.IssueCopies = Funs.GetNewInt(this.txtIssueCopies.Text.Trim());
model.IssueUnitReceiver = this.txtIssueUnitReceiver.Text.Trim();
if (!string.IsNullOrEmpty(this.rblIsOnFile.SelectedValue))
{
dataReceivingDoc.IsOnFile = Convert.ToBoolean(this.rblIsOnFile.SelectedValue);
model.IsOnFile = Convert.ToBoolean(this.rblIsOnFile.SelectedValue);
}
dataReceivingDoc.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
model.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
//if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
//{
// dataReceivingDoc.AuditMan = drpAudit.SelectedValue;
// model.AuditMan = drpAudit.SelectedValue;
//} //审核人
if (string.IsNullOrEmpty(this.DataReceivingDocId))
{
//if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
//{
// dataReceivingDoc.DataReceivingDocId = this.hdAttachUrl.Text;
// model.DataReceivingDocId = this.hdAttachUrl.Text;
//}
//else
//{
dataReceivingDoc.DataReceivingDocId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceivingDoc));
//this.hdAttachUrl.Text = dataReceivingDoc.DataReceivingDocId;
model.DataReceivingDocId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceivingDoc));
//this.hdAttachUrl.Text = model.DataReceivingDocId;
//}
//var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == dataReceivingDoc.DataReceivingDocId);
//var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == model.DataReceivingDocId);
//if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
//{
// Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
// return;
//}
dataReceivingDoc.CompileMan = this.CurrUser.UserId;
dataReceivingDoc.CompileDate = DateTime.Now;
//dataReceivingDoc.Status = BLL.Const.Comprehensive_Compile;
dataReceivingDoc.DataReceivingDocId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceivingDoc));
BLL.DataReceivingDocService.AddDataReceivingDoc(dataReceivingDoc);
model.CompileMan = this.CurrUser.UserId;
model.CompileDate = DateTime.Now;
//model.Status = BLL.Const.Comprehensive_Compile;
model.DataReceivingDocId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceivingDoc));
BLL.DataReceivingDocService.AddDataReceivingDoc(model);
}
else
{
dataReceivingDoc.DataReceivingDocId = this.DataReceivingDocId;
model.DataReceivingDocId = this.DataReceivingDocId;
//var model = Funs.DB.Comprehensive_DataReceivingDoc.Where(u => u.DataReceivingDocId == this.DataReceivingDocId).FirstOrDefault();
//if (model != null)
//{
// dataReceivingDoc.Status = model.Status;
// model.Status = model.Status;
//}
//else
//{
// dataReceivingDoc.Status = BLL.Const.Comprehensive_Compile;
// model.Status = BLL.Const.Comprehensive_Compile;
//}
//var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.DataReceivingDocId);
//if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
@ -321,7 +353,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
// Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
// return;
//}
BLL.DataReceivingDocService.UpdateDataReceivingDoc(dataReceivingDoc);
BLL.DataReceivingDocService.UpdateDataReceivingDoc(model);
}
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
@ -339,13 +371,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
// Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
// return;
// }
// Model.Comprehensive_DataReceivingDoc dataReceivingDoc = new Model.Comprehensive_DataReceivingDoc();
// dataReceivingDoc.ProjectId = this.CurrUser.LoginProjectId;
// dataReceivingDoc.FileCode = this.txtFileCode.Text.Trim();
// dataReceivingDoc.FileName = this.txtFileName.Text.Trim();
// dataReceivingDoc.ReceiveDate = Funs.GetNewDateTime(this.txtReceiveDate.Text.Trim());
// dataReceivingDoc.FileType = this.txtFileType.Text.Trim();
// dataReceivingDoc.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
// Model.Comprehensive_DataReceivingDoc model = new Model.Comprehensive_DataReceivingDoc();
// model.ProjectId = this.CurrUser.LoginProjectId;
// model.FileCode = this.txtFileCode.Text.Trim();
// model.FileName = this.txtFileName.Text.Trim();
// model.ReceiveDate = Funs.GetNewDateTime(this.txtReceiveDate.Text.Trim());
// model.FileType = this.txtFileType.Text.Trim();
// model.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
// //string unitIds = string.Empty;
// //var unitList = this.drpSendUnit.SelectedValueArray;
// //foreach (var item in unitList)
@ -356,11 +388,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
// //{
// // unitIds = unitIds.Substring(0, unitIds.LastIndexOf(","));
// //}
// dataReceivingDoc.SendUnit = drpSendUnitId.SelectedValue;
// dataReceivingDoc.SendMan = this.txtSendMan.Text.Trim();
// dataReceivingDoc.Copies = Funs.GetNewInt(this.txtCopies.Text.Trim());
// dataReceivingDoc.DocumentHandler = this.txtDocumentHandler.Text.Trim();
// dataReceivingDoc.SendDate = Funs.GetNewDateTime(this.txtSendDate.Text);
// model.SendUnit = drpSendUnitId.SelectedValue;
// model.SendMan = this.txtSendMan.Text.Trim();
// model.Copies = Funs.GetNewInt(this.txtCopies.Text.Trim());
// model.DocumentHandler = this.txtDocumentHandler.Text.Trim();
// model.SendDate = Funs.GetNewDateTime(this.txtSendDate.Text);
// string receivingUnits = string.Empty;
// var receivingUnitList = this.drpReceiveUnit.SelectedValueArray;
// foreach (var item in receivingUnitList)
@ -371,11 +403,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
// {
// receivingUnits = receivingUnits.Substring(0, receivingUnits.LastIndexOf(","));
// }
// dataReceivingDoc.ReceiveUnit = receivingUnits;
// dataReceivingDoc.ReceiveMan = this.txtReceiveMan.Text.Trim();
// dataReceivingDoc.IsReply = Convert.ToBoolean(this.rblIsReply.SelectedValue);
// dataReceivingDoc.ReturnWuhuangDate = Funs.GetNewDateTime(this.txtReturnWuhuangDate.Text.Trim());
// dataReceivingDoc.RetrunWuhuangCopies = Funs.GetNewInt(this.txtRetrunWuhuangCopies.Text.Trim());
// model.ReceiveUnit = receivingUnits;
// model.ReceiveMan = this.txtReceiveMan.Text.Trim();
// model.IsReply = Convert.ToBoolean(this.rblIsReply.SelectedValue);
// model.ReturnWuhuangDate = Funs.GetNewDateTime(this.txtReturnWuhuangDate.Text.Trim());
// model.RetrunWuhuangCopies = Funs.GetNewInt(this.txtRetrunWuhuangCopies.Text.Trim());
// string issueToUnits = string.Empty;
// var issueToUnitLists = this.drpIssueToUnit.SelectedValueArray;
// foreach (var item in issueToUnitLists)
@ -386,40 +418,40 @@ namespace FineUIPro.Web.CQMS.Comprehensive
// {
// issueToUnits = issueToUnits.Substring(0, issueToUnits.LastIndexOf(","));
// }
// dataReceivingDoc.IssueToUnit = issueToUnits;
// dataReceivingDoc.IssueCopies = Funs.GetNewInt(this.txtIssueCopies.Text.Trim());
// dataReceivingDoc.IssueUnitReceiver = this.txtIssueUnitReceiver.Text.Trim();
// dataReceivingDoc.IsOnFile = Convert.ToBoolean(this.rblIsOnFile.SelectedValue);
// model.IssueToUnit = issueToUnits;
// model.IssueCopies = Funs.GetNewInt(this.txtIssueCopies.Text.Trim());
// model.IssueUnitReceiver = this.txtIssueUnitReceiver.Text.Trim();
// model.IsOnFile = Convert.ToBoolean(this.rblIsOnFile.SelectedValue);
// if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
// {
// dataReceivingDoc.AuditMan = drpAudit.SelectedValue;
// model.AuditMan = drpAudit.SelectedValue;
// } //审核人
// if (string.IsNullOrEmpty(this.DataReceivingDocId))
// {
// if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
// {
// dataReceivingDoc.DataReceivingDocId = this.hdAttachUrl.Text;
// model.DataReceivingDocId = this.hdAttachUrl.Text;
// }
// else
// {
// dataReceivingDoc.DataReceivingDocId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceivingDoc));
// this.hdAttachUrl.Text = dataReceivingDoc.DataReceivingDocId;
// model.DataReceivingDocId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceivingDoc));
// this.hdAttachUrl.Text = model.DataReceivingDocId;
// }
// var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == dataReceivingDoc.DataReceivingDocId);
// var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == model.DataReceivingDocId);
// if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
// {
// Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
// return;
// }
// dataReceivingDoc.CompileMan = this.CurrUser.UserId;
// dataReceivingDoc.CompileDate = DateTime.Now;
// dataReceivingDoc.Status = BLL.Const.Comprehensive_Audit;
// BLL.DataReceivingDocService.AddDataReceivingDoc(dataReceivingDoc);
// model.CompileMan = this.CurrUser.UserId;
// model.CompileDate = DateTime.Now;
// model.Status = BLL.Const.Comprehensive_Audit;
// BLL.DataReceivingDocService.AddDataReceivingDoc(model);
// }
// else
// {
// dataReceivingDoc.DataReceivingDocId = this.DataReceivingDocId;
// model.DataReceivingDocId = this.DataReceivingDocId;
// var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.DataReceivingDocId);
// if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
// {
@ -430,38 +462,38 @@ namespace FineUIPro.Web.CQMS.Comprehensive
// if (model.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核
// {
// dataReceivingDoc.Status = BLL.Const.Comprehensive_Audit;
// model.Status = BLL.Const.Comprehensive_Audit;
// }
// else if (model.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核
// {
// dataReceivingDoc.Status = BLL.Const.Comprehensive_Audit;
// model.Status = BLL.Const.Comprehensive_Audit;
// }
// else //审核状态 提交 变 完成 或者 重新编制
// {
// if (Convert.ToBoolean(rblIsAgree.SelectedValue))
// {
// dataReceivingDoc.Status = BLL.Const.Comprehensive_Complete;
// model.Status = BLL.Const.Comprehensive_Complete;
// }
// else
// {
// dataReceivingDoc.Status = BLL.Const.Comprehensive_ReCompile;
// model.Status = BLL.Const.Comprehensive_ReCompile;
// }
// }
// BLL.DataReceivingDocService.UpdateDataReceivingDoc(dataReceivingDoc);
// BLL.DataReceivingDocService.UpdateDataReceivingDoc(model);
// }
// #region 审核记录
// var currApprove = DataReceivingDocApproveService.GetCurrentApprove(dataReceivingDoc.DataReceivingDocId);
// var currApprove = DataReceivingDocApproveService.GetCurrentApprove(model.DataReceivingDocId);
// if (currApprove == null) //为获取到为 当前编制状态 直接提交
// {
// var approve = new Model.Comprehensive_DataReceivingDocApprove();
// approve.DataReceivingDocId = dataReceivingDoc.DataReceivingDocId;
// approve.DataReceivingDocId = model.DataReceivingDocId;
// approve.ApproveMan = this.CurrUser.UserId;
// approve.ApproveType = Const.Comprehensive_Compile;
// approve.ApproveDate = DateTime.Now;
// DataReceivingDocApproveService.EditApprove(approve); //新增编制记录
// Model.Comprehensive_DataReceivingDocApprove newApprove = new Model.Comprehensive_DataReceivingDocApprove();
// newApprove.DataReceivingDocId = dataReceivingDoc.DataReceivingDocId;
// newApprove.DataReceivingDocId = model.DataReceivingDocId;
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
// newApprove.ApproveType = Const.InspectionManagement_Audit;
// DataReceivingDocApproveService.EditApprove(newApprove); //新增专业工程师审核记录
@ -473,7 +505,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
// currApprove.ApproveDate = DateTime.Now;
// DataReceivingDocApproveService.EditApprove(currApprove); //新增专业工程师审核记录
// Model.Comprehensive_DataReceivingDocApprove newApprove = new Model.Comprehensive_DataReceivingDocApprove();
// newApprove.DataReceivingDocId = dataReceivingDoc.DataReceivingDocId;
// newApprove.DataReceivingDocId = model.DataReceivingDocId;
// newApprove.ApproveMan = this.drpAudit.SelectedValue;
// newApprove.ApproveType = Const.InspectionManagement_Audit;
// DataReceivingDocApproveService.EditApprove(newApprove); //新增专业工程师审核记录
@ -499,7 +531,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
// {
// Model.Comprehensive_DataReceivingDocApprove reApprove = new Model.Comprehensive_DataReceivingDocApprove();
// reApprove.DataReceivingDocId = currApprove.DataReceivingDocId;
// reApprove.ApproveMan = dataReceivingDoc.CompileMan;
// reApprove.ApproveMan = model.CompileMan;
// reApprove.ApproveType = Const.Comprehensive_ReCompile;
// DataReceivingDocApproveService.EditApprove(reApprove);
// }
@ -522,9 +554,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
// {
// this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceivingDoc));
// }
// var dataReceivingDoc = BLL.DataReceivingDocService.GetDataReceivingDocById(this.DataReceivingDocId);
// var model = BLL.DataReceivingDocService.GetDataReceivingDocById(this.DataReceivingDocId);
// if (dataReceivingDoc == null || ((dataReceivingDoc.CompileMan == CurrUser.UserId && dataReceivingDoc.Status == BLL.Const.Comprehensive_Compile) || (dataReceivingDoc.CompileMan == CurrUser.UserId && dataReceivingDoc.Status == BLL.Const.Comprehensive_ReCompile)))
// if (model == null || ((model.CompileMan == CurrUser.UserId && model.Status == BLL.Const.Comprehensive_Compile) || (model.CompileMan == CurrUser.UserId && model.Status == BLL.Const.Comprehensive_ReCompile)))
// {
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/DataReceivingDoc&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DataReceivingDocMenuId)));
// }

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.Comprehensive {
namespace FineUIPro.Web.CQMS.Comprehensive
{
public partial class DataReceivingDocEdit {
public partial class DataReceivingDocEdit
{
/// <summary>
/// form1 控件。
@ -76,13 +78,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
protected global::FineUIPro.DatePicker txtReceiveDate;
/// <summary>
/// txtFileType 控件。
/// drpFileType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtFileType;
protected global::FineUIPro.DropDownList drpFileType;
/// <summary>
/// drpCNProfessionalId 控件。

View File

@ -257,6 +257,8 @@
<Content Include="BaseInfo\PostTitle.aspx" />
<Content Include="BaseInfo\PracticeCertificate.aspx" />
<Content Include="BaseInfo\ProjectType.aspx" />
<Content Include="BaseInfo\ReceivingDocTypeEdit.aspx" />
<Content Include="BaseInfo\ReceivingDocType.aspx" />
<Content Include="BaseInfo\QualityQuestionType.aspx" />
<Content Include="BaseInfo\QualityQuestionTypeEdit.aspx" />
<Content Include="BaseInfo\QualityQuestionTypeView.aspx" />
@ -6779,6 +6781,20 @@
<Compile Include="BaseInfo\ProjectType.aspx.designer.cs">
<DependentUpon>ProjectType.aspx</DependentUpon>
</Compile>
<Compile Include="BaseInfo\ReceivingDocTypeEdit.aspx.cs">
<DependentUpon>ReceivingDocTypeEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="BaseInfo\ReceivingDocTypeEdit.aspx.designer.cs">
<DependentUpon>ReceivingDocTypeEdit.aspx</DependentUpon>
</Compile>
<Compile Include="BaseInfo\ReceivingDocType.aspx.cs">
<DependentUpon>ReceivingDocType.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="BaseInfo\ReceivingDocType.aspx.designer.cs">
<DependentUpon>ReceivingDocType.aspx</DependentUpon>
</Compile>
<Compile Include="BaseInfo\QualityQuestionType.aspx.cs">
<DependentUpon>QualityQuestionType.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -7,6 +7,9 @@
<TreeNode id="2231022B-3519-42FC-A2E6-1DB9A98039DD" Text="角色授权" NavigateUrl="SysManage/RolePower.aspx"></TreeNode>
<TreeNode id="E6F0167E-B0FD-4A32-9C47-25FB9E0FDC4E" Text="用户信息" NavigateUrl="SysManage/UserList.aspx"></TreeNode>
<TreeNode id="E4BFDCFD-2B1F-49C5-B02B-1C91BFFAAC6E" Text="环境设置" NavigateUrl="SysManage/SysConstSet.aspx"></TreeNode>
<TreeNode id="F32D79E1-7116-45F2-9964-3F6CB243C403" Text="安全数据统计" NavigateUrl="ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSE.aspx"></TreeNode>
<TreeNode id="7AF59776-21CD-4B6A-A765-2F888E4AF8BD" Text="质量数据统计" NavigateUrl="ZHGL/DataSync/ProjectDataSync/Project_CQMSData_CQMS.aspx"></TreeNode>
<TreeNode id="8358C2EE-2B65-4001-AC09-32B6936AA3CA" Text="焊接数据统计" NavigateUrl="ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGL.aspx"></TreeNode>
</TreeNode>
<TreeNode id="D363BD9D-4DEC-45D8-89C8-B0E49DEF61B4" Text="基础设置" NavigateUrl=""><TreeNode id="5196A6FD-4BF1-46B3-8D24-9A3CE5BB4760" Text="公共设置" NavigateUrl=""><TreeNode id="AEB427BD-AE1A-47CC-9337-368BB06B37F7" Text="项目类型定义" NavigateUrl="BaseInfo/ProjectType.aspx"></TreeNode>
<TreeNode id="685F1E0D-987E-491C-9DC7-014098DEE0C3" Text="单位类型定义" NavigateUrl="BaseInfo/UnitType.aspx"></TreeNode>
@ -31,6 +34,7 @@
<TreeNode id="A93BA810-3511-4BB2-9C10-9663351DF79F" Text="质量设置" NavigateUrl=""><TreeNode id="24F9A1ED-0F4C-407C-8EB3-2A8711BB6ECC" Text="质量问题类别定义" NavigateUrl="BaseInfo/QualityQuestionType.aspx"></TreeNode>
<TreeNode id="D00A978A-DDEE-4BFF-8872-FFF65A7BC0BC" Text="施工专业定义" NavigateUrl="BaseInfo/CNProfessional.aspx"></TreeNode>
<TreeNode id="BADDFC6A-F0E2-4443-A98D-12439C4A2F16" Text="设计专业定义" NavigateUrl="BaseInfo/DesignProfessional.aspx"></TreeNode>
<TreeNode id="DFE17AE1-F23D-4EE2-8F82-116F16E433DF" Text="资料收发文类别" NavigateUrl="BaseInfo/ReceivingDocType.aspx"></TreeNode>
</TreeNode>
<TreeNode id="8A2CEE72-2793-49C6-9E2E-E83B2676E2DD" Text="安全设置" NavigateUrl=""><TreeNode id="D4FC3583-31A7-49B3-8F32-007E9756D678" Text="岗位信息" NavigateUrl="BaseInfo/WorkPost.aspx"></TreeNode>
<TreeNode id="3A40AF0B-C9B8-4AF9-A683-FEADD8CC3A1C" Text="特岗证书定义" NavigateUrl="BaseInfo/Certificate.aspx"></TreeNode>

View File

@ -203,6 +203,9 @@ namespace Model
partial void InsertBase_QuestionType(Base_QuestionType instance);
partial void UpdateBase_QuestionType(Base_QuestionType instance);
partial void DeleteBase_QuestionType(Base_QuestionType instance);
partial void InsertBase_ReceivingDocType(Base_ReceivingDocType instance);
partial void UpdateBase_ReceivingDocType(Base_ReceivingDocType instance);
partial void DeleteBase_ReceivingDocType(Base_ReceivingDocType instance);
partial void InsertBase_RiskLevel(Base_RiskLevel instance);
partial void UpdateBase_RiskLevel(Base_RiskLevel instance);
partial void DeleteBase_RiskLevel(Base_RiskLevel instance);
@ -3324,6 +3327,14 @@ namespace Model
}
}
public System.Data.Linq.Table<Base_ReceivingDocType> Base_ReceivingDocType
{
get
{
return this.GetTable<Base_ReceivingDocType>();
}
}
public System.Data.Linq.Table<Base_RiskLevel> Base_RiskLevel
{
get
@ -37814,6 +37825,116 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_ReceivingDocType")]
public partial class Base_ReceivingDocType : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private string _TypeId;
private string _TypeName;
private System.Nullable<int> _SortIndex;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnTypeIdChanging(string value);
partial void OnTypeIdChanged();
partial void OnTypeNameChanging(string value);
partial void OnTypeNameChanged();
partial void OnSortIndexChanging(System.Nullable<int> value);
partial void OnSortIndexChanged();
#endregion
public Base_ReceivingDocType()
{
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
public string TypeId
{
get
{
return this._TypeId;
}
set
{
if ((this._TypeId != value))
{
this.OnTypeIdChanging(value);
this.SendPropertyChanging();
this._TypeId = value;
this.SendPropertyChanged("TypeId");
this.OnTypeIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeName", DbType="NVarChar(50)")]
public string TypeName
{
get
{
return this._TypeName;
}
set
{
if ((this._TypeName != value))
{
this.OnTypeNameChanging(value);
this.SendPropertyChanging();
this._TypeName = value;
this.SendPropertyChanged("TypeName");
this.OnTypeNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")]
public System.Nullable<int> SortIndex
{
get
{
return this._SortIndex;
}
set
{
if ((this._SortIndex != value))
{
this.OnSortIndexChanging(value);
this.SendPropertyChanging();
this._SortIndex = value;
this.SendPropertyChanged("SortIndex");
this.OnSortIndexChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_RiskLevel")]
public partial class Base_RiskLevel : INotifyPropertyChanging, INotifyPropertyChanged
{