Example #1
0
    /// <summary>
    /// 删除记录
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void LinkButton1_Command(object sender, CommandEventArgs e)
    {
        int Id  = Convert.ToInt32(e.CommandArgument);
        int num = 0;

        mbll.Delete(Id, ul.LoginID, Tunnel.Common.Common.GetIp(), ref num);
        Tunnel.BLL.Tunnel_Remind rd = new Tunnel.BLL.Tunnel_Remind();
        string strsql = "";

        strsql = "delete [Tunnel_Remind] where m_typeid=" + Id;
        int reulst = Tunnel.Data.DbHelperSQL.ExecuteSql(strsql);

        cuttentPage = MTCPager1.PageIndex;
        delState    = true;
        PageBind();

        if (!string.IsNullOrEmpty(e.CommandName))
        {
            if (num == 1)
            {
                string filePaht = Request.PhysicalApplicationPath + e.CommandName;
                if (System.IO.File.Exists(filePaht))
                {
                    System.IO.File.Delete(filePaht);
                }
            }
        }
    }
Example #2
0
    public void Del(int id)
    {
        Tunnel.BLL.Tunnel_Vote tv = new Tunnel.BLL.Tunnel_Vote();

        Tunnel.BLL.Tunnel_VoteRe          tvr     = new Tunnel.BLL.Tunnel_VoteRe();
        List <Tunnel.Model.Tunnel_VoteRe> tvrList = tvr.GetModelList("vate_voteId=" + id + "");

        foreach (Tunnel.Model.Tunnel_VoteRe item in tvrList)
        {
            tvr.Delete(item.vote_Id);
        }
        Tunnel.BLL.Tunnel_Votei          tvi     = new Tunnel.BLL.Tunnel_Votei();
        List <Tunnel.Model.Tunnel_Votei> tviList = tvi.GetModelList("ivote_voteId=" + id + "");

        foreach (Tunnel.Model.Tunnel_Votei item in tviList)
        {
            tvi.Delete(item.ivote_Id);
        }
        tv.Delete(id);

        Tunnel.BLL.Tunnel_Remind          tr     = new Tunnel.BLL.Tunnel_Remind();
        Tunnel.Model.Tunnel_Remind        trr    = new Tunnel.Model.Tunnel_Remind();
        List <Tunnel.Model.Tunnel_Remind> trList = new List <Tunnel.Model.Tunnel_Remind>();

        trList = tr.GetModelList("m_type=4 and m_typeid=" + id + "");
        foreach (Tunnel.Model.Tunnel_Remind item in trList)
        {
            tr.Delete(item.m_typeid);
        }
    }
Example #3
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;
                }
            }
            string curruser = m_value.Value;
            //将当前步骤存入数据库表:Tunnel_exam
            Tunnel.BLL.Tunnel_exam     bte = new Tunnel.BLL.Tunnel_exam();
            Tunnel.Model.Tunnel_exam   mte = new Tunnel.Model.Tunnel_exam();
            Tunnel.Model.Tunnel_Remind tr  = new Tunnel.Model.Tunnel_Remind();
            Tunnel.BLL.Tunnel_Remind   br  = new Tunnel.BLL.Tunnel_Remind();
            mte.e_bid       = 0;
            mte.e_endtime   = DateTime.Now;
            mte.e_gid       = this.sava();
            mte.e_user      = 0;
            mte.e_time      = DateTime.Now;
            mte.e_nextbuser = curruser;
            mte.e_nextbid   = 1;
            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/OtherDocument/Other_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      = 1;
                    tr.m_callTime = Convert.ToDateTime("1800-1-1 00:00:00");
                    tr.m_isread   = 0;
                    long messge = br.Add(tr);
                }
            }

            Tunnel.Common.Message.Show("提交成功!");
        }
        catch
        {
            Tunnel.Common.Message.back("流程错误,请与管理员联系!");
        }
    }
Example #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("流程审核错误,请与管理员联系!");
     }
 }
Example #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Tunnel.BLL.Tunnel_Remind tr = new Tunnel.BLL.Tunnel_Remind();
         Repeater5.DataSource = tr.GetList("m_type<>2 and m_type<>3 and m_touser=" + ul.LoginID);
         Repeater5.DataBind();
         Label1.Text = Repeater5.Items.Count.ToString();
     }
 }
Example #6
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     try
     {
         Tunnel.Model.Tunnel_Chat tc  = new Tunnel.Model.Tunnel_Chat();
         Tunnel.BLL.Tunnel_Chat   btc = new Tunnel.BLL.Tunnel_Chat();
         string content = TextBox1.Text;
         string tomen   = Request.Form["DropDownList1"];
         int    state   = 0;
         if (tomen != "0")
         {
             if (CheckBox1.Checked)
             {
                 state = 2;
                 Tunnel.Model.Tunnel_Remind tr = new Tunnel.Model.Tunnel_Remind();
                 Tunnel.BLL.Tunnel_Remind   br = new Tunnel.BLL.Tunnel_Remind();
                 tr.m_title    = "您有一条聊天信息" + "<font color=red>(待读)</font>";
                 tr.m_url      = "N_Chat/Default.aspx";
                 tr.m_touser   = Convert.ToInt32(tomen);
                 tr.m_time     = DateTime.Now;
                 tr.m_type     = 2;
                 tr.m_typeid   = 2;
                 tr.m_bid      = 1;
                 tr.m_callTime = DateTime.Now.AddSeconds(2);
                 tr.m_isread   = 0;
                 long messge = br.Add(tr);
             }
             else
             {
                 state = 1;
             }
         }
         Tunnel.BLL.UserLogin ul = new Tunnel.BLL.UserLogin();
         ul.UsbnLogin     = ul.getUserModel(ul.LoginID);
         tc.Chat_Content  = content;
         tc.Chat_Date     = DateTime.Now;
         tc.Chat_State    = state;
         tc.Chat_UserID   = ul.LoginID;
         tc.Chat_UserName = ul.UsbnLogin.m_name;
         tc.Chat_ToUserID = Convert.ToInt32(tomen);
         btc.Add(tc);
         Response.Redirect("Chat_Bottom.aspx");
     }
     catch
     {
         return;
     }
 }
Example #7
0
    public void Del()
    {
        Tunnel.BLL.Tunnel_workplan tw = new Tunnel.BLL.Tunnel_workplan();
        Tunnel.BLL.UserLogin       ul = new Tunnel.BLL.UserLogin();
        tw.Delete(int.Parse(Request.QueryString["id"].ToString()), ul.LoginID, Tunnel.Common.Common.GetIp());
        Tunnel.BLL.Tunnel_Remind   tr  = new Tunnel.BLL.Tunnel_Remind();
        Tunnel.Model.Tunnel_Remind trr = new Tunnel.Model.Tunnel_Remind();

        List <Tunnel.Model.Tunnel_Remind> trList = new List <Tunnel.Model.Tunnel_Remind>();

        trList = tr.GetModelList("m_type=3 and m_typeid=" + Request.QueryString["id"].ToString() + "");
        if (trList.Count > 0)
        {
            tr.Delete(trList[0].m_typeid);
        }
    }
Example #8
0
 public void call(string title, string id, DateTime calltime, long toId)
 {
     Tunnel.BLL.UserLogin       ul          = new Tunnel.BLL.UserLogin();
     Tunnel.Model.Tunnel_Remind remindmodel = new Tunnel.Model.Tunnel_Remind();
     remindmodel.m_isread   = 0;
     remindmodel.m_time     = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
     remindmodel.m_title    = " 投票:" + title + "<font color=red>(未读)</font>";
     remindmodel.m_touser   = toId;
     remindmodel.m_url      = "N_Exchange/N_Vote/Vote.aspx?id=" + id;
     remindmodel.m_callTime = calltime;
     remindmodel.m_type     = 4;
     remindmodel.m_typeid   = int.Parse(id);
     remindmodel.m_bid      = 0;
     Tunnel.BLL.Tunnel_Remind rd = new Tunnel.BLL.Tunnel_Remind();
     rd.Add(remindmodel);
 }
Example #9
0
 public void call(string title, string id, DateTime calltime)
 {
     Tunnel.BLL.UserLogin       ul          = new Tunnel.BLL.UserLogin();
     Tunnel.Model.Tunnel_Remind remindmodel = new Tunnel.Model.Tunnel_Remind();
     remindmodel.m_isread   = 0;
     remindmodel.m_time     = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
     remindmodel.m_title    = "日程提示:" + title + "<font color=red>(未读)</font>";
     remindmodel.m_touser   = ul.LoginID;
     remindmodel.m_url      = "N_Calendar/CalendarInfo.aspx?id=" + id;
     remindmodel.m_callTime = calltime;
     remindmodel.m_typeid   = int.Parse(id);
     remindmodel.m_type     = 3;
     Tunnel.BLL.Tunnel_Remind rd = new Tunnel.BLL.Tunnel_Remind();
     if (calltime != Convert.ToDateTime("1800-01-01"))
     {
         rd.Add(remindmodel);
     }
 }
Example #10
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        mtb = btb.GetModel(int.Parse(Request.Params["bid"]));

        #region 消息提示
        Tunnel.Model.Tunnel_Remind tr = new Tunnel.Model.Tunnel_Remind();
        Tunnel.BLL.Tunnel_Remind   br = new Tunnel.BLL.Tunnel_Remind();
        tr.m_title    = mtb.b_title + "<font color=red>(审核没有通过)</font>";
        tr.m_url      = "N_WorkFlow/MyApply/Apply_Edit.aspx?Bid=" + mtb.b_id + "&Flow=" + mtb.b_sort;
        tr.m_touser   = Convert.ToInt32(mtb.b_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);
        #endregion

        Tunnel.Data.DbHelperSQL.ExecuteSql("UPDATE TUNNEL_BUMF SET B_STATE=-1 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");
    }
Example #11
0
    public void PageBind()
    {
        PageBase pb = new PageBase();

        pb.TblName       = "Tunnel_mail";
        pb.FldName       = "m_id";
        pb.ProcedureName = "pagination";
        pb.PageSize      = 10;
        pb.PageIndex     = 1;
        pb.StrWhere      = " m_sort=0 and m_main = 0 and m_state=0 and m_to = " + ul.LoginID;
        pb.DoCount       = 1;
        mbll.GetList(pb, ref Count); //获取总条数
        pb.DoCount = 0;
        List <Tunnel.Model.Tunnel_mail> modelList = new List <Tunnel.Model.Tunnel_mail>();

        modelList = mbll.GetList(pb, ref Count);//获取分页结果
        //数据绑定
        Repeater1.DataSource = modelList;
        Repeater1.DataBind();
        Tunnel.BLL.Tunnel_Remind tr = new Tunnel.BLL.Tunnel_Remind();
        Repeater5.DataSource = tr.GetList("m_type<>2 and m_type<>3 and m_touser=" + ul.LoginID);
        Repeater5.DataBind();
        Label1.Text = Repeater5.Items.Count.ToString();
    }
Example #12
0
    //批量删除操作
    protected void btnDel_Click(object sender, EventArgs e)
    {
        System.Web.UI.HtmlControls.HtmlInputCheckBox CBoxDelete;

        foreach (RepeaterItem rtitem in this.Repeater1.Items)
        {
            CBoxDelete = (System.Web.UI.HtmlControls.HtmlInputCheckBox)rtitem.FindControl("cb1");
            LinkButton lik = (LinkButton)rtitem.FindControl("LinkButton1");
            if (CBoxDelete.Checked && lik.Enabled)
            {
                string id  = ((HtmlInputHidden)rtitem.FindControl("SelectCode")).Value;
                int    Id  = Convert.ToInt32(lik.CommandArgument);
                int    num = 0;
                mbll.Delete(Id, ul.LoginID, Tunnel.Common.Common.GetIp(), ref num);
                Tunnel.BLL.Tunnel_Remind rd = new Tunnel.BLL.Tunnel_Remind();
                string strsql = "";
                strsql = "delete [Tunnel_Remind] where m_typeid=" + Id;
                int reulst = Tunnel.Data.DbHelperSQL.ExecuteSql(strsql);
                cuttentPage = MTCPager1.PageIndex;
                delState    = true;

                if (!string.IsNullOrEmpty(lik.CommandName))
                {
                    if (num == 1)
                    {
                        string filePaht = Request.PhysicalApplicationPath + lik.CommandName;
                        if (System.IO.File.Exists(filePaht))
                        {
                            System.IO.File.Delete(filePaht);
                        }
                    }
                }
            }
        }
        PageBind();
    }
Example #13
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Tunnel.Model.Tunnel_information model = new Tunnel.Model.Tunnel_information();
        model.i_title   = tb_Title.Text;
        model.i_content = FreeTextBox1.Value;
        if (RadioButton1.Checked)
        {
            TypeId = 1;
        }
        else
        {
            TypeId = 0;
        }
        model.i_sort = TypeId; // 0是新闻 1公告
        model.i_user = ul.LoginID;
        model.i_time = DateTime.Now;
        model.i_hit  = 0;
        model.i_Ip   = Tunnel.Common.Common.GetIp();
        model.i_id   = Convert.ToInt32(i_id);
        HttpPostedFile hpf = file1.PostedFile;

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

            return;
        }
        else
        {
            CreateMdAndFilePaht(hpf);
        }
        if (filePaht.Equals(""))
        {
            model.i_files = Label3.Text;
        }
        else
        {
            model.i_files = filePaht; //infofiles
        }
        if (filenames.Equals(""))
        {
            model.i_files = Label3.Text.Replace("<br/>附件名:", "");
        }
        else
        {
            model.i_files = filePaht;
        }
        int    relt = -1;
        string str  = titleName;

        relt = bll.Update(model);
        string strsql2 = "delete tunnel_remind where m_typeid=" + model.i_id.ToString() + " and m_type=4";

        Tunnel.Data.DbHelperSQL.ExecuteSql(strsql2);
        //-------添加消息提示--------
        Tunnel.Model.Tunnel_Remind remindmodel = new Tunnel.Model.Tunnel_Remind();
        remindmodel.m_isread   = 0;
        remindmodel.m_time     = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
        remindmodel.m_title    = "有新闻需要您审核<font color=red>(待审核)</font>";
        remindmodel.m_touser   = model.i_audituser;
        remindmodel.m_url      = "N_News/N_News/N_NewSh.aspx?Id=" + relt;
        remindmodel.m_type     = 4;
        remindmodel.m_typeid   = relt;
        remindmodel.m_callTime = Convert.ToDateTime("1800-01-01");
        Tunnel.BLL.Tunnel_Remind rd = new Tunnel.BLL.Tunnel_Remind();
        rd.Add(remindmodel);



        if (relt > 0)
        {
            str += "成功!";
        }
        else
        {
            str += "失败!";
        }

        // UpImange(relt);

        MessageBox(str, url);
    }
Example #14
0
    protected void Button2_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"]));
            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;
                string lastendtime = Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "e_endtime", "e_gid=" + mtb.b_id + " 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 = 0;
                bte.Add(mte);

                #region 消息提示
                Tunnel.Model.Tunnel_Remind tr = new Tunnel.Model.Tunnel_Remind();
                Tunnel.BLL.Tunnel_Remind   br = new Tunnel.BLL.Tunnel_Remind();
                tr.m_title    = mtb.b_title + "<font color=red>(审批没有通过)</font>";
                tr.m_url      = "N_WorkFlow/OtherDocument/Other_Edit.aspx?bid=" + Request.Params["bid"];
                tr.m_touser   = Convert.ToInt32(mtb.b_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);
                #endregion

                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     = 1024;//1024代表是其它申请 没有步骤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=" + mtb.b_id);
                    ta.Add(ma);
                }
                Tunnel.Data.DbHelperSQL.ExecuteSql("UPDATE TUNNEL_BUMF SET B_STATE=0 WHERE B_ID=" + mtb.b_id);                                                  //改变公文状态
                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");
            }
        }
    }
Example #15
0
    protected void Button5_Click(object sender, EventArgs e)
    {
        //这里为存储当前步骤
        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;
            }
        }
    }
Example #16
0
    protected void Button2_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));
                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     = 0;
                    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=" + mtb.b_id + " 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 = 0;
                    bte.Add(mte);

                    #region 消息提示
                    Tunnel.Model.Tunnel_Remind tr = new Tunnel.Model.Tunnel_Remind();
                    Tunnel.BLL.Tunnel_Remind   br = new Tunnel.BLL.Tunnel_Remind();
                    tr.m_title = mtb.b_title + "<font color=red>(审批没有通过)</font>";
                    string flowtype = Tunnel.Common.GetValue.getDataValue("Tunnel_flow", "f_sort", "f_id=" + mtb.b_sort);
                    if ("18".Equals(flowtype))
                    {
                        tr.m_url = "N_WorkFlow/ODocument/Document_Edit.aspx?Bid=" + mtb.b_id;
                    }
                    else
                    {
                        tr.m_url = "N_WorkFlow/MyApply/Apply_Edit.aspx?Bid=" + mtb.b_id + "&Flow=" + mtb.b_sort;
                    }
                    tr.m_touser   = Convert.ToInt32(mtb.b_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);
                    #endregion

                    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=" + mtb.b_id);
                        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.Data.DbHelperSQL.ExecuteSql("UPDATE TUNNEL_BUMF SET B_STATE=0 WHERE B_ID=" + mtb.b_id);                                //改变公文状态
                    Tunnel.Common.Message.Show("操作成功!", "Apply_Sp.aspx");
                }
                else
                {
                    Tunnel.Common.Message.back("此流程己审批通过,请勿重复审批!"); return;
                }
            }
        }
    }
Example #17
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("流程错误,请与管理员联系!");
     }
 }
Example #18
0
    /// <summary>
    /// 发送邮件并保存到服务器
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Button1_Click(object sender, EventArgs e)
    {
        //获得所需参数
        string strTo = tb_toname.Text.Trim();

        strToIds = id_toValue.Value.Trim();
        string         strTitle   = tb_Title.Text.Trim();
        string         strContent = tb_content.Text.Trim().Replace("\r\n", @"<br \>").Replace("原信息内容:", "");
        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_mail   rbll  = new Tunnel.BLL.Tunnel_mail();
        Tunnel.Model.Tunnel_mail model = new Tunnel.Model.Tunnel_mail();
        model.m_title   = strTitle;
        model.m_content = strContent;
        model.m_file    = filePaht;
        model.m_time    = DateTime.Now;
        model.m_from    = ul.LoginID;
        model.m_sort    = 0; // 0未删除、1删除
        model.m_state   = 0; // 0未读、1已读
        model.m_Ip      = Tunnel.Common.Common.GetIp();
        if (strToIds.LastIndexOf(',') > 0)
        {
            strToIds = strToIds.Remove(strToIds.LastIndexOf(','), 1);
        }
        string[] arr   = strToIds.Split(',');
        int      relt1 = -1;

        foreach (string s in arr)
        {
            bool state = true;
            for (int i = 1; i <= 2; i++)
            {
                if (i == 1)
                {
                    model.m_Main = 1; //标记是自己发的
                    model.m_to   = Convert.ToInt32(s);
                    relt1        = rbll.Add(model);
                }
                else
                {
                    model.m_Main = 0; //标记是发给别人的
                    model.m_to   = Convert.ToInt32(s);
                    relt1        = rbll.Add(model);
                    //-------添加消息提示--------
                    Tunnel.Model.Tunnel_Remind remindmodel = new Tunnel.Model.Tunnel_Remind();
                    remindmodel.m_isread   = 0;
                    remindmodel.m_time     = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
                    remindmodel.m_title    = "新的站内消息,发件人:" + ul.getUserModel(model.m_from).m_name + "。时间:" + DateTime.Now + "<font color=red>(未读)</font>";
                    remindmodel.m_touser   = model.m_to;
                    remindmodel.m_url      = "N_Exchange/N_Message/N_MessageView.aspx?Id=" + relt1;
                    remindmodel.m_type     = 2;
                    remindmodel.m_typeid   = relt1;
                    remindmodel.m_callTime = Convert.ToDateTime("1800-01-01");
                    Tunnel.BLL.Tunnel_Remind rd = new Tunnel.BLL.Tunnel_Remind();
                    rd.Add(remindmodel);
                }
                if (relt1 == 0)
                {
                    state = false;
                    break;
                }
            }
            if (state == false)
            {
                break;
            }
        }

        string str = "站内信息发送";
        string url = "N_MessageOld.aspx";

        if (relt1 > 0)
        {
            str += "成功!";
        }
        else
        {
            str += "失败!";
        }

        MessageBox(str, url);
    }
Example #19
0
    /// <summary>
    /// 发布公告
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Button1_Click(object sender, EventArgs e)
    {
        Tunnel.Model.Tunnel_information model = new Tunnel.Model.Tunnel_information();
        model.i_title     = tb_Title.Text;
        model.i_content   = FCKeditor.Value;
        model.i_sort      = TypeId; // 0是新闻 1公告
        model.i_user      = ul.LoginID;
        model.i_hit       = 0;
        model.i_time      = DateTime.Now;
        model.i_Ip        = Tunnel.Common.Common.GetIp();
        model.i_audituser = Convert.ToInt32(DropDownList1.SelectedValue);
        model.i_audittime = "";
        model.i_auditmark = "";
        HttpPostedFile hpf = file1.PostedFile;

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

                return;
            }
            else
            {
                CreateMdAndFilePaht(hpf);
            }
        }
        else
        {
            filePaht = "";
        }
        model.i_files = filePaht; //infofiles

        int    relt = -1;
        string str  = titleName;

        relt = bll.Add(model);
        //-------添加消息提示--------
        Tunnel.Model.Tunnel_Remind remindmodel = new Tunnel.Model.Tunnel_Remind();
        remindmodel.m_isread   = 0;
        remindmodel.m_time     = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
        remindmodel.m_title    = "有新闻需要您审核<font color=red>(待审核)</font>";
        remindmodel.m_touser   = model.i_audituser;
        remindmodel.m_url      = "N_News/N_News/N_NewSh.aspx?Id=" + relt;
        remindmodel.m_type     = 4;
        remindmodel.m_typeid   = relt;
        remindmodel.m_callTime = Convert.ToDateTime("1800-01-01");
        Tunnel.BLL.Tunnel_Remind rd = new Tunnel.BLL.Tunnel_Remind();
        rd.Add(remindmodel);

        if (relt > 0)
        {
            str += "成功!";
        }
        else
        {
            str += "失败!";
        }
        // UpImange(relt);


        MessageBox(str, url);
    }
Example #20
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("流程错误,请与管理员联系!");
        }
    }