示例#1
0
        private void ToolStripButton_Click(object sender, EventArgs e)
        {
            ToolStripButton Button   = sender as ToolStripButton;
            int             RowIndex = FpSpread.ActiveSheet.ActiveRowIndex;

            if (RowIndex != -1)
            {
                if (DialogResult.OK == MessageBox.Show("确认将选中的申请设置为 ‘" + Button.Text + "’?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information))
                {
                    List <DataModificationInfo> Infos = new List <DataModificationInfo>();
                    List <String> IDs = new List <String>();

                    String   Tag    = FpSpread.ActiveSheet.ActiveRow.Tag.ToString();
                    String[] Tokens = Tag.Split(',');
                    IDs.Add(Tokens[0]);

                    Boolean        Result  = DepositoryDataModificationInfo.UpdateDataModificationInfo(IDs.ToArray(), Yqun.Common.ContextCache.ApplicationContext.Current.UserName, Button.Text, "");
                    String         Message = (Result ? "设置成功。" : "设置失败");
                    MessageBoxIcon Icon    = (Result ? MessageBoxIcon.Information : MessageBoxIcon.Error);
                    MessageBox.Show(Message, "提示", MessageBoxButtons.OK, Icon);

                    if (Result)
                    {
                        FpSpread.ActiveSheet.Rows[RowIndex].Visible = false;
                    }
                }
            }
        }
示例#2
0
        private void ModificationDetailView_Load(object sender, EventArgs e)
        {
            InitModificationDetail();
            logID = DepositoryDataModificationInfo.GetOperateLogIDByModifyID(ID);

            if (logID == 0)
            {
                bt_editProcess.Enabled = false;
                bt_editProcess.Text    = "申请人还未对此资料进行修改";
            }
            else
            {
                bt_editProcess.Enabled = true;
                bt_editProcess.Text    = "查看修改过程";
            }
        }
示例#3
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();
            }
        }
示例#4
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;
                    }
                }
            }
        }
示例#5
0
        private void bt_yes_Click(object sender, EventArgs e)
        {
            if (tb_processReason.Text.Trim() == "")
            {
                MessageBox.Show("处理意见不能为空!");
                return;
            }
            Button b = sender as Button;

            if (DialogResult.OK == MessageBox.Show("确认将此的报告设置为 ‘" + b.Text + "’?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information))
            {
                Boolean        Result  = DepositoryDataModificationInfo.UpdateDataModificationInfoAndStadium(new string[] { ID }, Yqun.Common.ContextCache.ApplicationContext.Current.UserName, b.Text, tb_processReason.Text.Trim(), chkIsRequestStadium.Checked ? 1 : 0);
                String         Message = (Result ? "设置成功。" : "设置失败");
                MessageBoxIcon Icon    = (Result ? MessageBoxIcon.Information : MessageBoxIcon.Error);
                MessageBox.Show(Message, "提示", MessageBoxButtons.OK, Icon);

                this.Close();
            }
        }
示例#6
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;
             }
         }
     }
 }
示例#7
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();
            }
        }