//暂存意见
    protected void bt_SaveComment_Click(object sender, EventArgs e)
    {
        if (tbx_Comment.Text == "")
        {
            MessageBox.Show(this, "批复意见必填");
            return;
        }

        string comment = tbx_Comment.Text.Trim();

        comment += "<br/>------" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "-------<br/>";

        EWF_Task_JobCCBLL JobCCBLL = new EWF_Task_JobCCBLL((int)ViewState["JobCCID"]);

        JobCCBLL.SaveComment(comment);

        #region 更新任务备注信息
        string remark = "抄送批注时间:<b><font color=red>" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "</font></b> ";
        remark += "抄送批注人:<b><font color=red>" + Session["UserRealName"].ToString() + "</font></b> ";
        remark += " 批注意见:<b><font color=red>" + tbx_Comment.Text + "</font></b> ";
        remark += "<br/>";

        EWF_TaskBLL taskbll = new EWF_TaskBLL((int)ViewState["TaskID"]);
        taskbll.AppendRemark(remark);

        if (cbx_NotifyInitiator.Checked)
        {
            string _content = "<b><font color=red>工作流处理通知!您发起的工作流有了批注信息!</font></b><br/>";
            _content += "工作流:<font color=red>" + lbl_AppName.Text + "</font><br/>";
            _content += "主题:<font color=red>" + lbl_Title.Text + "</font><br/><br/>";
            _content += remark;

            _content += "<br/><a href='" + this.ResolveUrl("~/SubModule/EWF/TaskDetail.aspx?TaskID=" + ViewState["TaskID"].ToString()) + "' target='_blank'><font color=blue>点击查看工作流详细情况</font></a><br/>";

            DataTable _users = new Org_StaffBLL(taskbll.Model.Initiator).GetUserList();
            foreach (DataRow dr_user in _users.Rows)
            {
                SendSM(dr_user["UserName"].ToString(), _content);
            }
        }
        #endregion

        MessageBox.ShowAndRedirect(this, "保存成功!", "TaskList_CC.aspx");
    }
    //暂存意见
    protected void bt_SaveDecisionComment_Click(object sender, EventArgs e)
    {
        if (tbx_DecisionComment.Text == "")
        {
            MessageBox.Show(this, "审批意见必填");
            return;
        }

        string comment = tbx_DecisionComment.Text.Trim();
        comment += "<br/>------" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "-------<br/>";

        EWF_Task_InviteConsultBLL InviteConsultBLL = new EWF_Task_InviteConsultBLL((int)ViewState["InviteConsult"]);
        InviteConsultBLL.SaveConsultComment(comment);

        #region 更新任务备注信息
        string remark = "协助时间:<b><font color=red>" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "</font></b> ";
        remark += "协助审批人:<b><font color=red>" + Session["UserRealName"].ToString() + "</font></b> ";
        remark += " 审批意见:<b><font color=red>" + tbx_DecisionComment.Text + "</font></b> ";
        remark += "<br/>";

        EWF_TaskBLL taskbll = new EWF_TaskBLL((int)ViewState["TaskID"]);
        taskbll.AppendRemark(remark);

        if (cbx_NotifyInitiator.Checked)
        {
            string _content = "<b><font color=red>工作流处理通知!您发起的协助邀审有了回复!</font></b><br/>";
            _content += "工作流:<font color=red>" + lbl_AppName.Text + "</font><br/>";
            _content += "主题:<font color=red>" + lbl_Title.Text + "</font><br/><br/>";
            _content += remark;

            _content += "<br/><a href='" + this.ResolveUrl("~/SubModule/EWF/TaskDetail.aspx?TaskID=" + ViewState["TaskID"].ToString()) + "' target='_blank'><font color=blue>点击查看工作流详细情况</font></a><br/>";

            DataTable _users = new Org_StaffBLL(InviteConsultBLL.Model.InvitedStaff).GetUserList();
            foreach (DataRow dr_user in _users.Rows)
            {
                SendSM(dr_user["UserName"].ToString(), _content);
            }
        }
        #endregion

        MessageBox.ShowAndRedirect(this, "保存成功!", "TaskList_InviteConsult.aspx");
    }
Пример #3
0
    protected void btn_pass_Click(object sender, EventArgs e)
    {
        int TaskID, JobCCID;

        foreach (GridViewRow row in gv_List.Rows)
        {
            CheckBox cb_check = (CheckBox)row.FindControl("cb_Check");
            if (cb_check.Checked)
            {
                TaskID  = int.Parse(gv_List.DataKeys[row.RowIndex]["TaskID"].ToString());
                JobCCID = int.Parse(gv_List.DataKeys[row.RowIndex]["ID"].ToString());
                EWF_TaskBLL       taskbll  = new EWF_TaskBLL(TaskID);
                EWF_Task_JobCCBLL JobCCBLL = new EWF_Task_JobCCBLL(JobCCID);
                if (taskbll.Model.EndTime == new DateTime(1900, 1, 1) && JobCCBLL.Model.ReadFlag != "Y")
                {
                    string comment = "已阅";
                    comment += "<br/>------" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "-------<br/>";
                    JobCCBLL.SaveComment(comment);

                    #region 更新任务备注信息
                    string remark = "抄送批注时间:<b><font color=red>" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "</font></b> ";
                    remark += "抄送批注人:<b><font color=red>" + Session["UserRealName"].ToString() + "</font></b> ";
                    remark += " 批注意见:<b><font color=red>已阅</font></b> ";
                    remark += "<br/>";


                    taskbll.AppendRemark(remark);

                    #endregion
                }
                if (JobCCBLL.Model.ReadFlag != "Y")
                {
                    JobCCBLL.SetReadFlag("Y");
                }
            }
        }
        MessageBox.Show(this, "批量审阅成功!");
        BindGrid();
    }
    protected void btn_pass_Click(object sender, EventArgs e)
    {
        int TaskID, JobCCID;
        foreach (GridViewRow row in gv_List.Rows)
        {
            CheckBox cb_check = (CheckBox)row.FindControl("cb_Check");
            if (cb_check.Checked)
            {
                TaskID = int.Parse(gv_List.DataKeys[row.RowIndex]["TaskID"].ToString());
                JobCCID = int.Parse(gv_List.DataKeys[row.RowIndex]["ID"].ToString());
                EWF_TaskBLL taskbll = new EWF_TaskBLL(TaskID);
                EWF_Task_JobCCBLL JobCCBLL = new EWF_Task_JobCCBLL(JobCCID);
                if (taskbll.Model.EndTime == new DateTime(1900, 1, 1) && JobCCBLL.Model.ReadFlag != "Y")
                {
                    string comment = "已阅";
                    comment += "<br/>------" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "-------<br/>";
                    JobCCBLL.SaveComment(comment);

                    #region 更新任务备注信息
                    string remark = "抄送批注时间:<b><font color=red>" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "</font></b> ";
                    remark += "抄送批注人:<b><font color=red>" + Session["UserRealName"].ToString() + "</font></b> ";
                    remark += " 批注意见:<b><font color=red>已阅</font></b> ";
                    remark += "<br/>";

                    taskbll.AppendRemark(remark);

                    #endregion

                }
                if (JobCCBLL.Model.ReadFlag != "Y")
                {
                    JobCCBLL.SetReadFlag("Y");
                }

            }
        }
        MessageBox.Show(this, "批量审阅成功!");
        BindGrid();
    }