20231114本部检查检查管理优化

This commit is contained in:
2023-11-14 16:02:36 +08:00
parent 0391faa14c
commit c76127bbba
11 changed files with 572 additions and 499 deletions
@@ -151,7 +151,7 @@ namespace FineUIPro.Web.OfficeCheck.Check
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnEdit_Click(object sender, EventArgs e)
{
{
string window = String.Format("CheckNoticeEdit.aspx?CheckNoticeId={0}", this.CheckNoticeId, "编辑 - ");
PageContext.RegisterStartupScript(Window1.GetShowReference(window));
}
@@ -300,6 +300,38 @@ namespace FineUIPro.Web.OfficeCheck.Check
/// <param name="e"></param>
protected void btnCheck1_Click(object sender, EventArgs e)
{
var checkInfo = BLL.CheckNoticeService.GetCheckNoticeById(this.CheckNoticeId);
if (checkInfo != null)
{
var getCheckCount = Funs.DB.ProjectSupervision_Check1.Where(x => x.CheckNoticeId == this.CheckNoticeId).Count();
if (getCheckCount == 0)
{
////增加明细
var checkTemplate = from x in Funs.DB.ProjectSupervision_CheckTemplate where x.Type == "1" select x;
if (checkTemplate.Count() > 0)
{
foreach (var item in checkTemplate)
{
Model.ProjectSupervision_Check1 check1 = new Model.ProjectSupervision_Check1
{
CheckNoticeId = this.CheckNoticeId,
ID = SQLHelper.GetNewID(),
SortIndex = item.SortIndex,
CheckItem = item.CheckItem,
CheckStandard = item.CheckStandard,
CheckMethod = item.CheckMethod,
BaseScore = item.BaseScore,
DeletScore = 0,
GetScore = item.BaseScore,
Type = item.Type
};
Funs.DB.ProjectSupervision_Check1.InsertOnSubmit(check1);
Funs.DB.SubmitChanges();
}
}
}
}
string window = String.Format("CheckContentEdit.aspx?CheckNoticeId={0}", this.CheckNoticeId, "编辑 - ");
PageContext.RegisterStartupScript(Window2.GetShowReference(window));
}