예제 #1
0
        private void ButtonOk_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtContent.Text.Trim()))
            {
                txtContent.Focus();
                return;
            }

            if (string.IsNullOrEmpty(txtReason.Text.Trim()))
            {
                txtReason.Focus();
                return;
            }


            Info.DocumentID       = DataID;
            Info.Caption          = txtContent.Text;
            Info.Reason           = txtReason.Text;
            Info.IsRequestStadium = chkIsRequestStadium.Checked == true ? 1 : 0;

            Boolean        Result  = DocumentHelperClient.NewRequestChange(Info);
            String         Message = (Result ? "申请修改成功。" : "申请修改失败!");
            MessageBoxIcon Icon    = (Result ? MessageBoxIcon.Information : MessageBoxIcon.Error);

            MessageBox.Show(Message, "提示", MessageBoxButtons.OK, Icon);

            Close();
        }
예제 #2
0
        private void bt_save_yyfx_Click(object sender, EventArgs e)
        {
            bool flag = false;

            RequestID = DocumentHelperClient.GetRequestChangeID(new Guid(invalidReportID));
            if (chkSGRequest.Checked && RequestID == Guid.Empty && string.IsNullOrEmpty(tb_yyfx.Text.Trim()))
            {
                MessageBox.Show("原因分析不能为空!");
                return;
            }
            if (tb_yyfx.Text.Trim() == "")
            {
                if (MessageBox.Show("当前内容为空,您确定保存吗?", "保存确定对话框", MessageBoxButtons.OKCancel)
                    == DialogResult.OK)
                {
                    flag = true;
                }
                else
                {
                    return;
                }
            }
            else
            {
                flag = true;
            }
            if (flag)
            {
                DepositoryEvaluateDataList.SaveInvalidReportNote(invalidReportID, tb_yyfx.Text.Trim(), 0);
                if (RequestID == Guid.Empty && chkSGRequest.Checked == true)
                {
                    Sys_RequestChange Info = new Sys_RequestChange();

                    Info.DocumentID = new Guid(invalidReportID);
                    Info.Caption    = "";// TextBox_Content.Text;
                    Info.Reason     = tb_yyfx.Text;

                    Boolean Result = DocumentHelperClient.NewRequestChange(Info);
                }
                MessageBox.Show("保存成功");
                //this.Close();
            }
        }