protected void Button_save_Click(object sender, EventArgs e) { if (this.TextBox_spyj.Text.Length > this.TextBox_spyj.MaxLength) { this.JavaScriptControl1.Text = "alert('审核意见输入的内容过长!')"; return; } CheckInfo checkInfo = new CheckInfo(); if (base.Request["pk"] != null) { checkInfo.ID = int.Parse(base.Request["pk"].ToString()); } if (!string.IsNullOrEmpty(this.DateBox_sprq.Text.Trim().ToString())) { checkInfo.ExamineApproveDate = DateTime.Parse(this.DateBox_sprq.Text); } else { checkInfo.ExamineApproveDate = DateTime.Now; } checkInfo.ExamineApproveIdea = this.TextBox_spyj.Text; checkInfo.ExamineApprovePerson = this.TextBox_spr.Text; if (this.RadioButton_ok.Checked) { checkInfo.ExamineApproveResult = 1; } else { checkInfo.ExamineApproveResult = -1; } bool flag = CheckAction.CheckInfoOp(checkInfo, "Sp"); if (flag) { if (!this.RadioButton_ok.Checked) { CheckAction.UpdateThisSate(checkInfo.ID); } string text = " parent.desktop.flowclass.location='/EPC/17/Frame.aspx?url=../../epc/17/Entpm/PrjCheck/CheckList.aspx&Type=ShenHe&PrjState=0&Levels=0';"; text += "alert('保存成功');"; text += "top.frameWorkArea.window.desktop.getActive().close();"; this.JavaScriptControl1.Text = text; return; } this.JavaScriptControl1.Text = "alert('保存失败!');"; }
protected void Button_save_Click(object sender, EventArgs e) { if (this.TextBox_jcnr.Text.Length > this.TextBox_jcnr.MaxLength) { this.JavaScriptControl1.Text = "top.ui.alert('检查内容输入的内容过长!')"; return; } if (this.TextBox_jcyj.Text.Length > this.TextBox_jcyj.MaxLength) { this.JavaScriptControl1.Text = "top.ui.alert('检查依据输入的内容过长!')"; return; } if (this.Textbox_jcjg.Text.Length > this.Textbox_jcjg.MaxLength) { this.JavaScriptControl1.Text = "top.ui.alert('检查结果输入的内容过长!')"; return; } if (this.Textbox_zgnr.Text.Length > this.Textbox_zgnr.MaxLength) { this.JavaScriptControl1.Text = "top.ui.alert('整改要求输入的内容过长!')"; return; } if (this.TextBox_xmjh.Text.Length > this.TextBox_xmjh.MaxLength) { this.JavaScriptControl1.Text = "top.ui.alert('项目部整改计划输入的内容过长!')"; return; } if (this.TextBox_sjjg.Text.Length > this.TextBox_sjjg.MaxLength) { this.JavaScriptControl1.Text = "top.ui.alert('实际整改结果输入的内容过长!')"; return; } if (this.Textbox_bz.Text.Length > this.Textbox_bz.MaxLength) { this.JavaScriptControl1.Text = "top.ui.alert('备注输入的内容过长!')"; return; } CheckInfo checkInfo = new CheckInfo(); if (base.Request["pk"] != null) { checkInfo.ID = int.Parse(base.Request["pk"].ToString()); } checkInfo.Flags = 2; checkInfo.ExamineUnit = this.TextBox_jcdw.Text; checkInfo.AcceptCheckAnswerForPerson = this.TextBox_jcfzr.Text; checkInfo.AcceptCheckContent = this.TextBox_jcnr.Text; if (!string.IsNullOrEmpty(this.DateBox_jcrq.Text)) { checkInfo.AcceptCheckDate = DateTime.Parse(this.DateBox_jcrq.Text); } else { checkInfo.AcceptCheckDate = DateTime.Now; } checkInfo.AcceptCheckGist = this.TextBox_jcyj.Text; checkInfo.AcceptCheckResult = this.Textbox_jcjg.Text; if (this.DropDownList_lb.SelectedValue != "") { checkInfo.AcceptCheckSort = int.Parse(this.DropDownList_lb.SelectedValue); } checkInfo.AcceptCheckUnit = this.TextBox_sjdw.Text; checkInfo.CompleteApplyContent = this.Textbox_zgnr.Text; checkInfo.Remark = this.Textbox_bz.Text; if (this.DateBox_yqwcsj.Text != "") { checkInfo.requestfinishtime = DateTime.Parse(this.DateBox_yqwcsj.Text); } if (this.DateBox_jhwcsj.Text != "") { checkInfo.planfinishtime = DateTime.Parse(this.DateBox_jhwcsj.Text); } if (this.DateBox_sjwcsj.Text != "") { checkInfo.factfinishtime = DateTime.Parse(this.DateBox_sjwcsj.Text); } checkInfo.prjplan = this.TextBox_xmjh.Text; checkInfo.factresult = this.TextBox_sjjg.Text; checkInfo.IsRectified = false; checkInfo.checkResults = int.Parse(this.ddlCheckResults.SelectedValue); base.Request.Params["Type"].ToString(); if (base.Request.Params["Type"].ToString() == PageType.Rectify.ToString()) { checkInfo.IsRectified = true; } else { if (base.Request.Params["Type"].ToString() == PageType.Certify.ToString()) { checkInfo.IsRectified = (this.ddlCertifiResult.SelectedValue == "2"); } } checkInfo.CertifiResult = int.Parse(this.ddlCertifiResult.SelectedValue); checkInfo.CheckResult = int.Parse(this.ddlCheckResult.SelectedValue); int mark = 2; if (this.cbkmark.Checked) { mark = 3; } if (this.ViewState["Mark"].ToString().Equals("1")) { mark = 1; } checkInfo.Mark = mark; checkInfo.FilesType = int.Parse(this.DDTClass.SelectedValue.ToString()); checkInfo.RectifyMarkID = this.FileLink2.FID; if (base.Request["Levels"] != null) { checkInfo.Flags = int.Parse(base.Request["Levels"].ToString()); } if (base.Request["Prjcode"] != null) { checkInfo.PrjCode = base.Request["Prjcode"].ToString(); } new StringBuilder(); bool flag; if (base.Request["pk"] == null) { flag = CheckAction.CheckInfoOp(checkInfo, "Insert"); } else { flag = CheckAction.CheckInfoOp(checkInfo, "Update"); } if (flag) { base.RegisterScript("top.ui.tabSuccess({ parentName: '_checklist' });"); return; } base.RegisterScript("top.ui.alert('保存失败!');"); }