Esempio n. 1
0
        private void bt_save_Click(object sender, EventArgs e)
        {
            bool flag = false;

            if (tb_note.Text.Trim() == "")
            {
                if (MessageBox.Show("当前内容为空,您确定保存吗?", "保存确定对话框", MessageBoxButtons.OKCancel)
                    == DialogResult.OK)
                {
                    ProgressScreen.Current.ShowSplashScreen();
                    flag = true;
                }
                else
                {
                    return;
                }
            }
            else
            {
                flag = true;
            }
            if (flag)
            {
                ProgressScreen.Current.SetStatus = "正在上传数据,请稍等......";
                DepositoryEvaluateDataList.SaveInvalidReportNote(invalidReportID, tb_note.Text.Trim(), userType);

                SaveIamge();
                ProgressScreen.Current.CloseSplashScreen();
                this.Close();
            }
        }
Esempio n. 2
0
        private void bt_save_cljg_Click(object sender, EventArgs e)
        {
            bool flag = false;

            if (tb_cljg.Text.Trim() == "")
            {
                if (MessageBox.Show("当前内容为空,您确定保存吗?", "保存确定对话框", MessageBoxButtons.OKCancel)
                    == DialogResult.OK)
                {
                    flag = true;
                }
                else
                {
                    return;
                }
            }
            else
            {
                flag = true;
            }
            if (flag)
            {
                DepositoryEvaluateDataList.SaveInvalidReportNote(invalidReportID, tb_cljg.Text.Trim(), 2);
                MessageBox.Show("保存成功");
            }
        }
Esempio n. 3
0
        private void InitNoteByUserType()
        {
            string strNote = string.Empty;

            if (this.Text == "监理意见")
            {
                strNote = DepositoryEvaluateDataList.GetInvalidReportNote(invalidReportID, 1);
            }
            else if (this.Text == "原因分析")
            {
                strNote = DepositoryEvaluateDataList.GetInvalidReportNote(invalidReportID, 0);
            }
            else if (this.Text == "处理结果")
            {
                strNote  = DepositoryEvaluateDataList.GetInvalidReportNote(invalidReportID, 2);
                userType = 2;
            }
            string strCode = Yqun.Common.ContextCache.ApplicationContext.Current.InTestRoom.Code;

            //if (strCode == "-1" || strCode == "-2")
            //有值了,则不能修改
            if (!string.IsNullOrEmpty(strNote) && strCode != "-1" && strCode != "-2")
            {
                tb_note.Enabled = false;
            }
            else
            {
                tb_note.Enabled = true;
            }
            tb_note.Text = strNote;
            oldContent   = tb_note.Text;
        }
Esempio n. 4
0
        /// <summary>
        ///
        /// </summary>
        public void GetImageDataTable()
        {
            dtImage = null;
            dtImage = DepositoryEvaluateDataList.GetImage(invalidReportID, this.Text);
            if (dtImage != null && dtImage.Rows.Count > 0)
            {
                for (int i = 0; i < dtImage.Rows.Count; i++)
                {
                    this.fpSpread1.ActiveSheet.AddRows(0, 1);
                    this.fpSpread1.ActiveSheet.Cells[0, 0].Value  = dtImage.Rows[i]["ImgID"].ToString();
                    this.fpSpread1.ActiveSheet.Cells[0, 1].Value  = dtImage.Rows[i]["ImgName"].ToString();
                    this.fpSpread1.ActiveSheet.Cells[0, 0].Locked = true;
                    this.fpSpread1.ActiveSheet.Cells[0, 1].Locked = true;
                }
            }
            //隐藏图片删除按钮
            string strCode = Yqun.Common.ContextCache.ApplicationContext.Current.InTestRoom.Code;

            if (strCode == "-1" || strCode == "-2")
            {
                fpSpread1.ActiveSheet.Columns[2].Visible = true;
            }
            else
            {
                fpSpread1.ActiveSheet.Columns[2].Visible = false;
            }
        }
Esempio n. 5
0
 /// <summary>
 /// 保存图片
 /// </summary>
 public void SaveIamge()
 {
     if (dtImage != null)
     {
         DepositoryEvaluateDataList.SaveIamge(dtImage);
     }
 }
Esempio n. 6
0
 private void  除图片ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (selectedImg != null)
     {
         if (selectedImg.Tag != null)
         {
             DepositoryEvaluateDataList.DelIamge(selectedImg.Tag.ToString());
         }
         FlowLayoutPanel p = selectedImg.Parent as FlowLayoutPanel;
         if (p != null)
         {
             p.Controls.Remove(selectedImg);
             selectedImg = null;
         }
     }
 }
Esempio n. 7
0
        /// <summary>
        /// 审批修改
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        static void Label3_Click(object sender, EventArgs e)
        {
            //获得当前用户名称和单位类型

            List <String> RoomCodes = DepositoryEvaluateDataList.GetTestRoomList();

            DataTable Data = DepositoryDataModificationInfo.InitDataModificationList(RoomCodes.ToArray());

            if (Data != null)
            {
                QuerySponsorModifyDialog Dialog = new QuerySponsorModifyDialog();
                Form Owner = Cache.CustomCache[SystemString.主窗口] as Form;
                Dialog.Location = Owner.PointToScreen(Owner.ClientRectangle.Location);
                Dialog.Size     = Owner.ClientRectangle.Size;
                Dialog.Show();
            }
        }
Esempio n. 8
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();
            }
        }
Esempio n. 9
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();
            }
        }
Esempio n. 10
0
 /// <summary>
 /// 删除图片信息
 /// </summary>
 /// <param name="Imgeid">图片ID</param>
 private void DelImg(string Imgeid)
 {
     DepositoryEvaluateDataList.DelIamge(Imgeid);
 }