From 8697c026526a13301bdaa10955967f4dad3784ea Mon Sep 17 00:00:00 2001 From: gaofei <181547018@qq.com> Date: Mon, 26 Jun 2023 17:30:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=91=98=E5=B7=A5=E8=80=83?= =?UTF-8?q?=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2023-06-26.sql | 2 + SGGL/BLL/Common/Const.cs | 5 + .../ActionPlanListApproveService.cs | 54 +++++++ .../HSSE/ActionPlan/ActionPlanListService.cs | 4 + SGGL/BLL/SysManage/DepartService.cs | 19 +++ SGGL/FineUIPro.Web/ErrLog.txt | 40 +++++ SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 8 + .../Person/DepartPersonCheck.aspx.cs | 7 +- .../ZHGL/Plan/ActionPlanListEdit.aspx | 61 +++++++- .../ZHGL/Plan/ActionPlanListEdit.aspx.cs | 139 +++++++++++++++++- .../Plan/ActionPlanListEdit.aspx.designer.cs | 81 ++++++++++ SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx | 48 ++++++ .../ZHGL/Plan/DepartEdit.aspx.cs | 136 +++++++++++++++++ .../ZHGL/Plan/DepartEdit.aspx.designer.cs | 96 ++++++++++++ SGGL/Model/Model.cs | 34 ++++- 15 files changed, 724 insertions(+), 10 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2023-06-26.sql create mode 100644 SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_V2023-06-26.sql b/DataBase/版本日志/SGGLDB_V2023-06-26.sql new file mode 100644 index 00000000..91ed80fd --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-06-26.sql @@ -0,0 +1,2 @@ +alter table [dbo].[ActionPlan_ActionPlanListApprove] add DepartId nvarchar(50) null +GO \ No newline at end of file diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 43ffea3a..5cb82257 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -3543,6 +3543,11 @@ /// public static string ActionPlanList_Review2 = "5"; + /// + /// 公司部门评审 + /// + public static string ActionPlanList_DepartReview = "6"; + /// /// 审批完成 /// diff --git a/SGGL/BLL/HSSE/ActionPlan/ActionPlanListApproveService.cs b/SGGL/BLL/HSSE/ActionPlan/ActionPlanListApproveService.cs index e18b6d9f..fb8ab31e 100644 --- a/SGGL/BLL/HSSE/ActionPlan/ActionPlanListApproveService.cs +++ b/SGGL/BLL/HSSE/ActionPlan/ActionPlanListApproveService.cs @@ -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(); } + /// + /// 获取安全实施计划模板列表 + /// + /// + /// + /// + public static IList 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(); + } + /// /// 获取未代办的记录数量 /// @@ -233,6 +269,22 @@ namespace BLL db.SubmitChanges(); } } + + /// + /// 根据安全实施计划编号删除对应的所有安全实施计划审批信息 + /// + /// 安全实施计划编号 + 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(); + } + } + /// /// 根据安全实施计划编号获取一个安全实施计划审批信息 /// @@ -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; diff --git a/SGGL/BLL/HSSE/ActionPlan/ActionPlanListService.cs b/SGGL/BLL/HSSE/ActionPlan/ActionPlanListService.cs index d7527ef5..4f59e73b 100644 --- a/SGGL/BLL/HSSE/ActionPlan/ActionPlanListService.cs +++ b/SGGL/BLL/HSSE/ActionPlan/ActionPlanListService.cs @@ -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 "审批完成"; diff --git a/SGGL/BLL/SysManage/DepartService.cs b/SGGL/BLL/SysManage/DepartService.cs index 600aff5d..f482d3b3 100644 --- a/SGGL/BLL/SysManage/DepartService.cs +++ b/SGGL/BLL/SysManage/DepartService.cs @@ -124,5 +124,24 @@ namespace BLL } } #endregion + + #region 表下拉框 + /// + /// 表下拉框 + /// + /// 下拉框名字 + /// 是否显示请选择 + 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 } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index e69de29b..9ef62bf2 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -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 + diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 44199c5a..3028b72f 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1590,6 +1590,7 @@ + @@ -13641,6 +13642,13 @@ ActionPlanListView.aspx + + DepartEdit.aspx + ASPXCodeBehind + + + DepartEdit.aspx + MainContract.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/Person/DepartPersonCheck.aspx.cs b/SGGL/FineUIPro.Web/Person/DepartPersonCheck.aspx.cs index 2a6f2377..78969d2e 100644 --- a/SGGL/FineUIPro.Web/Person/DepartPersonCheck.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/DepartPersonCheck.aspx.cs @@ -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"); diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx index 849b6e8a..3445cdab 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx @@ -64,7 +64,7 @@ - + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx.cs index 7df7d561..d72e180d 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx.cs @@ -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(); + } + + /// + /// 关闭弹出窗口 + /// + /// + /// + 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 编辑 + /// + /// 双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + 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 删除 + /// + /// 右键删除事件 + /// + /// + /// + 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); + } + } + + /// + /// 判断是否可以删除 + /// + /// + 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 } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx.designer.cs index 41a1ca08..0cac2bad 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanListEdit.aspx.designer.cs @@ -129,6 +129,51 @@ namespace FineUIPro.Web.ZHGL.Plan { /// protected global::FineUIPro.RadioButtonList rblIsCompanyReview; + /// + /// gvDepart 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvDepart; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label5; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + /// /// trAtt 控件。 /// @@ -336,6 +381,15 @@ namespace FineUIPro.Web.ZHGL.Plan { /// protected global::FineUIPro.Button btnClose; + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + /// /// WindowAtt 控件。 /// @@ -344,5 +398,32 @@ namespace FineUIPro.Web.ZHGL.Plan { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; } } diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx new file mode 100644 index 00000000..0cff2b3b --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx @@ -0,0 +1,48 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DepartEdit.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Plan.DepartEdit" %> + + + + + + + 编辑 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx.cs new file mode 100644 index 00000000..a1a55ec2 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx.cs @@ -0,0 +1,136 @@ +using BLL; +using System; + +namespace FineUIPro.Web.ZHGL.Plan +{ + public partial class DepartEdit : PageBase + { + #region 定义项 + /// + /// 主键 + /// + public string ActionPlanListApproveId + { + get + { + return (string)ViewState["ActionPlanListApproveId"]; + } + set + { + ViewState["ActionPlanListApproveId"] = value; + } + } + + /// + /// 主表主键 + /// + public string ActionPlanListId + { + get + { + return (string)ViewState["ActionPlanListId"]; + } + set + { + ViewState["ActionPlanListId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + 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 保存 + /// + /// 保存按钮 + /// + /// + /// + 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; + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx.designer.cs new file mode 100644 index 00000000..8fe87b5a --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/DepartEdit.aspx.designer.cs @@ -0,0 +1,96 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Plan { + + + public partial class DepartEdit { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// drpDepart 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpDepart; + + /// + /// drpApproveMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpApproveMan; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + } +} diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 1e49074f..4d92c8bb 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -11254,6 +11254,8 @@ namespace Model private System.Nullable _Edition; + private string _DepartId; + private EntityRef _ActionPlan_ActionPlanList; private EntityRef _Person_Persons; @@ -11282,6 +11284,8 @@ namespace Model partial void OnSignTypeChanged(); partial void OnEditionChanging(System.Nullable 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