20240929 修改RP超时不允许编辑

This commit is contained in:
毕文静 2024-09-29 15:48:12 +08:00
parent 17ac63f758
commit d6c2b68ebc
13 changed files with 129 additions and 106 deletions

Binary file not shown.

Binary file not shown.

View File

@ -2014,7 +2014,7 @@
<WCFMetadata Include="Connected Services\" /> <WCFMetadata Include="Connected Services\" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v17.0\WebApplications\Microsoft.WebApplication.targets" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" />
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">

View File

@ -2,7 +2,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectView>ProjectFiles</ProjectView> <ProjectView>ProjectFiles</ProjectView>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress>true</Use64BitIISExpress> <Use64BitIISExpress>true</Use64BitIISExpress>
<IISExpressSSLPort /> <IISExpressSSLPort />

View File

@ -330,6 +330,7 @@
#region 1 2Cancelled或Hold也预留一个月 #region 1 2Cancelled或Hold也预留一个月
/// <summary> /// <summary>
/// 填写第二张资源时,第一张资源预留一个月的时候填写人工时 /// 填写第二张资源时,第一张资源预留一个月的时候填写人工时
/// MOC和Projects项目
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
@ -340,12 +341,16 @@
{ {
foreach (var epr in eprojects) foreach (var epr in eprojects)
{ {
var planLists = (from x in Funs.DB.Resource_Plan where x.EProjectId == epr.Key orderby x.CreateDate descending select x).ToList(); var planLists = (from x in Funs.DB.Resource_Plan
join y in Funs.DB.Editor_EProject on x.EProjectId equals y.EProjectId
where x.EProjectId == epr.Key && (y.ProjectControl_JobType == "Projects" || y.ProjectControl_JobType == "MOC")
orderby x.CreateDate ascending
select new { x.ResourcePlanId, y.PM_MA_ProjectApproval }).ToList();
if (planLists.Count() == 2) if (planLists.Count() == 2)
{ {
if (planLists[0].CreateDate.Value.AddMonths(1).ToShortDateString() == DateTime.Now.ToShortDateString()) if (planLists[0].PM_MA_ProjectApproval.HasValue && planLists[0].PM_MA_ProjectApproval.Value.AddMonths(1) <= DateTime.Now)
{ {
var manHours_Plan = Funs.DB.ManHours_Plan.FirstOrDefault(x => x.ResourcePlanId == planLists[1].ResourcePlanId); var manHours_Plan = Funs.DB.ManHours_Plan.FirstOrDefault(x => x.ResourcePlanId == planLists[0].ResourcePlanId);
if (manHours_Plan != null) if (manHours_Plan != null)
{ {
manHours_Plan.AccountDisabled = 1; manHours_Plan.AccountDisabled = 1;

View File

@ -369,6 +369,10 @@ namespace FineUIPro.Web.ResourcePlan
var role = BLL.Sys_RoleService.GetRole(user.RoleId); var role = BLL.Sys_RoleService.GetRole(user.RoleId);
string projectManager = epro.ProjectControl_ProjectManager; string projectManager = epro.ProjectControl_ProjectManager;
string leadByName = epro.ProjectControl_LeadByName; string leadByName = epro.ProjectControl_LeadByName;
var manHours = (from x in Funs.DB.ManHours_Plan where x.ResourcePlanId == Id select x).FirstOrDefault();
if (manHours.AccountDisabled == 0)
{
// 权限已特殊处理 // 权限已特殊处理
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ResourcePlanEdit.aspx?ResourcePlanId={0}&&eProjectId={1}", Id, eProjectId, "编辑 - "))); PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ResourcePlanEdit.aspx?ResourcePlanId={0}&&eProjectId={1}", Id, eProjectId, "编辑 - ")));
@ -390,6 +394,11 @@ namespace FineUIPro.Web.ResourcePlan
// Alert.Show("您不是PM、非CTE/M用户或PPE不能填报资源", MessageBoxIcon.Warning); // Alert.Show("您不是PM、非CTE/M用户或PPE不能填报资源", MessageBoxIcon.Warning);
//} //}
} }
else
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ResourcePlanView.aspx?ResourcePlanId={0}&eProjectId={1}", Id, eProjectId, "编辑 - ")));
}
}
} }
} }
@ -426,6 +435,9 @@ namespace FineUIPro.Web.ResourcePlan
object[] keys = Grid2.DataKeys[e.RowIndex]; object[] keys = Grid2.DataKeys[e.RowIndex];
string eProjectId = keys[1].ToString(); string eProjectId = keys[1].ToString();
var manHours = (from x in Funs.DB.ManHours_Plan where x.ResourcePlanId == Id select x).FirstOrDefault();
if (manHours.AccountDisabled == 0)
{
//var epro = BLL.EProjectService.GeteProjectById(eProjectId); //var epro = BLL.EProjectService.GeteProjectById(eProjectId);
//if (epro != null) //if (epro != null)
//{ //{
@ -466,6 +478,11 @@ namespace FineUIPro.Web.ResourcePlan
// } // }
//} //}
} }
else
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ResourcePlanView.aspx?ResourcePlanId={0}&eProjectId={1}", Id, eProjectId, "编辑 - ")));
}
}
protected void Grid2_RowCommand(object sender, GridCommandEventArgs e) protected void Grid2_RowCommand(object sender, GridCommandEventArgs e)
{ {

View File

@ -2,13 +2,9 @@
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Specialized;
using System.Data; using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Linq; using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.ResourcePlan namespace FineUIPro.Web.ResourcePlan
{ {
@ -144,6 +140,8 @@ namespace FineUIPro.Web.ResourcePlan
} }
//绑定 //绑定
BindGrid(); BindGrid();
} }
} }
} }

View File

@ -62,6 +62,9 @@ namespace FineUIPro.Web.ResourcePlan
if (!string.IsNullOrEmpty(resourcePlanId)) if (!string.IsNullOrEmpty(resourcePlanId))
{ {
var rp = BLL.ResourcePlanService.GetModelsResourcePlans(resourcePlanId); var rp = BLL.ResourcePlanService.GetModelsResourcePlans(resourcePlanId);
if (rp != null)
{
var eProject = BLL.EProjectService.GeteProjectById(rp.EProjectId); var eProject = BLL.EProjectService.GeteProjectById(rp.EProjectId);
if (eProject != null) if (eProject != null)
{ {
@ -106,7 +109,7 @@ namespace FineUIPro.Web.ResourcePlan
//绑定 //绑定
BindGrid(); BindGrid();
} }
}
//foreach (CheckItem item in checkPhase.Items) //foreach (CheckItem item in checkPhase.Items)
//{ //{
// if (!string.IsNullOrEmpty(rp.Phase)) // if (!string.IsNullOrEmpty(rp.Phase))

View File

@ -59,7 +59,7 @@
<f:RenderField Width="150px" ColumnID="HostName" DataField="HostName" SortField="HostName" <f:RenderField Width="150px" ColumnID="HostName" DataField="HostName" SortField="HostName"
HeaderTextAlign="Center" TextAlign="Left" FieldType="String" HeaderText="Host name"> HeaderTextAlign="Center" TextAlign="Left" FieldType="String" HeaderText="Host name">
</f:RenderField> </f:RenderField>
<f:RenderField Width="250px" ColumnID="OperationLog" DataField="OperationLog" SortField="OperationLog" ShowToolTip="true" <f:RenderField Width="250px" ColumnID="OperationLog" DataField="OperationLog" SortField="OperationLog"
HeaderTextAlign="Center" TextAlign="Left" FieldType="String" HeaderText="Operation log" ExpandUnusedSpace="true"> HeaderTextAlign="Center" TextAlign="Left" FieldType="String" HeaderText="Operation log" ExpandUnusedSpace="true">
</f:RenderField> </f:RenderField>
</Columns> </Columns>

View File

@ -9,7 +9,7 @@
<section name="FineUIPro" type="FineUIPro.ConfigSection, FineUIPro" requirePermission="false" /> <section name="FineUIPro" type="FineUIPro.ConfigSection, FineUIPro" requirePermission="false" />
</configSections> </configSections>
<connectionStrings> <connectionStrings>
<add name="EProjectDBConnectionString" connectionString="Data Source=.;Initial Catalog=EProjectDB;uid=sa;pwd=Sh@nghai9;" /> <add name="EProjectDBConnectionString" connectionString="Data Source=.\SQL2016;Initial Catalog=EProjectDB;uid=sa;pwd=1111;" />
<!--<add name="HJGLDBConnectionString" connectionString="Data Source=.;Initial Catalog=EProjectDB;Integrated Security=True" <!--<add name="HJGLDBConnectionString" connectionString="Data Source=.;Initial Catalog=EProjectDB;Integrated Security=True"
providerName="System.Data.SqlClient" />--> providerName="System.Data.SqlClient" />-->
</connectionStrings> </connectionStrings>
@ -53,7 +53,7 @@
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" /> <add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false" /> <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false" />
</httpHandlers> </httpHandlers>
<compilation debug="true" targetFramework="4.8"> <compilation debug="false" targetFramework="4.8">
<assemblies> <assemblies>
<!--<add assembly="Microsoft.Build.Framework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <!--<add assembly="Microsoft.Build.Framework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />--> <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />-->

Binary file not shown.

Binary file not shown.

View File

@ -8,7 +8,7 @@
<IISExpressWindowsAuthentication /> <IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode /> <IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile /> <UseGlobalApplicationHostFile />
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
</PropertyGroup> </PropertyGroup>
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>