提交代码
This commit is contained in:
@@ -90,7 +90,7 @@
|
|||||||
</f:Window>
|
</f:Window>
|
||||||
<f:Menu ID="Menu1" runat="server">
|
<f:Menu ID="Menu1" runat="server">
|
||||||
<Items>
|
<Items>
|
||||||
<f:MenuButton ID="btnView" EnablePostBack="true" runat="server"
|
<f:MenuButton ID="btnView" EnablePostBack="true" runat="server" Hidden="true"
|
||||||
Text="查看" Icon="Find" OnClick="btnView_Click">
|
Text="查看" Icon="Find" OnClick="btnView_Click">
|
||||||
</f:MenuButton>
|
</f:MenuButton>
|
||||||
</Items>
|
</Items>
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ namespace FineUIPro.Web.DataShow
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||||
{
|
{
|
||||||
EditData();
|
//EditData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ namespace FineUIPro.Web.DataShow
|
|||||||
|
|
||||||
protected void btnView_Click(object sender, EventArgs e)
|
protected void btnView_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
EditData();
|
//EditData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -166,28 +166,12 @@ namespace FineUIPro.Web.DataShow
|
|||||||
decimal cout1 = 0;
|
decimal cout1 = 0;
|
||||||
if (projectId != null)
|
if (projectId != null)
|
||||||
{
|
{
|
||||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
var result = (from x in Funs.DB.SeDin_MonthReport2
|
||||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
join y in Funs.DB.SeDin_MonthReport on x.MonthReportId equals y.MonthReportId
|
||||||
var getD1 = from x in Funs.DB.SitePerson_DayReport
|
where y.ProjectId == projectId.ToString()
|
||||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
orderby y.ReporMonth descending
|
||||||
where y.ProjectState == Const.ProjectState_1
|
select x.ProjectWorkTime ?? 0).FirstOrDefault();
|
||||||
select x;
|
cout1 = result;
|
||||||
if (datetime1.HasValue)
|
|
||||||
{
|
|
||||||
getD1 = getD1.Where(x => x.CompileDate >= datetime1);
|
|
||||||
}
|
|
||||||
if (datetime2.HasValue)
|
|
||||||
{
|
|
||||||
getD1 = getD1.Where(x => x.CompileDate <= datetime2);
|
|
||||||
}
|
|
||||||
var getC = from x in Funs.DB.SitePerson_DayReportDetail
|
|
||||||
join y in getD1 on x.DayReportId equals y.DayReportId
|
|
||||||
where y.ProjectId == projectId.ToString()
|
|
||||||
select x;
|
|
||||||
if (getC.Count() > 0)
|
|
||||||
{
|
|
||||||
cout1 = getC.Sum(x => x.PersonWorkTime ?? 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return cout1;
|
return cout1;
|
||||||
}
|
}
|
||||||
@@ -246,10 +230,11 @@ namespace FineUIPro.Web.DataShow
|
|||||||
{
|
{
|
||||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||||
var getC1 = from x in Funs.DB.SitePerson_DayReport
|
var getC1 = (from x in Funs.DB.SeDin_MonthReport2
|
||||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
join y in Funs.DB.SeDin_MonthReport on x.MonthReportId equals y.MonthReportId
|
||||||
where y.ProjectState == Const.ProjectState_1
|
where y.ProjectId == projectId.ToString()
|
||||||
select x;
|
orderby y.ReporMonth descending
|
||||||
|
select x.ProjectWorkTime ?? 0).FirstOrDefault();
|
||||||
|
|
||||||
var getD1 = from x in Funs.DB.Accident_AccidentHandle
|
var getD1 = from x in Funs.DB.Accident_AccidentHandle
|
||||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||||
@@ -262,32 +247,22 @@ namespace FineUIPro.Web.DataShow
|
|||||||
|
|
||||||
if (datetime1.HasValue)
|
if (datetime1.HasValue)
|
||||||
{
|
{
|
||||||
getC1 = getC1.Where(x => x.CompileDate >= datetime1);
|
|
||||||
getD1 = getD1.Where(x => x.AccidentDate >= datetime1);
|
getD1 = getD1.Where(x => x.AccidentDate >= datetime1);
|
||||||
getD2 = getD2.Where(x => x.CompileDate >= datetime1);
|
getD2 = getD2.Where(x => x.CompileDate >= datetime1);
|
||||||
}
|
}
|
||||||
if (datetime2.HasValue)
|
if (datetime2.HasValue)
|
||||||
{
|
{
|
||||||
getC1 = getC1.Where(x => x.CompileDate <= datetime2);
|
|
||||||
getD1 = getD1.Where(x => x.AccidentDate <= datetime2);
|
getD1 = getD1.Where(x => x.AccidentDate <= datetime2);
|
||||||
getD2 = getD2.Where(x => x.CompileDate <= datetime2);
|
getD2 = getD2.Where(x => x.CompileDate <= datetime2);
|
||||||
}
|
}
|
||||||
var getC = from x in Funs.DB.SitePerson_DayReportDetail
|
cout1 = getC1;
|
||||||
join y in getC1 on x.DayReportId equals y.DayReportId
|
|
||||||
where y.ProjectId == projectId.ToString()
|
|
||||||
select x;
|
|
||||||
if (getC.Count() > 0)
|
|
||||||
{
|
|
||||||
cout1 = getC.Sum(x => x.PersonWorkTime ?? 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (getD1.Count() > 0)
|
if (getD1.Count() > 0)
|
||||||
{
|
{
|
||||||
cout1 = cout1 -getD1.Sum(x => x.WorkHoursLoss ?? 0);
|
cout1 = cout1 - getD1.Sum(x => x.WorkHoursLoss ?? 0);
|
||||||
}
|
}
|
||||||
if (getD2.Count() > 0)
|
if (getD2.Count() > 0)
|
||||||
{
|
{
|
||||||
cout1 = cout1- getD2.Sum(x => x.WorkingHoursLoss ?? 0);
|
cout1 = cout1 - getD2.Sum(x => x.WorkingHoursLoss ?? 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return cout1;
|
return cout1;
|
||||||
|
|||||||
Reference in New Issue
Block a user