20241112 人工时disable

This commit is contained in:
毕文静 2024-11-12 11:37:25 +08:00
parent 773a9b184e
commit 6387cf58bc
5 changed files with 15 additions and 28 deletions

View File

@ -40,7 +40,7 @@
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>5</WarningLevel>
<WarningLevel>4</WarningLevel>
<LangVersion>7.3</LangVersion>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
@ -50,7 +50,7 @@
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<WarningLevel>1</WarningLevel>
<LangVersion>7.2</LangVersion>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
@ -138,6 +138,7 @@
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data.Linq" />

View File

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

View File

@ -314,7 +314,7 @@
{
for (int a = 0; a < manHours_Plans.Count; a++)
{
var manHours_Plan = Funs.DB.ManHours_Plan.FirstOrDefault(x => x.ManHoursPlanId == manHours_Plans[i].ManHoursPlanId);
var manHours_Plan = Funs.DB.ManHours_Plan.FirstOrDefault(x => x.ManHoursPlanId == manHours_Plans[a].ManHoursPlanId);
if (manHours_Plan != null)
{
manHours_Plan.AccountDisabled = 1;
@ -346,24 +346,16 @@
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].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[0].ResourcePlanId);
//if (manHours_Plan != null)
//{
// manHours_Plan.AccountDisabled = 1;
// Funs.DB.SubmitChanges();
//}
var manHours_Plan = (from x in Funs.DB.ManHours_Plan where x.ResourcePlanId == planLists[0].ResourcePlanId select x).ToList();
if (manHours_Plan.Count() > 0)
string resourcePlanId = planLists[0].ResourcePlanId.ToString();
List<ManHours_Plan> manHours_Plan = (from x in Funs.DB.ManHours_Plan where x.ResourcePlanId == resourcePlanId && x.AccountDisabled != 1 select x).ToList();
foreach (var item in manHours_Plan)
{
foreach (var item in manHours_Plan)
{
item.AccountDisabled = 1;
Funs.DB.SubmitChanges();
}
item.AccountDisabled = 1;
Funs.DB.SubmitChanges();
}
}
}
@ -376,14 +368,8 @@
select x;
foreach (var ep in epList)
{
//var manHours_Plan = Funs.DB.ManHours_Plan.FirstOrDefault(x => x.EProjectId == ep.EProjectId);
//if (manHours_Plan != null)
//{
// manHours_Plan.AccountDisabled = 1;
// Funs.DB.SubmitChanges();
//}
var manHours_Plan = (from x in Funs.DB.ManHours_Plan where x.EProjectId == ep.EProjectId select x).ToList();
if (manHours_Plan.Count() > 0)
var manHours_Plan = (from x in Funs.DB.ManHours_Plan where x.EProjectId == ep.EProjectId && x.AccountDisabled != 1 select x).ToList();
if (manHours_Plan.Count > 0)
{
foreach (var item in manHours_Plan)
{

View File

@ -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="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false"/>
</httpHandlers>
<compilation debug="true" targetFramework="4.8">
<compilation debug="false" targetFramework="4.8">
<assemblies>
<!--<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" />-->

View File

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