0110-gaofei

This commit is contained in:
gaofei
2022-01-10 10:55:18 +08:00
parent 93996822ec
commit d02cd7ff74
9 changed files with 673 additions and 68 deletions
@@ -36,6 +36,12 @@
LabelAlign="Right">
</f:Label>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnAdd" Icon="Add" runat="server" ToolTip="计划增加一个月"
OnClick="btnAdd_Click">
</f:Button>
<f:Button ID="btnDel" Icon="Delete" runat="server" ToolTip="计划减少一个月"
OnClick="btnDel_Click">
</f:Button>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存"
OnClick="btnSave_Click">
</f:Button>
@@ -286,6 +286,40 @@ namespace FineUIPro.Web.JDGL.WBS
}
}
/// <summary>
/// 增加计划月份
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAdd_Click(object sender, EventArgs e)
{
Save();
Model.Wbs_WbsSet wbsSet1 = BLL.WbsSetService.GetWbsSetByWbsSetId(Id);
if (wbsSet1.EndDate != null)
{
wbsSet1.EndDate = wbsSet1.EndDate.Value.AddMonths(1);
BLL.WbsSetService.UpdateWbsSet(wbsSet1);
}
PageContext.RegisterStartupScript(String.Format("window.location.reload();"));
}
/// <summary>
/// 减少计划月份
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnDel_Click(object sender, EventArgs e)
{
Save();
Model.Wbs_WbsSet wbsSet1 = BLL.WbsSetService.GetWbsSetByWbsSetId(Id);
if (wbsSet1.EndDate != null)
{
wbsSet1.EndDate = wbsSet1.EndDate.Value.AddMonths(-1);
BLL.WbsSetService.UpdateWbsSet(wbsSet1);
}
PageContext.RegisterStartupScript(String.Format("window.location.reload();"));
}
#region
/// <summary>
/// 保存按钮
@@ -293,6 +327,13 @@ namespace FineUIPro.Web.JDGL.WBS
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
Save();
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHideReference());
}
private void Save()
{
Model.Wbs_WbsSet wbsSet1 = BLL.WbsSetService.GetWbsSetByWbsSetId(Id);
DateTime startDate, endDate, startMonth, endMonth;
@@ -418,8 +459,6 @@ namespace FineUIPro.Web.JDGL.WBS
}
}
}
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHideReference());
}
#region
@@ -758,7 +797,7 @@ namespace FineUIPro.Web.JDGL.WBS
Response.Charset = "GB2312";
Response.ContentEncoding = System.Text.Encoding.UTF8;
// 添加头信息,为"文件下载/另存为"对话框指定默认文件名
Response.AddHeader("Content-Disposition", "attachment; filename="+ Server.UrlEncode("工作量录入_" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".xls"));
Response.AddHeader("Content-Disposition", "attachment; filename=" + Server.UrlEncode("工作量录入_" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".xls"));
// 添加头信息,指定文件大小,让浏览器能够显示下载进度
Response.AddHeader("Content-Length", filet.Length.ToString());
// 指定返回的是一个不能被客户端读取的流,必须被下载
@@ -66,6 +66,24 @@ namespace FineUIPro.Web.JDGL.WBS {
/// </remarks>
protected global::FineUIPro.Label txtCostControlName;
/// <summary>
/// btnAdd 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAdd;
/// <summary>
/// btnDel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDel;
/// <summary>
/// btnSave 控件。
/// </summary>