예제 #1
0
        void AddStep(Table tab, DataRow dd, int Step)
        {
            Table     tt  = new Table();
            TableRow  tr  = new TableRow();
            TableCell tc  = new TableCell();
            long      top = 300 + 500 * Step;

            tt.HorizontalAlign = HorizontalAlign.Center;
            tt.Style.Add("left", "100px");
            tt.Style.Add("top", top.ToString() + "px");
            //tt.Style.Add("BORDER-COLLAPSE","collapse");
            tt.Style.Add("width", "400px");
            tt.Style.Add("font-size", "10pt");

            tt.BorderColor = Color.FromArgb(0, 0, 0);
            tt.BorderWidth = 1;



            AddRow(tt, "第" + Step.ToString() + "步", dd["step_name"].ToString(), Color.FromArgb(255, 245, 245));
            switch (dd["Flow_rule"].ToString())
            {
            case "0":
                AddRow(tt, "流程规则", "按人员");
                break;

            case "1":
                AddRow(tt, "流程规则", "按职位");
                break;

            case "2":
                AddRow(tt, "流程规则", "按项目");
                break;
            }

            AddRow(tt, "强制结束", dd["RightToFinish"].ToString() == "True"?"能":"否");
            if (Int32.Parse(dd["passnum"].ToString()) > 0)
            {
                AddRow(tt, "是否会签", dd["passnum"].ToString() + "人会签");
            }
            else if (Int32.Parse(dd["passnum"].ToString()) == 0)
            {
                AddRow(tt, "是否会签", "不需要会签");
            }
            else if (Int32.Parse(dd["passnum"].ToString()) < 0)
            {
                AddRow(tt, "是否会签", "全体通过!");
            }

            tc.Controls.Add(tt);

            //添加条件跳转
            if (Int32.Parse(dd["jump_count"].ToString()) > 0)
            {
                UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

                DataTable dt;
                df.GetJump(FlowID, Step, 0, out dt);
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    AddRow(tt, "条件" + dt.Rows[i]["Priority"].ToString(), dt.Rows[i]["Field_Description"].ToString() + dt.Rows[i]["compare"].ToString() + dt.Rows[i]["comparevalue"].ToString() + "<span lang='EN-US' style='font-family: Wingdings'>&eth;</span>" + dt.Rows[i]["step_name"].ToString());
                }

                df = null;
            }

            tr.Cells.Add(tc);

            tab.Rows.Add(tr);
        }
예제 #2
0
        void AddStep(Table tab, DataRow dd, int Step)
        {
            Table tt = new Table();
            TableRow tr = new TableRow();
            TableCell tc = new TableCell();
            long top = 300 + 500 * Step;

            tt.HorizontalAlign = HorizontalAlign.Center;
            tt.Style.Add("left", "100px");
            tt.Style.Add("top", top.ToString() + "px");
            //tt.Style.Add("BORDER-COLLAPSE","collapse");
            tt.Style.Add("width", "400px");
            tt.Style.Add("font-size", "10pt");

            tt.BorderColor = Color.FromArgb(0, 0, 0);
            tt.BorderWidth = 1;

            AddRow(tt, "��" + Step.ToString() + "��", dd["step_name"].ToString(), Color.FromArgb(255, 245, 245));
            switch (dd["Flow_rule"].ToString())
            {
                case "0":
                    AddRow(tt, "���̹���", "����Ա");
                    break;
                case "1":
                    AddRow(tt, "���̹���", "��ְλ");
                    break;
                case "2":
                    AddRow(tt, "���̹���", "����Ŀ");
                    break;
            }

            AddRow(tt, "ǿ�ƽ���", dd["RightToFinish"].ToString() == "True" ? "��" : "��");
            if (Int32.Parse(dd["passnum"].ToString()) > 0)
                AddRow(tt, "�Ƿ��ǩ", dd["passnum"].ToString() + "�˻�ǩ");
            else if (Int32.Parse(dd["passnum"].ToString()) == 0)
                AddRow(tt, "�Ƿ��ǩ", "����Ҫ��ǩ");
            else if (Int32.Parse(dd["passnum"].ToString()) < 0)
                AddRow(tt, "�Ƿ��ǩ", "ȫ��ͨ����");

            tc.Controls.Add(tt);

            //���������ת
            if (Int32.Parse(dd["jump_count"].ToString()) > 0)
            {
                UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

                DataTable dt;
                df.GetJump(FlowID, Step, 0, out dt);
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    AddRow(tt, "����" + dt.Rows[i]["Priority"].ToString(), dt.Rows[i]["Field_Description"].ToString() + dt.Rows[i]["compare"].ToString() + dt.Rows[i]["comparevalue"].ToString() + "<span lang='EN-US' style='font-family: Wingdings'>&eth;</span>" + dt.Rows[i]["step_name"].ToString());
                }

                df = null;
            }

            tr.Cells.Add(tc);

            tab.Rows.Add(tr);
        }