修改员工考核

This commit is contained in:
高飞 2023-06-26 17:30:09 +08:00
parent 7e5ccbdd32
commit 8697c02652
15 changed files with 724 additions and 10 deletions

View File

@ -0,0 +1,2 @@
alter table [dbo].[ActionPlan_ActionPlanListApprove] add DepartId nvarchar(50) null
GO

View File

@ -3543,6 +3543,11 @@
/// </summary>
public static string ActionPlanList_Review2 = "5";
/// <summary>
/// 公司部门评审
/// </summary>
public static string ActionPlanList_DepartReview = "6";
/// <summary>
/// 审批完成
/// </summary>

View File

@ -6,6 +6,12 @@ namespace BLL
{
public class ActionPlanListApproveService
{
public static Model.ActionPlan_ActionPlanListApprove GetActionPlanListApproveByActionPlanListApproveId(string ActionPlanListApproveId)
{
Model.SGGLDB db = Funs.DB;
return db.ActionPlan_ActionPlanListApprove.FirstOrDefault(x => x.ActionPlanListApproveId == ActionPlanListApproveId);
}
public static Model.ActionPlan_ActionPlanListApprove GetSee(string ActionPlanListId, string userId)
{
Model.SGGLDB db = Funs.DB;
@ -108,6 +114,7 @@ namespace BLL
newApprove.ApproveMan = approve.ApproveMan;
newApprove.ApproveDate = approve.ApproveDate;
newApprove.ApproveIdea = approve.ApproveIdea;
newApprove.DepartId = approve.DepartId;
newApprove.IsAgree = approve.IsAgree;
newApprove.ApproveType = approve.ApproveType;
newApprove.Edition = approve.Edition;
@ -179,6 +186,35 @@ namespace BLL
return res.ToList();
}
/// <summary>
/// 获取安全实施计划模板列表
/// </summary>
/// <param name="satartRowIndex"></param>
/// <param name="maximumRows"></param>
/// <returns></returns>
public static IList<Model.ActionPlan_ActionPlanListApprove> getDepartListData(string ActionPlanListId)
{
Model.SGGLDB db = Funs.DB;
var res = from x in db.ActionPlan_ActionPlanListApprove
where x.ActionPlanListId == ActionPlanListId && x.DepartId != null
orderby x.ApproveDate
select x;
//select new
//{
// x.ActionPlanListApproveId,
// x.ActionPlanListId,
// x.ApproveMan,
// x.ApproveDate,
// x.IsAgree,
// x.ApproveIdea,
// x.ApproveType,
// x.SignType,
// //= x.IsAgree == true ? "是" : "否",
//};
return res.ToList();
}
/// <summary>
/// 获取未代办的记录数量
/// </summary>
@ -233,6 +269,22 @@ namespace BLL
db.SubmitChanges();
}
}
/// <summary>
/// 根据安全实施计划编号删除对应的所有安全实施计划审批信息
/// </summary>
/// <param name="ActionPlanListCode">安全实施计划编号</param>
public static void DeleteActionPlanListApprovesByActionPlanListApproveId(string ActionPlanListApproveId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in Funs.DB.ActionPlan_ActionPlanListApprove where x.ActionPlanListApproveId == ActionPlanListApproveId select x).FirstOrDefault();
if (q!=null)
{
db.ActionPlan_ActionPlanListApprove.DeleteOnSubmit(q);
db.SubmitChanges();
}
}
/// <summary>
/// 根据安全实施计划编号获取一个安全实施计划审批信息
/// </summary>
@ -277,6 +329,7 @@ namespace BLL
newApprove.ApproveIdea = approve.ApproveIdea;
newApprove.IsAgree = approve.IsAgree;
newApprove.ApproveType = approve.ApproveType;
newApprove.DepartId = approve.DepartId;
newApprove.SignType = approve.SignType;
newApprove.Edition = approve.Edition;
db.ActionPlan_ActionPlanListApprove.InsertOnSubmit(newApprove);
@ -299,6 +352,7 @@ namespace BLL
newApprove.ApproveMan = approve.ApproveMan;
newApprove.ApproveDate = approve.ApproveDate;
newApprove.ApproveIdea = approve.ApproveIdea;
newApprove.DepartId = approve.DepartId;
newApprove.IsAgree = approve.IsAgree;
newApprove.ApproveType = approve.ApproveType;
newApprove.SignType = approve.SignType;

View File

@ -143,6 +143,10 @@ namespace BLL
{
return "评审负责人办理";
}
else if (state.ToString() == BLL.Const.ActionPlanList_DepartReview)
{
return "公司部门评审";
}
else if (state.ToString() == BLL.Const.ActionPlanList_Complete)
{
return "审批完成";

View File

@ -124,5 +124,24 @@ namespace BLL
}
}
#endregion
#region
/// <summary>
/// 表下拉框
/// </summary>
/// <param name="dropName">下拉框名字</param>
/// <param name="isShowPlease">是否显示请选择</param>
public static void InitDepartNameDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
{
dropName.DataValueField = "DepartName";
dropName.DataTextField = "DepartName";
dropName.DataSource = BLL.DepartService.GetDepartList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
#endregion
}
}

View File

@ -0,0 +1,40 @@
错误信息开始=====>
错误类型:HttpCompileException
错误信息:e:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\ZHGL\Plan\ActionPlanListEdit.aspx(78): error CS1061: “ASP.zhgl_plan_actionplanlistedit_aspx”不包含“gvDepart_RowCommand”的定义并且找不到可接受类型为“ASP.zhgl_plan_actionplanlistedit_aspx”的第一个参数的扩展方法“gvDepart_RowCommand”(是否缺少 using 指令或程序集引用?)
错误堆栈:
在 System.Web.Compilation.BuildManager.CompileWebFile(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)
出错时间:06/19/2023 16:36:07
出错文件:http://localhost:8667/ZHGL/Plan/ActionPlanListEdit.aspx?actionPlanListId=58122847-39ce-4e36-880d-173df5d1e77e
IP地址:::1
出错时间:06/19/2023 16:36:08
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 FineUIPro.Web.ZHGL.Plan.ActionPlanList.EditData() 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\ZHGL\Plan\ActionPlanList.aspx.cs:行号 188
在 FineUIPro.Web.ZHGL.Plan.ActionPlanList.Grid1_RowDoubleClick(Object sender, GridRowClickEventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\ZHGL\Plan\ActionPlanList.aspx.cs:行号 143
在 FineUIPro.Grid.OnRowDoubleClick(GridRowClickEventArgs e)
在 (Grid , GridRowClickEventArgs )
在 FineUIPro.Grid.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:06/20/2023 16:09:03
出错文件:http://localhost:8667/ZHGL/Plan/ActionPlanList.aspx
IP地址:::1
出错时间:06/20/2023 16:09:03

View File

@ -1590,6 +1590,7 @@
<Content Include="ZHGL\Plan\ActionPlanList.aspx" />
<Content Include="ZHGL\Plan\ActionPlanListEdit.aspx" />
<Content Include="ZHGL\Plan\ActionPlanListView.aspx" />
<Content Include="ZHGL\Plan\DepartEdit.aspx" />
<Content Include="ZHGL\Plan\MainContract.aspx" />
<Content Include="ZHGL\Plan\MainContractEdit.aspx" />
<Content Include="ZHGL\Plan\MainContractOpinionEdit.aspx" />
@ -13641,6 +13642,13 @@
<Compile Include="ZHGL\Plan\ActionPlanListView.aspx.designer.cs">
<DependentUpon>ActionPlanListView.aspx</DependentUpon>
</Compile>
<Compile Include="ZHGL\Plan\DepartEdit.aspx.cs">
<DependentUpon>DepartEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ZHGL\Plan\DepartEdit.aspx.designer.cs">
<DependentUpon>DepartEdit.aspx</DependentUpon>
</Compile>
<Compile Include="ZHGL\Plan\MainContract.aspx.cs">
<DependentUpon>MainContract.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -214,7 +214,12 @@ namespace FineUIPro.Web.Person
startTime = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-1" + "-1");
endTime = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-3" + "-31");
}
else if (DateTime.Now >= Convert.ToDateTime(DateTime.Now.Year + "-7" + "-1") && DateTime.Now.Date <= Convert.ToDateTime(DateTime.Now.Year + "-9" + "-30"))
//else if (DateTime.Now >= Convert.ToDateTime(DateTime.Now.Year + "-7" + "-1") && DateTime.Now.Date <= Convert.ToDateTime(DateTime.Now.Year + "-9" + "-30"))
//{
// startTime = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-4" + "-1");
// endTime = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-6" + "-30");
//}
else if (DateTime.Now >= Convert.ToDateTime(DateTime.Now.Year + "-6" + "-1") && DateTime.Now.Date <= Convert.ToDateTime(DateTime.Now.Year + "-6" + "-30"))
{
startTime = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-4" + "-1");
endTime = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-6" + "-30");

View File

@ -64,7 +64,7 @@
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<f:FormRow>
<Items>
<f:RadioButtonList runat="server" ID="rblIsCompanyReview" Label="备案/公司部门评审" Hidden="true" LabelWidth="140px" AutoPostBack="true" OnSelectedIndexChanged="rblIsCompanyReview_SelectedIndexChanged">
<f:RadioItem Text="备案" Value="False" Selected="true" />
@ -73,6 +73,41 @@
<f:Label runat="server" Hidden="true"></f:Label>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Grid ID="gvDepart" IsFluid="true" CssClass="blockpanel" ShowBorder="true" ShowHeader="false" runat="server" EnableCollapse="false"
DataKeyNames="ActionPlanListApproveId" DataIDField="ActionPlanListApproveId" EnableColumnLines="true" Hidden="true" EnableRowDoubleClickEvent="true"
OnRowDoubleClick="Grid1_RowDoubleClick" Height="250px">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:Button ID="btnNew" Text="新增" Icon="Add" runat="server" OnClick="btnNew_Click"
>
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RowNumberField Width="40px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center" />
<f:TemplateField ColumnID="Depart" Width="200px" HeaderText="部门" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# depart(Eval("DepartId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="ApproveMan" Width="150px" HeaderText="办理人员" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# man(Eval("ApproveMan")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
</f:Grid>
</Items>
</f:FormRow>
<f:FormRow runat="server" ID="trAtt">
<Items>
<f:ContentPanel ID="ContentPanel2" runat="server" ShowHeader="false" EnableCollapse="true"
@ -173,10 +208,34 @@
</f:Toolbar>
</Toolbars>
</f:Form>
<f:Window ID="Window1" Title="公司部门审批" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
Width="800px" Height="500px">
</f:Window>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="WindowAtt_Close"
Width="700px" Height="500px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="Pencil" EnablePostBack="true"
runat="server" Text="编辑">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
Icon="Delete" ConfirmText="删除选中行?" 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>

View File

@ -190,6 +190,32 @@ namespace FineUIPro.Web.ZHGL.Plan
if (actionPlanList.IsCompanyReview == true)
{
rblIsCompanyReview.SelectedValue = "True";
gvDepart.Hidden = false;
BindDepart();
}
else
{
rblIsCompanyReview.SelectedValue = "False";
}
ContactImg = -1;
}
else if (actionPlanList.States == Const.ActionPlanList_DepartReview)
{
txtActionPlanListCode.Readonly = true;
txtActionPlanListName.Readonly = true;
txtVersionNo.Readonly = true;
drpProjectType.Readonly = true;
drpCompileMan.Readonly = true;
txtCompileDate.Readonly = true;
rblIsReview.Readonly = true;
drpReviewMan.Readonly = true;
drpPerson.Readonly = true;
rblIsCompanyReview.Hidden = false;
if (actionPlanList.IsCompanyReview == true)
{
rblIsCompanyReview.SelectedValue = "True";
gvDepart.Hidden = false;
BindDepart();
}
else
{
@ -409,7 +435,7 @@ namespace FineUIPro.Web.ZHGL.Plan
reApprove.Edition = edtion;
ActionPlanListApproveService.AddActionPlanListApprove(reApprove);
actionPlanList.States = Const.ActionPlanList_ReCompile;
actionPlanList.Edition= edtion;
actionPlanList.Edition = edtion;
}
}
}
@ -557,6 +583,11 @@ namespace FineUIPro.Web.ZHGL.Plan
}
}
public string depart(Object DepartId)
{
return DepartService.getDepartNameById(DepartId.ToString());
}
public string man(Object man)
{
string appman = string.Empty;
@ -603,12 +634,114 @@ namespace FineUIPro.Web.ZHGL.Plan
{
if (this.rblIsCompanyReview.SelectedValue == "True")
{
this.gvDepart.Hidden = false;
BindDepart();
}
else
{
this.gvDepart.Hidden = true;
}
}
private void BindDepart()
{
var list = ActionPlanListApproveService.getDepartListData(ActionPlanListId);
gvDepart.DataSource = list;
gvDepart.DataBind();
}
/// <summary>
/// 关闭弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, EventArgs e)
{
BindDepart();
}
protected void btnNew_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DepartEdit.aspx?ActionPlanListId={0}", this.ActionPlanListId, "编辑 - ")));
}
#region
/// <summary>
/// 双击事件
/// </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 (gvDepart.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string id = gvDepart.SelectedRowID;
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DepartEdit.aspx?ActionPlanListApproveId={0}", id, "编辑 - ")));
}
#endregion
#region
/// <summary>
/// 右键删除事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
if (gvDepart.SelectedRowIndexArray.Length > 0)
{
foreach (int rowIndex in gvDepart.SelectedRowIndexArray)
{
string rowID = gvDepart.DataKeys[rowIndex][0].ToString();
BLL.ActionPlanListApproveService.DeleteActionPlanListApprovesByActionPlanListApproveId(rowID);
}
//BindGrid();
ShowNotify("删除数据成功!(表格数据已重新绑定)", MessageBoxIcon.Success);
}
}
/// <summary>
/// 判断是否可以删除
/// </summary>
/// <returns></returns>
private bool judgementDelete(string id, bool isShow)
{
string content = string.Empty;
if (string.IsNullOrEmpty(content))
{
return true;
}
else
{
if (isShow)
{
Alert.ShowInTop(content);
}
return false;
}
}
#endregion
}
}

View File

@ -129,6 +129,51 @@ namespace FineUIPro.Web.ZHGL.Plan {
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsCompanyReview;
/// <summary>
/// gvDepart 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid gvDepart;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// Label5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label5;
/// <summary>
/// Label4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label4;
/// <summary>
/// trAtt 控件。
/// </summary>
@ -336,6 +381,15 @@ namespace FineUIPro.Web.ZHGL.Plan {
/// </remarks>
protected global::FineUIPro.Button btnClose;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// WindowAtt 控件。
/// </summary>
@ -344,5 +398,32 @@ namespace FineUIPro.Web.ZHGL.Plan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
/// <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;
}
}

View File

@ -0,0 +1,48 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DepartEdit.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Plan.DepartEdit" %>
<!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" runat="server" AutoSizePanelID="SimpleForm1"/>
<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="drpDepart" runat="server" Label="部门" Required="true" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpDepart_SelectedIndexChanged"
ShowRedStar="true" LabelAlign="Right" LabelWidth="150px">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpApproveMan" runat="server" Label="办理人" Required="true" EnableEdit="true"
ShowRedStar="true" LabelAlign="Right" LabelWidth="150px">
</f:DropDownList>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</form>
</body>
</html>

View File

@ -0,0 +1,136 @@
using BLL;
using System;
namespace FineUIPro.Web.ZHGL.Plan
{
public partial class DepartEdit : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
public string ActionPlanListApproveId
{
get
{
return (string)ViewState["ActionPlanListApproveId"];
}
set
{
ViewState["ActionPlanListApproveId"] = value;
}
}
/// <summary>
/// 主表主键
/// </summary>
public string ActionPlanListId
{
get
{
return (string)ViewState["ActionPlanListId"];
}
set
{
ViewState["ActionPlanListId"] = value;
}
}
#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.GetHideReference();
DepartService.InitDepartDropDownList(this.drpDepart, true);
Funs.FineUIPleaseSelect(this.drpApproveMan);
this.ActionPlanListId = Request.Params["ActionPlanListId"];
this.ActionPlanListApproveId = Request.Params["ActionPlanListApproveId"];
if (!string.IsNullOrEmpty(this.ActionPlanListApproveId))
{
Model.ActionPlan_ActionPlanListApprove approve = BLL.ActionPlanListApproveService.GetActionPlanListApproveByActionPlanListApproveId(this.ActionPlanListApproveId);
if (approve != null)
{
this.ActionPlanListId = approve.ActionPlanListId;
if (!string.IsNullOrEmpty(approve.DepartId))
{
this.drpDepart.SelectedValue = approve.DepartId;
Person_PersonsService.InitUserUnitIdDepartIdDropDownList(this.drpApproveMan, BLL.Const.UnitId_SEDIN, this.drpDepart.SelectedValue, true);
if (!string.IsNullOrEmpty(approve.ApproveMan))
{
this.drpApproveMan.SelectedValue = approve.ApproveMan;
}
}
}
}
}
}
#endregion
#region
/// <summary>
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (this.drpDepart.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择部门!", MessageBoxIcon.Warning);
return;
}
if (this.drpApproveMan.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择办理人!", MessageBoxIcon.Warning);
return;
}
Model.ActionPlan_ActionPlanListApprove approve = new Model.ActionPlan_ActionPlanListApprove
{
ActionPlanListId = this.ActionPlanListId
};
if (this.drpDepart.SelectedValue != BLL.Const._Null)
{
approve.DepartId = this.drpDepart.SelectedValue;
}
if (this.drpApproveMan.SelectedValue != BLL.Const._Null)
{
approve.ApproveMan = this.drpApproveMan.SelectedValue;
}
if (!string.IsNullOrEmpty(this.ActionPlanListApproveId))
{
approve.ActionPlanListApproveId = this.ActionPlanListApproveId;
BLL.ActionPlanListApproveService.UpdateActionPlanListApprove(approve);
}
else
{
this.ActionPlanListApproveId = SQLHelper.GetNewID(typeof(Model.ActionPlan_ActionPlanListApprove));
approve.ActionPlanListApproveId = this.ActionPlanListApproveId;
BLL.ActionPlanListApproveService.AddActionPlanListApprove(approve);
}
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
#endregion
protected void drpDepart_SelectedIndexChanged(object sender, EventArgs e)
{
this.drpApproveMan.Items.Clear();
if (this.drpDepart.SelectedValue != BLL.Const._Null)
{
Person_PersonsService.InitUserUnitIdDepartIdDropDownList(this.drpApproveMan, BLL.Const.UnitId_SEDIN, this.drpDepart.SelectedValue, true);
this.drpApproveMan.SelectedValue = BLL.Const._Null;
}
else
{
Funs.FineUIPleaseSelect(this.drpApproveMan);
this.drpApproveMan.SelectedValue = BLL.Const._Null;
}
}
}
}

View File

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

View File

@ -11254,6 +11254,8 @@ namespace Model
private System.Nullable<int> _Edition;
private string _DepartId;
private EntityRef<ActionPlan_ActionPlanList> _ActionPlan_ActionPlanList;
private EntityRef<Person_Persons> _Person_Persons;
@ -11282,6 +11284,8 @@ namespace Model
partial void OnSignTypeChanged();
partial void OnEditionChanging(System.Nullable<int> value);
partial void OnEditionChanged();
partial void OnDepartIdChanging(string value);
partial void OnDepartIdChanged();
#endregion
public ActionPlan_ActionPlanListApprove()
@ -11499,6 +11503,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepartId", DbType="NVarChar(50)")]
public string DepartId
{
get
{
return this._DepartId;
}
set
{
if ((this._DepartId != value))
{
this.OnDepartIdChanging(value);
this.SendPropertyChanging();
this._DepartId = value;
this.SendPropertyChanged("DepartId");
this.OnDepartIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ActionPlan_ActionPlanListApprove_ActionPlan_ActionPlanList", Storage="_ActionPlan_ActionPlanList", ThisKey="ActionPlanListId", OtherKey="ActionPlanListId", IsForeignKey=true)]
public ActionPlan_ActionPlanList ActionPlan_ActionPlanList
{
@ -98015,7 +98039,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(2000)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(1000)")]
public string CanWelderCode
{
get
@ -98035,7 +98059,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderId", DbType="NVarChar(4000)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderId", DbType="NVarChar(3000)")]
public string CanWelderId
{
get
@ -209058,7 +209082,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RewardAndPunishDecision", DbType="NVarChar(200)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RewardAndPunishDecision", DbType="NVarChar(100)")]
public string RewardAndPunishDecision
{
get
@ -267151,7 +267175,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(2000)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(1000)")]
public string CanWelderCode
{
get
@ -267167,7 +267191,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderId", DbType="NVarChar(4000)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderId", DbType="NVarChar(3000)")]
public string CanWelderId
{
get