Exemple #1
0
 void Bind()
 {
     try
     {
         string suser = "";
         mtb         = btb.GetModel(int.Parse(Tunnel.Data.DESEncrypt.Decrypt(Request.Params["lid"])));
         Label1.Text = mtb.b_content;                  //取得替换后的表单数据
         formfile    = getFile(mtb.b_file);            //附件
         formdvice   = getAdvice(mtb.b_id.ToString()); //意见
         Page.Title  = Label2.Text = mtb.b_title;
         DataSet ds = bte.GetList("e_gid=" + mtb.b_id + " and e_user<>0 order by e_id asc");
         if (mtb.b_state == 3)
         {
             nextb = ""; isend = true;
         }
         else
         {
             if (mtb.b_state > 0)
             {
                 string        curruser = Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "e_nextbuser", "e_gid=" + mtb.b_id + " order by e_id desc");
                 string        currtime = Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "e_time", "e_gid=" + mtb.b_id + " order by e_id desc");
                 int           currnum  = Convert.ToInt32(Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "count(*)", "e_user<>0 and e_gid=" + mtb.b_id));
                 StringBuilder text     = new StringBuilder();
                 text.Append("<tr>");
                 text.Append("<td align=\"center\" style=\"height: 30px; width: 10%;\">第<font color=red>" + (currnum + 1) + "</font>步</td>");
                 text.Append("<td align=\"left\" style=\"height: 30px; width: 30%\">&nbsp;&nbsp;审批</td>");
                 text.Append("<td align=\"left\" style=\"height: 50%\">&nbsp;&nbsp;<strong style=\"color:Red\">" + getallUname(curruser) + " 主办</strong> [<font color=blue>办理中</font>]");
                 text.Append("<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;开始于:" + currtime + "</td>");
                 text.Append("</tr> ");
                 nextb = text.ToString();
             }
         }
         Repeater1.DataSource = ds;
         Repeater1.DataBind();
         if (ds.Tables[0].Rows.Count > 0 || nextb != "")
         {
             isliu = true;
         }
     }
     catch
     {
         Tunnel.Common.Message.back("无效参数");
     }
 }
Exemple #2
0
    void bindflow()
    {
        string suser = "";

        mtb        = btb.GetModel(int.Parse(Request.Params["bid"]));
        Page.Title = mtb.b_title;
        DataSet       ds      = bte.GetList("e_gid=" + mtb.b_id + " and e_user<>0 order by e_id asc");
        StringBuilder texttop = new StringBuilder();

        texttop.Append("<tr>");
        texttop.Append("<td align=\"center\" style=\"height: 30px; width: 10%;\">第<font color=red>1</font>步</td>");
        texttop.Append("<td align=\"left\" style=\"height: 30px; width: 30%\">&nbsp;&nbsp;发起</td>");
        texttop.Append("<td align=\"left\" style=\"height: 50%\">&nbsp;&nbsp;<strong style=\"color:Red\">" + getUname(mtb.b_user.ToString()) + "</strong> [<font color=Green>发起</font>]");
        texttop.Append("<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发起于:" + mtb.b_time.ToString() + "</td>");
        texttop.Append("<td align=\"left\" style=\"height: 30px; width: 40%\">&nbsp;&nbsp;</td>");
        texttop.Append("</tr> ");
        if (mtb.b_state == 3)
        {
            nextb = ""; isend = true;
        }
        else
        {
            if (mtb.b_state > 0)
            {
                string        curruser = Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "e_nextbuser", "e_gid=" + mtb.b_id + " order by e_id desc");
                string        currtime = Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "e_time", "e_gid=" + mtb.b_id + " order by e_id desc");
                int           currnum  = Convert.ToInt32(Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "count(*)", "e_user<>0 and e_gid=" + mtb.b_id));
                StringBuilder text     = new StringBuilder();
                text.Append("<tr>");
                text.Append("<td align=\"center\" style=\"height: 30px; width: 10%;\">第<font color=red>" + (currnum + 2) + "</font>步</td>");
                text.Append("<td align=\"left\" style=\"height: 30px; width: 30%\">&nbsp;&nbsp;审批</td>");
                text.Append("<td align=\"left\" style=\"height: 50%\">&nbsp;&nbsp;<strong style=\"color:Red\">" + getallUname(curruser) + " 主办</strong> [<font color=blue>办理中</font>]");
                text.Append("<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;开始于:" + currtime + "</td>");
                text.Append("<td align=\"left\" style=\"height: 30px; width: 40%\">&nbsp;&nbsp;</td>");
                text.Append("</tr> ");
                nextb = text.ToString();
            }
        }
        toptb = texttop.ToString();
        Repeater1.DataSource = ds;
        Repeater1.DataBind();
    }
Exemple #3
0
    void bindflow()
    {
        string bWhere = "";

        mtb = btb.GetModel(int.Parse(Request.Params["bid"]));
        mf  = bf.GetModel(mtb.b_sort);
        if (mf.f_sort == 18)
        {
            bWhere = " and e_bid<>0";
        }
        else
        {
            bWhere = "";
        }
        Page.Title = mtb.b_title;
        DataSet       ds      = bte.GetList("e_gid=" + mtb.b_id + bWhere + " order by e_id asc");
        StringBuilder text    = new StringBuilder();
        StringBuilder texttop = new StringBuilder();

        texttop.Append("<tr>");
        texttop.Append("<td align=\"center\" style=\"height: 30px; width: 10%;\">第<font color=red>1</font>步</td>");
        texttop.Append("<td align=\"left\" style=\"height: 30px; width: 20%\">&nbsp;&nbsp;发起</td>");
        texttop.Append("<td align=\"left\" style=\"height: 30%\">&nbsp;&nbsp;<strong style=\"color:Red\">" + getUname(mtb.b_user.ToString()) + "</strong> [<font color=Green>发起</font>]");
        texttop.Append("<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发起于:" + mtb.b_time.ToString() + "</td>");
        texttop.Append("<td align=\"left\" style=\"height: 30px; width: 40%\">&nbsp;<td>");
        texttop.Append("</tr> ");
        if (mtb.b_state == 3)
        {
            nextb = ""; isend = true;
        }
        else if (mtb.b_state == 1)
        {
            string suser = "";
            if (mtb.b_suser == 0)
            {
                ul.UsbnLogin = bm.GetModel(mtb.b_user);
                DataSet dss = new DataSet();
                dss = bm.GetList("m_bum=" + ul.UsbnLogin.m_bum);
                foreach (DataRow dr in dss.Tables[0].Rows)
                {
                    if (Tunnel.BLL.Permission.IfHasPrimision(dr["m_id"].ToString(), "流程审核", "我的工作", false))
                    {
                        suser += dr["m_id"].ToString() + ",";
                    }
                }
                if (!string.IsNullOrEmpty(suser))
                {
                    text.Append("<tr>");
                    text.Append("<td align=\"center\" style=\"height: 30px; width: 10%;\">第<font color=red>2</font>步</td>");
                    text.Append("<td align=\"left\" style=\"height: 30px; width: 20%\">&nbsp;&nbsp;审核</td>");
                    text.Append("<td align=\"left\" style=\"height: 30%\">&nbsp;&nbsp;<strong style=\"color:Red\">" + getallUname(suser) + " 主办</strong> [<font color=blue>审核中</font>]");
                    text.Append("<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;开始于:" + mtb.b_time.ToString() + "</td>");
                    text.Append("<td align=\"left\" style=\"height: 30px; width: 40%\">&nbsp;&nbsp;</td>");
                    text.Append("</tr> ");
                }
                else
                {
                    text.Append("<tr>");
                    text.Append("<td align=\"center\" colspan='4' style=\"height: 30px; width: 10%;color:red\">没有设置审核人,请与管理员联系!</td>");
                    text.Append("</tr> ");
                }
            }
            else
            {
                text.Append("<tr>");
                text.Append("<td align=\"center\" style=\"height: 30px; width: 10%;\">第<font color=red>2</font>步</td>");
                text.Append("<td align=\"left\" style=\"height: 30px; width: 20%\">&nbsp;&nbsp;审核</td>");
                text.Append("<td align=\"left\" style=\"height: 30%\">&nbsp;&nbsp;<strong style=\"color:Red\">" + getUname(mtb.b_suser.ToString()) + " 主办</strong> [<font color=blue>审核中</font>]");
                text.Append("<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;开始于:" + mtb.b_time.ToString() + "</td>");
                text.Append("<td align=\"left\" style=\"height: 30px; width: 40%\">&nbsp;&nbsp;</td>");
                text.Append("</tr> ");
            }
            nextb = text.ToString();
        }
        else
        {
            if (mtb.b_state > 0)
            {
                string currbid  = Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "e_nextbid", "e_gid=" + mtb.b_id + " order by e_id desc");
                string currtime = Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "e_time", "e_gid=" + mtb.b_id + " order by e_id desc");
                int    currnum  = Convert.ToInt32(Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "count(*)", "e_gid=" + mtb.b_id));
                if ("".Equals(currbid) || "0".Equals(currbid))
                {
                    currbid = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_id", "s_lid=" + mtb.b_sort + " and s_num=1");
                }
                mts = ts.GetModel(Convert.ToInt32(currbid));
                string nextnum  = "";
                string nextname = "";
                string nextuser = "";
                if (mts != null)
                {
                    nextnum  = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_num", "s_id=" + mts.s_id);
                    nextname = getname(mts.s_id.ToString());
                    nextuser = getallUname(mts.s_zid.ToString());
                }
                else
                {
                    nextname = "步骤不存在或已删除";
                    nextuser = nextnum = "无";
                }
                text.Append("<tr>");
                text.Append("<td align=\"center\" style=\"height: 30px; width: 10%;\">第<font color=red>" + (currnum + (bWhere == "" ? 2 : 1)) + "</font>步</td>");
                text.Append("<td align=\"left\" style=\"height: 30px; width: 20%\">&nbsp;&nbsp;" + "序号" + nextnum + ":" + nextname + "</td>");
                text.Append("<td align=\"left\" style=\"height: 30%\">&nbsp;&nbsp;<strong style=\"color:Red\">" + nextuser + " 主办</strong> [<font color=blue>办理中</font>]");
                text.Append("<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;开始于:" + currtime + "</td>");
                text.Append("<td align=\"left\" style=\"height: 30px; width: 40%\">&nbsp;&nbsp;</td>");
                text.Append("</tr> ");
                nextb = text.ToString();
            }
        }
        toptb = texttop.ToString();
        Repeater2.DataSource = ds;
        Repeater2.DataBind();
    }