示例#1
0
        private void InitModificationDetail()
        {
            DataTable dt = DepositoryDataModificationInfo.HaveDataModificationInfoByID(ID);

            if (dt != null)
            {
                lb_user.Text = dt.Rows[0]["申请者"].ToString();
                lb_time.Text = dt.Rows[0]["申请日期"].ToString();


                tb_content.Text = dt.Rows[0]["Caption"].ToString();
                tb_reason.Text  = dt.Rows[0]["Reason"].ToString();


                lb_segment.Text   = dt.Rows[0]["标段名称"].ToString();
                lb_company.Text   = dt.Rows[0]["单位名称"].ToString();
                lb_testroom.Text  = dt.Rows[0]["试验室名称"].ToString();
                lb_modelName.Text = dt.Rows[0]["模板名称"].ToString();

                lb_approvePerson.Text = dt.Rows[0]["ApprovePerson"].ToString();
                lb_approveTime.Text   = dt.Rows[0]["ApproveTime"].ToString();
                lb_result.Text        = dt.Rows[0]["State"].ToString();
                tb_processReason.Text = dt.Rows[0]["ProcessReason"].ToString();

                int IsRequestStadium = int.Parse(dt.Rows[0]["IsRequestStadium"].ToString());
                chkIsRequestStadium.Checked = IsRequestStadium == 1 ? true : false;

                bt_yes.Visible           = false;
                bt_no.Visible            = false;
                tb_processReason.Enabled = false;

                if (dt.Rows[0]["State"].ToString() == "已提交")
                {
                    if (Yqun.Common.ContextCache.ApplicationContext.Current.InCompany.Type == "@unit_监理单位" ||
                        Yqun.Common.ContextCache.ApplicationContext.Current.IsAdministrator)
                    {
                        bt_yes.Visible           = true;
                        bt_no.Visible            = true;
                        tb_processReason.Enabled = true;
                    }
                }
            }
        }
示例#2
0
 private void RequestChange()
 {
     RequestID      = DocumentHelperClient.GetRequestChangeID(new Guid(invalidReportID));
     rdoYes.Enabled = false;
     rdoNo.Enabled  = false;
     if (RequestID == Guid.Empty)
     {
         chkSGRequest.Enabled = true;
         chkSGRequest.Checked = false;
     }
     else
     {
         chkSGRequest.Checked = true;
         chkSGRequest.Enabled = false;
         dtRequest            = DepositoryDataModificationInfo.HaveDataModificationInfoByID(RequestID.ToString());
         if (dtRequest != null && dtRequest.Rows.Count > 0)
         {
             if (dtRequest.Rows[0]["State"].ToString() == "已提交")
             {
                 if (Yqun.Common.ContextCache.ApplicationContext.Current.InCompany.Type == "@unit_监理单位" ||
                     Yqun.Common.ContextCache.ApplicationContext.Current.IsAdministrator)
                 {
                     rdoYes.Enabled = true;
                     rdoNo.Enabled  = true;
                 }
             }
             else if (dtRequest.Rows[0]["State"].ToString() == "通过")
             {
                 rdoYes.Checked = true;
             }
             else if (dtRequest.Rows[0]["State"].ToString() == "不通过")
             {
                 rdoNo.Checked = true;
             }
         }
     }
 }
示例#3
0
        private void bt_save_jlyj_Click(object sender, EventArgs e)
        {
            bool flag = false;

            bool IsRequest = false;

            dtRequest = DepositoryDataModificationInfo.HaveDataModificationInfoByID(RequestID.ToString());
            if (dtRequest != null && dtRequest.Rows.Count > 0)
            {
                if (dtRequest.Rows[0]["State"].ToString() == "已提交")
                {
                    if (Yqun.Common.ContextCache.ApplicationContext.Current.InCompany.Type == "@unit_监理单位" ||
                        Yqun.Common.ContextCache.ApplicationContext.Current.IsAdministrator)
                    {
                        IsRequest = true;
                    }
                }
            }
            if (string.IsNullOrEmpty(tb_jlyj.Text.Trim()) && IsRequest == true)
            {
                MessageBox.Show("监理意见不能为空!");
                return;
            }
            if (tb_jlyj.Text.Trim() == "")
            {
                if (MessageBox.Show("当前内容为空,您确定保存吗?", "保存确定对话框", MessageBoxButtons.OKCancel)
                    == DialogResult.OK)
                {
                    flag = true;
                }
                else
                {
                    return;
                }
            }
            else
            {
                flag = true;
            }
            if (flag)
            {
                DepositoryEvaluateDataList.SaveInvalidReportNote(invalidReportID, tb_jlyj.Text.Trim(), 1);
                if (dtRequest != null && dtRequest.Rows.Count > 0 && dtRequest.Rows[0]["State"].ToString() == "已提交")
                {
                    if (Yqun.Common.ContextCache.ApplicationContext.Current.InCompany.Type == "@unit_监理单位" ||
                        Yqun.Common.ContextCache.ApplicationContext.Current.IsAdministrator)
                    {
                        string strYesOrNo = "";
                        if (rdoYes.Checked)
                        {
                            strYesOrNo = rdoYes.Text;
                        }
                        else if (rdoNo.Checked)
                        {
                            strYesOrNo = rdoNo.Text;
                        }
                        if (!string.IsNullOrEmpty(strYesOrNo))
                        {
                            Boolean Result = DepositoryDataModificationInfo.UpdateDataModificationInfo(new string[] { RequestID.ToString() }, Yqun.Common.ContextCache.ApplicationContext.Current.UserName, strYesOrNo, tb_jlyj.Text.Trim());
                        }
                    }
                }

                MessageBox.Show("保存成功");
                //Close();
            }
        }