Пример #1
0
        public void BindStep1()
        {
            this.Pub1.AddTable("width='70%'");
            this.Pub1.AddCaptionLeft("设置流程条跳转审批规则:<a href='GetTask.aspx'>返回</a> ");
            this.Pub1.AddTR();
            this.Pub1.AddTDTitle("序");
            this.Pub1.AddTDTitle("节点编号");
            this.Pub1.AddTDTitle("名称");
            this.Pub1.AddTDTitle("步骤");

            this.Pub1.AddTDTitle("可跳转审核的节点");

            this.Pub1.AddTDTitle("操作");
            this.Pub1.AddTREnd();

            BP.WF.GetTasks jcs = new GetTasks();
            jcs.Retrieve(NodeAttr.FK_Flow, this.RefNo);

            int idx = 0;

            foreach (BP.WF.GetTask jc in jcs)
            {
                this.Pub1.AddTR();
                this.Pub1.AddTDIdx(idx++);
                this.Pub1.AddTD(jc.NodeID);
                this.Pub1.AddTD(jc.Name);
                this.Pub1.AddTD(jc.Step);
                this.Pub1.AddTD(jc.CheckNodes);

                if (jc.Step == 1 || jc.Step == 2)
                {
                    this.Pub1.AddTD();
                }
                else
                {
                    switch (jc.HisDeliveryWay)
                    {
                    case DeliveryWay.ByBindEmp:
                    case DeliveryWay.ByStation:
                        if (jc.CheckNodes.Length > 2)
                        {
                            this.Pub1.AddTD("<a href=\"javascript:EditIt('" + this.RefNo + "','" + jc.NodeID + "');\" >编辑</a>");
                        }
                        else
                        {
                            this.Pub1.AddTD("<a href=\"javascript:EditIt('" + this.RefNo + "','" + jc.NodeID + "');\" >创建</a>");
                        }
                        break;

                    default:
                        this.Pub1.AddTD("访问规则非按人员或按部门");
                        break;
                    }
                }
                this.Pub1.AddTREnd();
            }
            this.Pub1.AddTableEnd();
        }
Пример #2
0
        void btn_Click(object sender, EventArgs e)
        {
            Button btn = sender as Button;

            if (btn.ID == "Btn_Cancel")
            {
                this.WinClose();
                return;
            }

            BP.WF.GetTasks jcs = new GetTasks();
            jcs.Retrieve(NodeAttr.FK_Flow, this.RefNo);

            string strs = "";

            foreach (GetTask jc in jcs)
            {
                if (jc.Step == 1)
                {
                    continue;
                }

                if (this.Pub1.GetCBByID("CB_" + jc.NodeID).Checked == false)
                {
                    continue;
                }

                strs += "'" + jc.NodeID + "',";
            }

            if (strs.Length == 0)
            {
                this.Alert("您没有设置可以跳转审核的节点。");
                return;
            }
            strs = strs.Substring(0, strs.Length - 1);
            GetTask myjc = new GetTask(this.FK_Node);

            myjc.CheckNodes = strs;
            myjc.Update();
            this.WinCloseWithMsg("保存成功...");
        }
Пример #3
0
        public void BindStep3()
        {
            this.Pub1.AddTable("width='70%'");
            this.Pub1.AddCaptionLeft("选择可以跳转审核的节点");
            this.Pub1.AddTR();
            this.Pub1.AddTDTitle("序");
            this.Pub1.AddTDTitle("节点编号");
            this.Pub1.AddTDTitle("名称");
            this.Pub1.AddTDTitle("步骤");
            this.Pub1.AddTDTitle("选择");
            this.Pub1.AddTREnd();

            BP.WF.GetTasks jcs = new GetTasks();
            jcs.Retrieve(NodeAttr.FK_Flow, this.RefNo);

            BP.WF.GetTask myjc  = new GetTask(this.FK_Node);
            string        nodes = myjc.CheckNodes;

            int idx = 0;

            foreach (BP.WF.GetTask jc in jcs)
            {
                if (jc.Step == 1)
                {
                    continue;
                }

                this.Pub1.AddTR();
                this.Pub1.AddTDIdx(idx++);
                this.Pub1.AddTD(jc.NodeID);
                this.Pub1.AddTD(jc.Name);
                this.Pub1.AddTD(jc.Step);

                CheckBox cb = new CheckBox();
                cb.ID   = "CB_" + jc.NodeID;
                cb.Text = "选择";
                if (nodes.Contains(jc.NodeID.ToString()))
                {
                    cb.Checked = true;
                    cb.Text    = "<font color=green>" + jc.Name + "</font>";
                }
                else
                {
                    cb.Checked = false;
                }

                this.Pub1.AddTD(cb);
                this.Pub1.AddTREnd();
            }
            this.Pub1.AddTR();
            this.Pub1.Add("<TD colspan=5>");

            Button btn = new Button();

            btn.Text     = "Save";
            btn.ID       = "Btn_Save";
            btn.CssClass = "Btn";
            btn.Click   += new EventHandler(btn_Click);
            this.Pub1.Add(btn);

            btn          = new Button();
            btn.Text     = "Cancel";
            btn.ID       = "Btn_Cancel";
            btn.CssClass = "Btn";
            btn.Click   += new EventHandler(btn_Click);
            this.Pub1.Add(btn);

            this.Pub1.Add("</TD>");
            this.Pub1.AddTREnd();
            this.Pub1.AddTableEndWithHR();
        }