提交代码
This commit is contained in:
parent
c9f8e00d24
commit
7f2be68951
|
|
@ -90,7 +90,7 @@
|
|||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<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">
|
||||
</f:MenuButton>
|
||||
</Items>
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ namespace FineUIPro.Web.DataShow
|
|||
/// <param name="e"></param>
|
||||
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)
|
||||
{
|
||||
EditData();
|
||||
//EditData();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -166,28 +166,12 @@ namespace FineUIPro.Web.DataShow
|
|||
decimal cout1 = 0;
|
||||
if (projectId != null)
|
||||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getD1 = from x in Funs.DB.SitePerson_DayReport
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
select x;
|
||||
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
|
||||
var result = (from x in Funs.DB.SeDin_MonthReport2
|
||||
join y in Funs.DB.SeDin_MonthReport on x.MonthReportId equals y.MonthReportId
|
||||
where y.ProjectId == projectId.ToString()
|
||||
select x;
|
||||
if (getC.Count() > 0)
|
||||
{
|
||||
cout1 = getC.Sum(x => x.PersonWorkTime ?? 0);
|
||||
}
|
||||
orderby y.ReporMonth descending
|
||||
select x.ProjectWorkTime ?? 0).FirstOrDefault();
|
||||
cout1 = result;
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
|
|
@ -246,10 +230,11 @@ namespace FineUIPro.Web.DataShow
|
|||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getC1 = from x in Funs.DB.SitePerson_DayReport
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
select x;
|
||||
var getC1 = (from x in Funs.DB.SeDin_MonthReport2
|
||||
join y in Funs.DB.SeDin_MonthReport on x.MonthReportId equals y.MonthReportId
|
||||
where y.ProjectId == projectId.ToString()
|
||||
orderby y.ReporMonth descending
|
||||
select x.ProjectWorkTime ?? 0).FirstOrDefault();
|
||||
|
||||
var getD1 = from x in Funs.DB.Accident_AccidentHandle
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
|
|
@ -262,25 +247,15 @@ namespace FineUIPro.Web.DataShow
|
|||
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getC1 = getC1.Where(x => x.CompileDate >= datetime1);
|
||||
getD1 = getD1.Where(x => x.AccidentDate >= datetime1);
|
||||
getD2 = getD2.Where(x => x.CompileDate >= datetime1);
|
||||
}
|
||||
if (datetime2.HasValue)
|
||||
{
|
||||
getC1 = getC1.Where(x => x.CompileDate <= datetime2);
|
||||
getD1 = getD1.Where(x => x.AccidentDate <= datetime2);
|
||||
getD2 = getD2.Where(x => x.CompileDate <= datetime2);
|
||||
}
|
||||
var getC = from x in Funs.DB.SitePerson_DayReportDetail
|
||||
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);
|
||||
}
|
||||
|
||||
cout1 = getC1;
|
||||
if (getD1.Count() > 0)
|
||||
{
|
||||
cout1 = cout1 - getD1.Sum(x => x.WorkHoursLoss ?? 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue