Esempio n. 1
0
    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('保存失败!');";
    }