提交代码

This commit is contained in:
2024-04-01 10:29:19 +08:00
parent 0ae4143492
commit 8df0e06e6b
23 changed files with 27332 additions and 53 deletions
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
@@ -43,6 +44,7 @@ namespace FineUIPro.Web.Personal
var MonthSummary = BLL.Person_TestRunMonthSummaryService.GetPersonTestRunMonthSummaryById(this.TestRunMonthSummaryId);
if (MonthSummary != null)
{
this.hdId.Text = this.TestRunMonthSummaryId;
if (MonthSummary.RaiseDate != null)
{
this.txtRaiseDate.Text = string.Format("{0:yyyy-MM-dd}", MonthSummary.RaiseDate);
@@ -52,6 +54,7 @@ namespace FineUIPro.Web.Personal
{
this.drpProject.SelectedValue = MonthSummary.ProjectId;
}
this.txtMajor.Text = MonthSummary.Major;
this.txtProcessName.Text = MonthSummary.ProcessName;
this.txtProblemDescription.Text = MonthSummary.ProblemDescription;
this.txtHandleMethod.Text = MonthSummary.HandleMethod;
@@ -60,6 +63,7 @@ namespace FineUIPro.Web.Personal
}
else
{
this.txtMajor.Text = "开车";
this.lbUserName.Text = this.CurrUser.UserName;
}
}
@@ -87,6 +91,7 @@ namespace FineUIPro.Web.Personal
RaiseDate = Funs.GetNewDateTimeOrNow(this.txtRaiseDate.Text.Trim()),
UserId = this.CurrUser.UserId,
ProjectId = this.drpProject.SelectedValue,
Major = this.txtMajor.Text.Trim(),
ProcessName = this.txtProcessName.Text.Trim(),
ProblemDescription = this.txtProblemDescription.Text.Trim(),
HandleMethod = this.txtHandleMethod.Text.Trim(),
@@ -100,7 +105,14 @@ namespace FineUIPro.Web.Personal
}
else
{
newMonthSummary.TestRunMonthSummaryId = SQLHelper.GetNewID();
if (!string.IsNullOrEmpty(this.hdId.Text))
{
newMonthSummary.TestRunMonthSummaryId = this.hdId.Text;
}
else
{
newMonthSummary.TestRunMonthSummaryId = SQLHelper.GetNewID();
}
BLL.Person_TestRunMonthSummaryService.AddPersonTestRunMonthSummary(newMonthSummary);
BLL.LogService.AddSys_Log(this.CurrUser, null, newMonthSummary.TestRunMonthSummaryId, BLL.Const.TestRunMonthSummaryMenuId, BLL.Const.BtnModify);
}
@@ -108,5 +120,61 @@ namespace FineUIPro.Web.Personal
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
#region
/// <summary>
/// 附件上传
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttach_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录
{
this.hdId.Text = SQLHelper.GetNewID();
}
if (!string.IsNullOrEmpty(Request.Params["type"]))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/TestRun/TestRunMonthSummary&menuId={1}", this.hdId.Text, BLL.Const.TestRunMonthSummaryMenuId)));
}
else
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/TestRun/TestRunMonthSummary&menuId={1}", this.hdId.Text, BLL.Const.TestRunMonthSummaryMenuId)));
}
}
/// <summary>
/// 附件上传
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachR_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录
{
this.hdId.Text = SQLHelper.GetNewID();
}
if (!string.IsNullOrEmpty(Request.Params["type"]))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/TestRun/TestRunMonthSummary&menuId={1}", this.hdId.Text + "R", BLL.Const.TestRunMonthSummaryMenuId)));
}
else
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/TestRun/TestRunMonthSummary&menuId={1}", this.hdId.Text + "R", BLL.Const.TestRunMonthSummaryMenuId)));
}
}
#endregion
#region
/// <summary>
/// 关闭弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
{
}
#endregion
}
}