提交代码
This commit is contained in:
@@ -84,7 +84,7 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
days.Add(startDate);
|
||||
startDate = startDate.AddDays(1);
|
||||
} while (startDate <= endDate);
|
||||
GroupField gd = Grid1.Columns[12] as GroupField;
|
||||
GroupField gd = Grid1.Columns[13] as GroupField;
|
||||
for (int i = 0; i < days.Count; i++)
|
||||
{
|
||||
RenderField d = new RenderField();
|
||||
@@ -110,9 +110,11 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BLL.DrawingService.InitDrawingChangeDropDownList(drpDrawingNo, this.CurrUser.LoginProjectId, true);
|
||||
//BLL.TeamGroupService.InitTeamGroupProjectDropDownList(drpWorkTeam, this.CurrUser.LoginProjectId, true);
|
||||
if (!string.IsNullOrEmpty(Request.Params["DrawingNo"]))
|
||||
{
|
||||
this.txtDrawingNo.Text = Request.Params["DrawingNo"];
|
||||
this.drpDrawingNo.SelectedValue = Request.Params["DrawingNo"];
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Request.Params["Part"]))
|
||||
{
|
||||
@@ -147,10 +149,10 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
where C.ProjectId = @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue));
|
||||
if (!string.IsNullOrEmpty(this.txtDrawingNo.Text.Trim()))
|
||||
if (this.drpDrawingNo.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND DrawingNo like @DrawingNo";
|
||||
listStr.Add(new SqlParameter("@DrawingNo", "%" + this.txtDrawingNo.Text.Trim() + "%"));
|
||||
strSql += " AND DrawingNo = @DrawingNo";
|
||||
listStr.Add(new SqlParameter("@DrawingNo", this.drpDrawingNo.SelectedItem.Text));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtPart.Text.Trim()))
|
||||
{
|
||||
@@ -274,7 +276,7 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
var dayInput = dayInputs.FirstOrDefault(x => x.BaseId == baseId && x.Date == d && x.WorkTeam == workTeamId);
|
||||
if (dayInput != null)
|
||||
{
|
||||
this.Grid1.Rows[i].Values[13 + j] = dayInput.DayAmount.Value.ToString("0.##");
|
||||
this.Grid1.Rows[i].Values[14 + j] = dayInput.DayAmount.Value.ToString("0.##");
|
||||
monthComplete += dayInput.DayAmount.Value;
|
||||
}
|
||||
j++;
|
||||
@@ -287,9 +289,9 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
}
|
||||
decimal completedAmount = dayInputs.Where(x => x.BaseId == baseId && x.WorkTeam == workTeamId).ToList().Sum(x => x.DayAmount ?? 0);
|
||||
decimal totalCompletedAmount = dayInputs.Where(x => x.BaseId == baseId).ToList().Sum(x => x.DayAmount ?? 0);
|
||||
this.Grid1.Rows[i].Values[9] = completedAmount.ToString("0.##");
|
||||
this.Grid1.Rows[i].Values[10] = (totalAmount - totalCompletedAmount).ToString("0.##");
|
||||
this.Grid1.Rows[i].Values[11] = monthComplete.ToString("0.##");
|
||||
this.Grid1.Rows[i].Values[10] = completedAmount.ToString("0.##");
|
||||
this.Grid1.Rows[i].Values[11] = (totalAmount - totalCompletedAmount).ToString("0.##");
|
||||
this.Grid1.Rows[i].Values[12] = monthComplete.ToString("0.##");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -337,7 +339,7 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
/// <param name="e"></param>
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
string url = "~/CQMS/QuantityManagement/DayInputStatistics.aspx?Date=" + this.txtMonths.Text.Trim() + "&DrawingNo=" + this.txtDrawingNo.Text.Trim()
|
||||
string url = "~/CQMS/QuantityManagement/DayInputStatistics.aspx?Date=" + this.txtMonths.Text.Trim() + "&DrawingId=" + this.drpDrawingNo.SelectedValue
|
||||
+ "&Part=" + this.txtPart.Text.Trim() + "&ProjectContent=" + this.txtProjectContent.Text.Trim() + "&ProjectId=" + this.drpProject.SelectedValue;
|
||||
PageContext.Redirect(url, "_self");
|
||||
}
|
||||
@@ -523,18 +525,18 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
row = sheet.GetRow(r0);
|
||||
for (int i = 0; i < days.Count; i++)
|
||||
{
|
||||
cell = row.CreateCell(12 + i);
|
||||
cell = row.CreateCell(13 + i);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue("完成工程量");
|
||||
}
|
||||
row = sheet.GetRow(r);
|
||||
for (int i = 0; i < days.Count; i++)
|
||||
{
|
||||
cell = row.CreateCell(12 + i);
|
||||
cell = row.CreateCell(13 + i);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Format("{0:MM-dd}", days[i]));
|
||||
}
|
||||
sheet.AddMergedRegion(new CellRangeAddress(0, 0, 12, 11 + days.Count));
|
||||
sheet.AddMergedRegion(new CellRangeAddress(0, 0, 13, 12 + days.Count));
|
||||
r++;
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
@@ -575,11 +577,14 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
cell = row.CreateCell(11);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[11].ToString());
|
||||
cell = row.CreateCell(12);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[12].ToString());
|
||||
for (int j = 0; j < days.Count; j++)
|
||||
{
|
||||
cell = row.CreateCell(12 + j);
|
||||
cell = row.CreateCell(13 + j);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[13 + j].ToString());
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[14 + j].ToString());
|
||||
}
|
||||
}
|
||||
// 第三步:写入文件流
|
||||
@@ -610,5 +615,39 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void drpDrawingNo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Model.QuantityManagement_Drawing drawing = BLL.DrawingService.GetDrawingById(this.drpDrawingNo.SelectedValue);
|
||||
Model.QuantityManagement_Change change = BLL.ChangeService.GetChangeById(this.drpDrawingNo.SelectedValue);
|
||||
if (drawing != null)
|
||||
{
|
||||
//this.txtWorkSection.Text = drawing.WorkSection;
|
||||
//this.txtDrawingName.Text = drawing.DrawingName;
|
||||
//BLL.BaseService.InitPartDropDownList(this.drpPart, drawing.DrawingId, true);
|
||||
//this.drpPart.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
else if (change != null)
|
||||
{
|
||||
//this.txtWorkSection.Text = change.WorkSection;
|
||||
//this.txtDrawingName.Text = change.ChangeName;
|
||||
//BLL.BaseService.InitPartDropDownList(this.drpPart, change.ChangeId, true);
|
||||
//this.drpPart.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
else
|
||||
{
|
||||
//this.txtWorkSection.Text = string.Empty;
|
||||
//this.txtDrawingName.Text = string.Empty;
|
||||
//this.drpPart.Items.Clear();
|
||||
//Funs.FineUIPleaseSelect(this.drpPart);
|
||||
//this.drpPart.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
//this.drpProjectContent.Items.Clear();
|
||||
//Funs.FineUIPleaseSelect(this.drpProjectContent);
|
||||
//this.drpProjectContent.SelectedValue = BLL.Const._Null;
|
||||
//this.txtUnit.Text = string.Empty;
|
||||
//this.txtAmount.Text = string.Empty;
|
||||
//this.drpWorkTeam.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user