Exemple #1
0
    /// <summary>
    /// 上传文件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Button1_Click(object sender, EventArgs e)
    {
        //获得所需参数
        string         strTitle   = tb_Title.Text.Trim();
        HttpPostedFile hpf        = file1.PostedFile;
        string         strContent = tb_content.Text.Trim();

        if (Convert.ToDouble(hpf.ContentLength) / 1024 / 1024 > 10)
        {
            Response.Write("<script>alert('附件大小不能大于10MB');</script>");

            return;
        }
        else
        {
            CreateMdAndFilePaht(hpf);
        }

        //写入数据库
        Tunnel.BLL.Tunnel_file   rbll  = new Tunnel.BLL.Tunnel_file();
        Tunnel.Model.Tunnel_file model = new Tunnel.Model.Tunnel_file();
        model.f_title   = strTitle;
        model.f_size    = hpf.ContentLength.ToString();
        model.f_file    = filePaht;
        model.f_addtime = DateTime.Now;
        model.f_Content = strContent;
        model.f_sort    = 0;
        model.f_user    = ul.LoginID;
        model.f_Ip      = Tunnel.Common.Common.GetIp();
        if (ul.GetUserBean(ul.LoginID) != null)
        {
            buMId = (int)ul.GetUserBean(ul.LoginID).m_id;
        }
        model.f_Bum = buMId;

        int relt1 = -1;

        relt1 = rbll.Add(model);

        string str = "上传文件";
        string url = "FShaRing_Manage.aspx";

        if (relt1 > 0)
        {
            str += "成功!";
        }
        else
        {
            str += "失败!";
        }
        MessageBox(str, url);
    }
Exemple #2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        //获得所需参数
        string         strTitle = tb_Title.Text.Trim();
        HttpPostedFile hpf      = file1.PostedFile;

        if (Convert.ToDouble(hpf.ContentLength) / 1024 / 1024 > 10)
        {
            Response.Write("<script>alert('附件大小不能大于10MB');</script>");
            return;
        }
        else
        {
            CreateMdAndFilePaht(hpf);
        }

        //写入数据库
        Tunnel.BLL.Tunnel_Standard   rbll  = new Tunnel.BLL.Tunnel_Standard();
        Tunnel.Model.Tunnel_Standard model = new Tunnel.Model.Tunnel_Standard();
        model.S_File     = filePaht;
        model.S_Title    = strTitle;
        model.S_Name     = "";
        model.CreateDate = DateTime.Now;
        model.CreateUser = ul.LoginID;

        if (ul.GetUserBean(ul.LoginID) != null)
        {
            buMId = (int)ul.GetUserBean(ul.LoginID).m_id;
        }
        model.S_bum = buMId;
        int relt1 = -1;

        relt1 = rbll.Add(model);
        string str = "上传文件";
        string url = "N_Standard_Manage.aspx";

        if (relt1 > 0)
        {
            str += "成功!";
        }
        else
        {
            str += "失败!";
        }
        MessageBox(str, url);
    }
Exemple #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Tunnel.Model.Tunnel_menber menber = ul.GetUserBean(ul.LoginID);
         this.txtAuthor.Text = menber.m_name;
     }
 }
Exemple #4
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     try
     {
         Tunnel.Model.Tunnel_menber tm = ul.GetUserBean(ul.LoginID);
         mtb = btb.GetModel(int.Parse(Request.Params["bid"]));
         //下一步骤ID
         string currbid  = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_id", "s_lid=" + mtb.b_sort + " and s_num=1");
         string curruser = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_zid", "s_lid=" + mtb.b_sort + " and s_num=1");
         //如果流程没有预设步骤
         if ("".Equals(currbid))
         {
             Tunnel.Common.Message.back("本流程未预设步骤,请与管理员联系!"); return;
         }
         //将当前步骤存入数据库表:Tunnel_exam
         Tunnel.BLL.Tunnel_exam   bte = new Tunnel.BLL.Tunnel_exam();
         Tunnel.Model.Tunnel_exam mte = new Tunnel.Model.Tunnel_exam();
         mte.e_bid       = 0;
         mte.e_endtime   = DateTime.Now;
         mte.e_gid       = Convert.ToInt32(mtb.b_id);
         mte.e_user      = ul.LoginID;
         mte.e_time      = DateTime.Now;
         mte.e_nextbuser = "";
         mte.e_nextbid   = Convert.ToInt32(currbid);
         bte.Add(mte);
         if (!string.IsNullOrEmpty(curruser))
         {
             Tunnel.Model.Tunnel_Remind tr = new Tunnel.Model.Tunnel_Remind();
             Tunnel.BLL.Tunnel_Remind   br = new Tunnel.BLL.Tunnel_Remind();
             string[] users = curruser.Split(',');
             foreach (string user in users)
             {
                 if (!string.IsNullOrEmpty(user))
                 {
                     tr.m_title    = mtb.b_title + "<font color=red>(待审批)</font>";
                     tr.m_url      = "N_WorkFlow/MyApply/Apply_zSp.aspx?bid=" + mtb.b_id;
                     tr.m_touser   = Convert.ToInt32(user);
                     tr.m_time     = DateTime.Now;
                     tr.m_type     = 1;
                     tr.m_typeid   = Convert.ToInt32(mtb.b_id);
                     tr.m_bid      = Convert.ToInt32(currbid);
                     tr.m_callTime = Convert.ToDateTime("1800-1-1 00:00:00");
                     tr.m_isread   = 0;
                     long messge = br.Add(tr);
                 }
             }
         }
         Tunnel.Data.DbHelperSQL.ExecuteSql("UPDATE TUNNEL_BUMF SET B_STATE=2 WHERE B_ID=" + mtb.b_id);                  //改变公文状态
         Tunnel.Data.DbHelperSQL.ExecuteSql("DELETE TUNNEL_REMIND WHERE m_type=1 and m_bid=0 and m_typeid=" + mtb.b_id); //删除待办事项
         Tunnel.Common.Message.Show("操作成功,审核通过!", "Apply_SP.aspx");
     }
     catch
     {
         Tunnel.Common.Message.back("流程审核错误,请与管理员联系!");
     }
 }
Exemple #5
0
 public Tunnel.Model.Tunnel_menber GetUserInfo()
 {
     Tunnel.BLL.UserLogin       ul    = new Tunnel.BLL.UserLogin();
     Tunnel.Model.Tunnel_menber model = new Tunnel.Model.Tunnel_menber();
     if (ul.LoginID > 0)
     {
         model = ul.GetUserBean(ul.LoginID);
     }
     return(model);
 }
Exemple #6
0
 public string GetUser(string str)
 {
     if (!string.IsNullOrEmpty(str))
     {
         Tunnel.Model.Tunnel_menber men = ulBLL.GetUserBean(ulBLL.LoginID);
         return(men.m_name.ToString());
     }
     else
     {
         return("");
     }
 }
Exemple #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        List <CacheItems> cList = new List <CacheItems>();

        cList.Clear();
        IDictionaryEnumerator dic = Cache.GetEnumerator();

        while (dic.MoveNext())
        {
            if (dic.Value.GetType().ToString() == "Tunnel.Model.Tunnel_menber")
            {
                cList.Add(new CacheItems(dic.Key.ToString(), dic.Value.GetType().ToString()));
            }
        }
        onLineUser = cList.Count;
        //string aaa=Cache["TunnelLogin-CacheKey-409"].ToString();
        //string strsql = "select count(m_id) as onlineuser from tunnel_menber where m_online = 1";
        //DataSet das = Tunnel.Data.DbHelperSQL.Query(strsql);
        //onLineUser = Convert.ToInt32(das.Tables[0].Rows[0]["onlineuser"]);
        if (!IsPostBack)
        {
            PageBind();
            uid = ul.LoginID.ToString();
            if (ul.LoginID > 0)
            {
                Tunnel.Model.Tunnel_menber model = ul.GetUserBean(ul.LoginID);
                Tunnel.BLL.Tunnel_bum      bm    = new Tunnel.BLL.Tunnel_bum();
                if (model != null)
                {
                    userbum = model.m_login + " | ";
                }
                if (model != null && model.m_bum > 0)
                {
                    if (bm.GetModel(model.m_bum) != null)
                    {
                        userbum += bm.GetModel(model.m_bum).b_name;
                    }
                }
                else
                {
                    userbum += "部门未分组";
                }
            }
            Label1.ToolTip = userbum;
        }
    }
Exemple #8
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Tunnel.Model.Tunnel_menber tm = ul.GetUserBean(ul.LoginID);
        if (!Tunnel.Data.DESEncrypt.Encrypt(spPassword.Text.Trim()).Equals(tm.m_spassword))
        {
            Tunnel.Common.Message.back("审批密码错误"); return;
        }
        else
        {
            //这里为存储当前步骤
            mtb = btb.GetModel(int.Parse(Request.Params["bid"]));
            mf  = bf.GetModel(mtb.b_sort);
            if (mtb.b_state == 3)
            {
                Tunnel.Common.Message.back("此流程己审批结束,请勿重复审批!"); return;
            }
            else
            {
                //将当前步骤存入数据库表:Tunnel_exam
                Tunnel.BLL.Tunnel_exam   bte = new Tunnel.BLL.Tunnel_exam();
                Tunnel.Model.Tunnel_exam mte = new Tunnel.Model.Tunnel_exam();
                mte.e_bid       = 0;
                mte.e_endtime   = DateTime.Now;
                mte.e_gid       = Convert.ToInt32(Request.Params["bid"]);
                mte.e_user      = ul.LoginID;
                mte.e_nextbuser = m_value.Value;
                string lastendtime = Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "e_endtime", "e_gid=" + Request.Params["bid"] + " order by e_id desc");
                if (!string.IsNullOrEmpty(lastendtime))
                {
                    mte.e_time = Convert.ToDateTime(lastendtime);//取得上一步的最后执行时间
                }
                else
                {
                    mte.e_time = mtb.b_time;
                }
                mte.e_nextbid = 1;

                Tunnel.Model.Tunnel_Remind tr = new Tunnel.Model.Tunnel_Remind();
                Tunnel.BLL.Tunnel_Remind   br = new Tunnel.BLL.Tunnel_Remind();
                string[] users = m_value.Value.Split(',');
                foreach (string user in users)
                {
                    if (!string.IsNullOrEmpty(user))
                    {
                        tr.m_title    = mtb.b_title + "<font color=red>(待审批)</font>";
                        tr.m_url      = "N_WorkFlow/OtherDocument/Other_zSp.aspx?bid=" + Request.Params["bid"];
                        tr.m_touser   = Convert.ToInt32(user);
                        tr.m_time     = DateTime.Now;
                        tr.m_type     = 1;
                        tr.m_typeid   = Convert.ToInt32(mtb.b_id);
                        tr.m_bid      = 1;
                        tr.m_callTime = Convert.ToDateTime("1800-1-1 00:00:00");
                        tr.m_isread   = 0;
                        long messge = br.Add(tr);
                    }
                }

                bte.Add(mte);
                string contents = FCKeditor1.Value;
                //添加审批意见
                if (!string.IsNullOrEmpty(contents))
                {
                    Tunnel.BLL.Tunnel_Advice   ta = new Tunnel.BLL.Tunnel_Advice();
                    Tunnel.Model.Tunnel_Advice ma = new Tunnel.Model.Tunnel_Advice();
                    ma.a_content = contents;
                    ma.a_bid     = Convert.ToInt32(mts.s_id);
                    ma.a_gid     = Convert.ToInt32(mtb.b_id);
                    ma.a_time    = DateTime.Now;
                    ma.a_user    = ul.LoginID;
                    string count = Tunnel.Common.GetValue.getDataValue("Tunnel_Advice", "count(*)", "a_bid=1024 and a_gid=" + Request.Params["bid"]);
                    ta.Add(ma);
                }
                Tunnel.Data.DbHelperSQL.ExecuteSql("DELETE TUNNEL_REMIND WHERE m_type=1 and m_bid=1 and m_touser="******" and m_typeid=" + mtb.b_id);//删除待办事项

                Tunnel.Common.Message.Show("操作成功!", "../MyApply/Apply_Sp.aspx");
            }
        }
    }
Exemple #9
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Tunnel.Model.Tunnel_menber tm = ul.GetUserBean(ul.LoginID);
        if (!Tunnel.Data.DESEncrypt.Encrypt(spPassword.Text.Trim()).Equals(tm.m_spassword))
        {
            Tunnel.Common.Message.back("审批密码错误"); return;
        }
        else
        {
            //这里为存储当前步骤
            mtb = btb.GetModel(int.Parse(Request.Params["bid"]));
            mf  = bf.GetModel(mtb.b_sort);
            if (mtb.b_state == 3)
            {
                Tunnel.Common.Message.back("此流程己审批结束,请勿重复审批!"); return;
            }
            else
            {
                string currbid = Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "e_nextbid", "e_gid=" + Request.Params["bid"] + " order by e_id desc");
                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 = bts.GetModel(Convert.ToInt32(currbid));
                int    cunum     = mts.s_num;
                bool   iscshened = true;
                int    sum       = bts.GetCount("s_lid=" + mtb.b_sort);
                string curruser  = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_zid", "s_id=" + mts.s_id);
                if (!string.IsNullOrEmpty(curruser))
                {
                    string[] users = curruser.Split(',');
                    foreach (string user in users)
                    {
                        if (!string.IsNullOrEmpty(user))
                        {
                            if (user == ul.LoginID.ToString())
                            {
                                iscshened = false;
                            }
                        }
                    }
                }
                if (!iscshened || ul.JiaoSe(ul.LoginID) == "系统管理员")
                {
                    //将当前步骤存入数据库表:Tunnel_exam
                    Tunnel.BLL.Tunnel_exam   bte = new Tunnel.BLL.Tunnel_exam();
                    Tunnel.Model.Tunnel_exam mte = new Tunnel.Model.Tunnel_exam();
                    mte.e_bid     = Convert.ToInt32(mts.s_id);
                    mte.e_endtime = DateTime.Now;
                    mte.e_gid     = Convert.ToInt32(Request.Params["bid"]);
                    mte.e_user    = ul.LoginID;
                    string lastendtime = Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "e_endtime", "e_gid=" + Request.Params["bid"] + " order by e_id desc");
                    if (!string.IsNullOrEmpty(lastendtime))
                    {
                        mte.e_time = Convert.ToDateTime(lastendtime);//取得上一步的最后执行时间
                    }
                    else
                    {
                        mte.e_time = mtb.b_time;
                    }
                    //如果为最后一步则结束流程
                    if (cunum == sum)
                    {
                        mte.e_nextbid = 0;
                        string pid = Tunnel.Common.GetValue.getDataValue("Tunnel_flow", "f_sort", "f_id=" + mtb.b_sort);
                        //插入到公司发文
                        if ("18".Equals(pid))
                        {
                            tmt.Title      = mtb.b_title;
                            tmt.TypeId     = 5;
                            tmt.HtmlSource = fc.From_Content(mtb.b_formcontent, mtb.b_content, true);//取得替换后的表单数据
                            tmt.UserId     = mtb.b_user;
                            Tunnel.BLL.Tunnel_information bllf = new Tunnel.BLL.Tunnel_information();
                            int relt = -1;
                            relt = bllf.Add(tmt);
                        }
                        Tunnel.Data.DbHelperSQL.ExecuteSql("UPDATE TUNNEL_BUMF SET B_STATE=3 WHERE B_ID=" + Request.Params["bid"]);
                        Tunnel.Data.DbHelperSQL.ExecuteSql("DELETE TUNNEL_REMIND WHERE m_type=1 and m_bid=" + currbid + " and m_typeid=" + mtb.b_id);//删除待办事项
                        Tunnel.Common.Message.Show("流程结束成功!", "Apply_Sp.aspx");
                    }
                    else
                    {
                        string currs = "";
                        if (!"".Equals(currbid) || !"0".Equals(currbid))
                        {
                            string nid = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_id", "s_lid=" + mtb.b_sort + " and s_num>" + mts.s_num + " order by s_num asc");
                            currs = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_zid", "s_lid=" + mtb.b_sort + " and s_num>" + mts.s_num + " order by s_num asc");
                            if (string.IsNullOrEmpty(nid))
                            {
                                nid = "0";
                            }
                            mte.e_nextbid = long.Parse(nid);
                        }
                        else
                        {
                            mte.e_nextbid = 0;
                        }
                        if (!string.IsNullOrEmpty(currs))
                        {
                            Tunnel.Model.Tunnel_Remind tr = new Tunnel.Model.Tunnel_Remind();
                            Tunnel.BLL.Tunnel_Remind   br = new Tunnel.BLL.Tunnel_Remind();
                            string[] users = currs.Split(',');
                            foreach (string user in users)
                            {
                                if (!string.IsNullOrEmpty(user))
                                {
                                    tr.m_title    = mtb.b_title + "<font color=red>(待审批)</font>";
                                    tr.m_url      = "N_WorkFlow/MyApply/Apply_zSp.aspx?bid=" + mtb.b_id;
                                    tr.m_touser   = Convert.ToInt32(user);
                                    tr.m_time     = DateTime.Now;
                                    tr.m_type     = 1;
                                    tr.m_typeid   = Convert.ToInt32(mtb.b_id);
                                    tr.m_bid      = Convert.ToInt32(mte.e_nextbid);
                                    tr.m_callTime = Convert.ToDateTime("1800-1-1 00:00:00");
                                    tr.m_isread   = 0;
                                    long messge = br.Add(tr);
                                }
                            }
                        }
                    }

                    bte.Add(mte);
                    string contents = FCKeditor1.Value;
                    //添加审批意见
                    if (!string.IsNullOrEmpty(contents))
                    {
                        Tunnel.BLL.Tunnel_Advice   ta = new Tunnel.BLL.Tunnel_Advice();
                        Tunnel.Model.Tunnel_Advice ma = new Tunnel.Model.Tunnel_Advice();
                        ma.a_content = contents;
                        ma.a_bid     = Convert.ToInt32(mts.s_id);
                        ma.a_gid     = Convert.ToInt32(mtb.b_id);
                        ma.a_time    = DateTime.Now;
                        ma.a_user    = ul.LoginID;
                        string count = Tunnel.Common.GetValue.getDataValue("Tunnel_Advice", "count(*)", "a_bid=" + mf.f_id + " and a_gid=" + Request.Params["bid"]);
                        if (int.Parse(count) > 0)
                        {
                            ta.Update(ma);
                        }
                        else
                        {
                            ta.Add(ma);
                        }
                    }
                    Tunnel.Data.DbHelperSQL.ExecuteSql("DELETE TUNNEL_REMIND WHERE m_type=1 and m_bid=" + currbid + " and m_typeid=" + mtb.b_id);//删除待办事项
                    Tunnel.Common.Message.Show("操作成功!", "Apply_Sp.aspx");
                }
                else
                {
                    Tunnel.Common.Message.back("此流程己审批通过,请勿重复审批!"); return;
                }
            }
        }
    }
Exemple #10
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     try
     {
         System.Web.HttpFileCollection uploadFiles = Request.Files;
         System.Web.HttpPostedFile     theFile;
         for (int i = 0; i < uploadFiles.Count; i++)
         {
             theFile = uploadFiles[i];
             if (Convert.ToDouble(theFile.ContentLength) / 1024 / 1024 > 10)
             {
                 Tunnel.Common.Message.back("附件大小不能大于10MB");
                 return;
             }
             else
             {
                 continue;
             }
         }
         Tunnel.Model.Tunnel_menber tm = ul.GetUserBean(ul.LoginID);
         //下一步骤ID
         string currbid  = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_id", "s_lid=" + Request.Params["Flow"] + " and s_num=1");
         string curruser = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_zid", "s_lid=" + Request.Params["Flow"] + " and s_num=1");
         //如果流程没有预设步骤
         if ("".Equals(currbid))
         {
             Tunnel.Common.Message.back("本流程未预设步骤,请与管理员联系!"); return;
         }
         Tunnel.Model.Tunnel_Remind tr = new Tunnel.Model.Tunnel_Remind();
         Tunnel.BLL.Tunnel_Remind   br = new Tunnel.BLL.Tunnel_Remind();
         mf = bf.GetModel(int.Parse(Request.Params["Flow"]));
         if (mf.f_state.ToString() == "0")
         {
             isshen = true;
         }
         else
         {
             isshen = false;
         }
         if (!isshen)
         {
             //将当前步骤存入数据库表:Tunnel_exam
             Tunnel.BLL.Tunnel_exam   bte = new Tunnel.BLL.Tunnel_exam();
             Tunnel.Model.Tunnel_exam mte = new Tunnel.Model.Tunnel_exam();
             mte.e_bid     = 0;
             mte.e_endtime = DateTime.Now;
             mte.e_gid     = this.sava();
             mte.e_user    = ul.LoginID;
             mte.e_time    = DateTime.Now;
             mte.e_nextbid = Convert.ToInt32(currbid);
             bte.Add(mte);
             string[] users = curruser.Split(',');
             foreach (string user in users)
             {
                 if (!string.IsNullOrEmpty(user))
                 {
                     tr.m_title    = TextBox1.Text.Trim() + "<font color=red>(待审批)</font>";
                     tr.m_url      = "N_WorkFlow/MyApply/Apply_zSp.aspx?bid=" + mte.e_gid;
                     tr.m_touser   = Convert.ToInt32(user);
                     tr.m_time     = DateTime.Now;
                     tr.m_type     = 1;
                     tr.m_typeid   = mte.e_gid;
                     tr.m_bid      = Convert.ToInt32(currbid);
                     tr.m_callTime = Convert.ToDateTime("1800-1-1 00:00:00");
                     tr.m_isread   = 0;
                     long messge = br.Add(tr);
                 }
             }
         }
         else
         {
             int s = this.sava();
             ul.UsbnLogin = bm.GetModel(ul.LoginID);
             DataSet dss      = bm.GetList("m_bum=" + ul.UsbnLogin.m_bum);
             string  userlist = "";
             foreach (DataRow dr in dss.Tables[0].Rows)
             {
                 if (Tunnel.BLL.Permission.IfHasPrimision(dr["m_id"].ToString(), "流程审核", "我的工作", false))
                 {
                     userlist = dr["m_id"].ToString();
                 }
             }
             tr.m_title    = TextBox1.Text.Trim() + "<font color=red>(待审核)</font>";
             tr.m_url      = "N_WorkFlow/MyApply/Apply_zSh.aspx?bid=" + s;
             tr.m_touser   = (RadioButtonList3.SelectedValue == "1" ? int.Parse(m_value.Value) : Convert.ToInt32(userlist));
             tr.m_time     = DateTime.Now;
             tr.m_type     = 1;
             tr.m_typeid   = s;
             tr.m_bid      = 0;
             tr.m_callTime = Convert.ToDateTime("1800-1-1 00:00:00");
             tr.m_isread   = 0;
             long messge = br.Add(tr);
         }
         Tunnel.Common.Message.Show("提交成功!", "Apply_Add.aspx?Flow=" + Request.Params["Flow"]);
     }
     catch
     {
         Tunnel.Common.Message.back("流程错误,请与管理员联系!");
     }
 }
Exemple #11
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        try
        {
            System.Web.HttpFileCollection uploadFiles = Request.Files;
            System.Web.HttpPostedFile     theFile;
            for (int i = 0; i < uploadFiles.Count; i++)
            {
                theFile = uploadFiles[i];
                if (Convert.ToDouble(theFile.ContentLength) / 1024 / 1024 > 10)
                {
                    Tunnel.Common.Message.back("附件大小不能大于10MB");
                    return;
                }
                else
                {
                    continue;
                }
            }
            this.sava();
            Tunnel.Model.Tunnel_menber tm = ul.GetUserBean(ul.LoginID);
            mtb = btb.GetModel(Convert.ToInt32(Request.Params["bid"]));
            //下一步骤ID
            string currbid  = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_id", "s_lid=" + mtb.b_sort + " and s_num=1");
            string curruser = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_zid", "s_lid=" + mtb.b_sort + " and s_num=1");
            //如果流程没有预设步骤
            if ("".Equals(currbid))
            {
                Tunnel.Common.Message.back("本流程未预设步骤,请与管理员联系!"); return;
            }
            //将当前步骤存入数据库表:Tunnel_exam
            Tunnel.BLL.Tunnel_exam   bte = new Tunnel.BLL.Tunnel_exam();
            Tunnel.Model.Tunnel_exam mte = new Tunnel.Model.Tunnel_exam();
            mte.e_bid     = 0;
            mte.e_endtime = DateTime.Now;
            mte.e_gid     = Convert.ToInt32(mtb.b_id);
            mte.e_user    = ul.LoginID;
            mte.e_time    = DateTime.Now;
            mte.e_nextbid = Convert.ToInt32(currbid);
            bte.Add(mte);

            Tunnel.Model.Tunnel_Remind tr = new Tunnel.Model.Tunnel_Remind();
            Tunnel.BLL.Tunnel_Remind   br = new Tunnel.BLL.Tunnel_Remind();
            string[] users = curruser.Split(',');
            foreach (string user in users)
            {
                if (!string.IsNullOrEmpty(user))
                {
                    tr.m_title    = TextBox1.Text.Trim() + "<font color=red>(待审批)</font>";
                    tr.m_url      = "N_WorkFlow/MyApply/Apply_zSp.aspx?bid=" + mte.e_gid;
                    tr.m_touser   = Convert.ToInt32(user);
                    tr.m_time     = DateTime.Now;
                    tr.m_type     = 1;
                    tr.m_typeid   = mte.e_gid;
                    tr.m_bid      = Convert.ToInt32(currbid);
                    tr.m_callTime = Convert.ToDateTime("1800-1-1 00:00:00");
                    tr.m_isread   = 0;
                    long messge = br.Add(tr);
                }
            }
            Tunnel.Data.DbHelperSQL.ExecuteSql("DELETE TUNNEL_REMIND WHERE m_type=1 and m_bid=-1 and m_typeid=" + mtb.b_id);//删除待办事项
            Tunnel.Common.Message.Show("操作成功!", "Document_Add.aspx");
        }
        catch
        {
            Tunnel.Common.Message.back("流程错误,请与管理员联系!");
        }
    }