Exemplo n.º 1
0
    /// <summary>
    /// 保存明细
    /// </summary>
    private void UpdateTY_OA_MgrTaskDtl()
    {
        List <TY_OA_MgrTaskDtlModel> Models = GetScreenDtl();

        RmsOA.BFL.TY_OA_MgrTaskDtlBFL bfl = new RmsOA.BFL.TY_OA_MgrTaskDtlBFL();
        bfl.UpdateTY_OA_MgrTaskDtlList(Models, RmsPM.BLL.ConvertRule.ToInt(this.MgrCode.Text));
    }
Exemplo n.º 2
0
    protected void FormView1_DataBound(object sender, EventArgs e)
    {
        if (FormView1.CurrentMode == FormViewMode.ReadOnly)
        {
            RmsOA.BFL.TY_OA_MgrTaskDtlBFL     dtlbfl = new RmsOA.BFL.TY_OA_MgrTaskDtlBFL();
            RmsOA.MODEL.TY_OA_MgrTaskDtlModel dtlmdl = dtlbfl.GetTY_OA_MgrTaskDtl(RmsPM.BLL.ConvertRule.ToInt(Request.QueryString["MgrDtlCode"]));
            Button btnDelete = ((Button)this.FormView1.Row.FindControl("btnDelete"));
            dtlmdl = dtlbfl.GetTY_OA_MgrTaskDtl(RmsPM.BLL.ConvertRule.ToInt(Request.QueryString["MgrDtlCode"]));
            if (btnDelete != null)
            {
                btnDelete.Attributes["OnClick"] = "javascript:return confirm('确实要删除当前任务吗?')";


                //有审核中或审核完的明细的任务不能删除
                if (dtlmdl.State == "2" || dtlmdl.State == "3")
                {
                    btnDelete.Visible = false;
                }
            }


            if (dtlmdl.State == "1")//只有待审状态可见提交
            {
                ((System.Web.UI.HtmlControls.HtmlInputButton) this.FormView1.Row.FindControl("btnRequisition")).Visible = true;
            }
            else
            {
                ((System.Web.UI.HtmlControls.HtmlInputButton) this.FormView1.Row.FindControl("btnRequisition")).Visible = false;
            }

            System.Web.UI.WebControls.Label lblteamers = (System.Web.UI.WebControls.Label) this.FormView1.Row.FindControl("Eyeteamer");
            if (!string.IsNullOrEmpty(lblteamers.Text))
            {
                lblteamers.Text = lblteamers.Text.Substring(0, lblteamers.Text.Length - 1);
            }
            string[] teamers    = lblteamers.Text.Split(',');
            string   newteamers = "";
            foreach (string teamer in teamers)
            {
                newteamers += RmsPM.BLL.SystemRule.GetUserName(teamer) + ";";
            }
            if (!string.IsNullOrEmpty(newteamers))
            {
                newteamers = newteamers.Substring(0, newteamers.Length - 1);
            }
            lblteamers.Text = newteamers;
        }
    }
Exemplo n.º 3
0
    protected void FormView1_DataBound(object sender, EventArgs e)
    {
        if (FormView1.CurrentMode == FormViewMode.ReadOnly)
        {
            Button btnDelete = ((Button)this.FormView1.Row.FindControl("btnDelete"));
            if (btnDelete != null)
            {
                btnDelete.Attributes["OnClick"] = "javascript:return confirm('确实要删除当前事宜吗?')";
            }


            TY_OA_MgrTaskBFL    Taskbfl    = new TY_OA_MgrTaskBFL();
            TY_OA_MgrTaskDtlBFL Taskdtlbfl = new TY_OA_MgrTaskDtlBFL();
            TY_OA_MgrTaskModel  TaskMl     = Taskbfl.GetTY_OA_MgrTask(RmsPM.BLL.ConvertRule.ToInt(this.MgrCode.Text));

            List <TY_OA_MgrTaskDtlModel> TaskDtlMl = Taskdtlbfl.GetTY_OA_MgrTaskDtlList(RmsPM.BLL.ConvertRule.ToInt(this.MgrCode.Text));
            foreach (TY_OA_MgrTaskDtlModel DtlMl in TaskDtlMl)
            {
                //有审核中或审核完的明细的任务不能删除
                if (DtlMl.State == "2" || DtlMl.State == "3")
                {
                    btnDelete.Visible = false;
                    break;
                }
            }

            string[] Links = TaskMl.ReferLink.Split(';');
            int      i     = -1;

            foreach (string EachLink in Links)
            {
                i++;
                if (!string.IsNullOrEmpty(EachLink))
                {
                    string[] ForLink = EachLink.Split(',');
                    //lblWorkFlowTitle.Text = ShowApplicationHyperLink(entity.GetString("WorkFlowTitle"), string.Format(ud_sHyperLinkFormat, this.OperationCode, this.ProjectCode));
                    ((System.Web.UI.HtmlControls.HtmlTableCell) this.FormView1.Row.FindControl("ReferLinkID")).InnerHtml += "<a href='##' onclick='MonitorgotoDirect(\"" + ForLink[0] + "\",\"" + ForLink[1] + "\",\"" + ForLink[2] + "\",\"" + ForLink[3] + "\",\"" + ForLink[4] + "\"); return false;'>" + RmsPM.BLL.WorkFlowRule.GetWorkFlowCaseTitle(ForLink[0]) + "</a>  ";
                    //((System.Web.UI.HtmlControls.HtmlTableCell)this.FormView1.Row.FindControl("ReferLinkID")).InnerHtml += "<a href='##' onclick='MonitorgotoDirect(" + EachLink + "," + "," + "," + "," + "); return false;'>" + RmsPM.BLL.WorkFlowRule.GetWorkFlowCaseTitle(EachLink) + "</a>&nbsp;";
                }
            }


            Label status = (Label)this.FormView1.Row.FindControl("StatusID");
            bool  isend  = true;
            TY_OA_MgrTaskDtlBFL dtbfl = new TY_OA_MgrTaskDtlBFL();
            if (this.MgrCode.Text != "")
            {
                List <TY_OA_MgrTaskDtlModel> dtlmdLst = dtbfl.GetTY_OA_MgrTaskDtlList(RmsPM.BLL.ConvertRule.ToInt(this.MgrCode.Text));

                foreach (TY_OA_MgrTaskDtlModel mdl in dtlmdLst)
                {
                    //有审核中流程则状态为未完成
                    if (mdl.State == "2")
                    {
                        isend = false;
                        if (status != null)
                        {
                            status.Text = "流程审评中";
                        }
                        break;
                    }
                }
            }
            if (isend && status != null)
            {
                status.Text = "无审核中流程";
            }

            //RmsOA.BFL.TY_OA_MgrTaskDtlBFL bfl = new RmsOA.BFL.TY_OA_MgrTaskDtlBFL();
            //List<TY_OA_MgrTaskDtlModel> Models = bfl.GetTY_OA_MgrTaskDtlList(RmsPM.BLL.ConvertRule.ToInt(this.MgrCode.Text));
            //ViewState["Models"] = Models;
        }
        else
        {
            DataGrid dgDtl = (DataGrid)this.FormView1.Row.FindControl("dgDtl");
            if (dgDtl != null)
            {
                RmsOA.BFL.TY_OA_MgrTaskDtlBFL bfl    = new RmsOA.BFL.TY_OA_MgrTaskDtlBFL();
                List <TY_OA_MgrTaskDtlModel>  Models = bfl.GetTY_OA_MgrTaskDtlList(RmsPM.BLL.ConvertRule.ToInt(this.MgrCode.Text));
                ViewState["Models"] = Models;
                BindDtl(Models);
            }
        }
    }