示例#1
0
    public void Judge_Users()
    {
        HyoaClass_conn.Hyoa_nbheyi Hyoa_nbheyi = new HyoaClass_conn.Hyoa_nbheyi();
        DataTable dt = Hyoa_nbheyi.Getfirstnbheyi();
        Int32 li_user1 = 0;
        if (dt.Rows.Count > 0)
        {
            li_user1 = System.Int32.Parse(dt.Rows[0]["hy_usernum"].ToString()) + 1;
        }

        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
        DataTable dt2 = Hyoa_user.Getusers_jzcw();
        Int32 li_user2 = 0;
        li_user2 = System.Int32.Parse(dt2.Rows.Count.ToString());

        if (li_user1 == li_user2)
        {
            //删除最近注册的账号
            Response.Write("<script>alert('您的系统注册用户数授权已满,请联系管理员或宁波合益!');</script>");
        }
        if (li_user1 < li_user2)
        {
            //删除最近注册的账号
            Response.Write("<script>alert('您的系统注册用户数授权已超出限制,系统将自动删除最近注册的一个账号!');</script>");
            Hyoa_user.DeleteOneUserid();
        }
    }
示例#2
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        string ls_tip = "保存成功!";

        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
        DataTable dtuser = Hyoa_user.Getuserallinfo(this.txtuserid.Text);

        if (dtuser.Rows.Count > 0)
        {
            for (int i = 0; i < dtuser.Rows.Count; i++)
            {
                Hyoa_user.id = dtuser.Rows[i]["id"].ToString();
                Hyoa_user.hy_loginuid = dtuser.Rows[i]["hy_loginuid"].ToString();
                Hyoa_user.hy_userid = dtuser.Rows[i]["hy_userid"].ToString();
                Hyoa_user.hy_deptid = dtuser.Rows[i]["hy_deptid"].ToString();
                Hyoa_user.hy_username = this.txtusername.Text;
                Hyoa_user.hy_post = dtuser.Rows[i]["hy_post"].ToString();
                Hyoa_user.hy_ifleader = dtuser.Rows[i]["hy_ifleader"].ToString();
                Hyoa_user.hy_officetel = this.txtofficetel.Value;
                Hyoa_user.hy_hometel = this.txthometel.Value;
                Hyoa_user.hy_mobile = this.txtmobile.Value;
                Hyoa_user.hy_virtualnumber = this.txtvirtualtel.Value;
                Hyoa_user.hy_sort = float.Parse(dtuser.Rows[i]["hy_sort"].ToString());
                Hyoa_user.hy_isenabled = dtuser.Rows[i]["hy_isenabled"].ToString();
                Hyoa_user.hy_edittime = System.DateTime.Now.ToString();
                Hyoa_user.hy_birthday = dtuser.Rows[i]["hy_birthday"].ToString();
                Hyoa_user.hy_ifsrtx = dtuser.Rows[i]["hy_ifsrtx"].ToString();
                Hyoa_user.hy_fjh = dtuser.Rows[i]["hy_fjh"].ToString();
                Hyoa_user.hy_xb = dtuser.Rows[i]["hy_xb"].ToString();
                Hyoa_user.hy_zzmm = dtuser.Rows[i]["hy_zzmm"].ToString();
                Hyoa_user.hy_xl = dtuser.Rows[i]["hy_xl"].ToString();
                Hyoa_user.hy_byyx = dtuser.Rows[i]["hy_byyx"].ToString();
                Hyoa_user.hy_jdwsj = dtuser.Rows[i]["hy_jdwsj"].ToString();
                Hyoa_user.hy_jtzz = dtuser.Rows[i]["hy_jtzz"].ToString();
                Hyoa_user.hy_sfzhm = dtuser.Rows[i]["hy_sfzhm"].ToString();
                Hyoa_user.hy_bz = dtuser.Rows[i]["hy_bz"].ToString();
                Hyoa_user.hy_jsids = dtuser.Rows[i]["hy_jsids"].ToString();
                Hyoa_user.hy_jsnames = dtuser.Rows[i]["hy_jsnames"].ToString();
                Hyoa_user.hy_field1 = dtuser.Rows[i]["hy_field1"].ToString();
                Hyoa_user.hy_field2 = dtuser.Rows[i]["hy_field2"].ToString();
                Hyoa_user.hy_field3 = dtuser.Rows[i]["hy_field3"].ToString();
                Hyoa_user.hy_field4 = dtuser.Rows[i]["hy_field4"].ToString();
                Hyoa_user.hy_field5 = dtuser.Rows[i]["hy_field5"].ToString();
                Hyoa_user.Update();
            }
        }

        //处理完成后的提示及跳转
        if (this.txtifpop.Value == "")
        {
            Response.Write("<script>alert('" + ls_tip + "');</script>");
        }
        else
        {
            Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
        }
    }
    private void DataPlay()
    {
        if (this.Session["hyuid"].ToString() != "")
        {
            //根据用户ID得到信息
            this.txtuserid.Text = this.Session["hyuid"].ToString();
            HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
            DataTable dtuser = Hyoa_user.Getuserallinfo(this.txtuserid.Text);
            if (dtuser.Rows.Count > 0)
            {
                this.txtusername.Text = dtuser.Rows[0]["hy_username"].ToString();
            }
            dtuser.Clear();
            this.txtuserid.Enabled = false;
            this.txtusername.Enabled = false;

            //读取选择风格数据
            HyoaClass.Hyoa_mystyle Hyoa_mystyle = new HyoaClass.Hyoa_mystyle();
            DataTable dt = Hyoa_mystyle.Getstylebyuserid(this.txtuserid.Text);
            if (dt.Rows.Count > 0)
            {
                ddlhy_style.SelectedValue = dt.Rows[0]["hy_style"].ToString();
                this.txtdocid.Value = dt.Rows[0]["ID"].ToString();
            }
        }
    }
示例#4
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        string ls_tip = "保存成功!";
        try
        {
            string[] lv_jsrsysname, lv_jsrcnname;//接收人系统名、中文名

            lv_jsrsysname = this.f_ReceivesysNameList.Value.ToString().Split('+');
            lv_jsrcnname = this.f_ReceiveChNameList.Value.ToString().Split('+');
            HyoaClass.Hyoa_sms Hyoa_sms = new HyoaClass.Hyoa_sms();
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
            DataTable dt;
            for (int i = 0; i < lv_jsrsysname.Length; i++)
            {
                Hyoa_sms.ID = Hyoa_global.GetRandom();
                Hyoa_sms.DOCID = Hyoa_global.GetRandom();
                Hyoa_sms.hy_fsrid = this.txtdjrid.Value;
                Hyoa_sms.hy_fsrname = this.f_SendChName.Text;
                Hyoa_sms.hy_fsrsjh = this.f_SendMobileNo.Text;
                Hyoa_sms.hy_jsrid = lv_jsrsysname[i];
                Hyoa_sms.hy_jsrname = lv_jsrcnname[i];
                dt = Hyoa_user.Getuserallinfobyloginid(lv_jsrsysname[i]);
                if (dt.Rows.Count > 0)
                {
                    Hyoa_sms.hy_jsrsjh = dt.Rows[0]["hy_mobile"].ToString();
                }
                else
                {
                    Hyoa_sms.hy_jsrsjh = lv_jsrsysname[i];
                }
                Hyoa_sms.hy_createtime = System.DateTime.Now.ToString();
                Hyoa_sms.hy_from = "";
                Hyoa_sms.hy_content = this.f_smsContents.Text;
                Hyoa_sms.hy_isnowsend = 1;
                Hyoa_sms.hy_takedate = "";
                Hyoa_sms.hy_taketime = "";
                Hyoa_sms.hy_state = 0;
                Hyoa_sms.hy_tableid = "Mudelsms";
                Hyoa_sms.Insert();
            }
        }
        catch
        {

        }
        finally
        {
            //处理完成后的提示及跳转
            if (this.txtifpop.Value == "")
            {
                Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
            }
            else
            {
                Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
            }
        }
    }
 //保存
 protected void Button_Save_Click(object sender, EventArgs e)
 {
     HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
     if (Hyoa_user.DoChPwd(this.txtuserid.Value, this.txtNewPass.Value))
     {
         Response.Write("<script>alert('修改密码成功!');self.close();</script>");
     }
 }
示例#6
0
    protected void WebPageOpen()
    {
        string ls_uid = "";
        string ls_uname = "";
        string ls_deptid = "";
        string ls_deptname = "";
        string ls_key = "";
        string ls_url = "";
        string ls_docid = "";

        if (this.Request.QueryString["uid"] != null)
            ls_uid = this.Request.QueryString["uid"].ToString();

        if (this.Request.QueryString["key"] != null)
            ls_key = this.Request.QueryString["key"].ToString();

        if (this.Request.QueryString["docid"] != null)
            ls_docid = this.Request.QueryString["docid"].ToString();

        int pos = Request.RawUrl.IndexOf("&redirectto=");
        if (pos > 0)
            ls_url = this.Request.RawUrl.Substring(pos + 12);

        if (ls_key != "cd04fa144ec48507")
            Response.Write("<script language=javascript>alert('非常抱歉,您的访问地址有误,请联系管理员!');self.close();</script>");

        //判断该用户是否存在
        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
        DataTable dt_user = Hyoa_user.Getuserallinfo(ls_uid);
        if (dt_user.Rows.Count > 0)
        {
            ls_uname = dt_user.Rows[0]["hy_username"].ToString();
            ls_deptid = dt_user.Rows[0]["hy_deptid"].ToString();
            ls_deptname = dt_user.Rows[0]["hy_deptname"].ToString();
        }
        else
        {
            Response.Write("<script>alert('未找到该用户信息,请联系管理员!');self.close();</script>");
        }

        Session["hyuid"] = ls_uid;
        Session["hyuname"] = ls_uname;
        Session["hydeptid"] = ls_deptid;
        Session["hydeptname"] = ls_deptname;

        //根据文档ID来判断该文件是否存在,如果存在则跳转到该URL
        HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
        DataTable dt = Hyoa_flowmain.Getflowmain(ls_docid);
        if (dt.Rows.Count > 0)
        {
            this.Response.Redirect(ls_url);
        }
        else
        {
            Response.Write("<script>alert('未找到对应的文档,可能文档已被删除,请联系管理员!');window.location='/'</script>");
        }
    }
    public string getusernamebyuserid(string pis_userid)
    {
        string ls_return = "";
        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
        DataTable dt = Hyoa_user.Getuserallinfo(pis_userid);
        if (dt.Rows.Count > 0)
            ls_return = dt.Rows[0]["hy_username"].ToString();

        return ls_return;
    }
示例#8
0
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        if (this.txt_username.Value == "")
        {
            this.RegisterClientScriptBlock("scripterror", "<script language=javascript>alert('请输入用户名!')</script>");
            return;
        }
        if (this.txt_password.Value == "")
        {
            this.RegisterClientScriptBlock("scripterror", "<script language=javascript>alert('请输入密码!')</script>");
            return;
        }

        String password = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(this.txt_password.Value, "MD5");
        HyoaClass.Hyoa_user Users = new HyoaClass.Hyoa_user();

        if (Users.Login(this.txt_username.Value, password))
        {
            DataTable dt = Users.Getuserallinfo(this.txt_username.Value);
            if (dt.Rows.Count > 0)
            {
                if (dt.Rows[0]["hy_isenabled"].ToString() == "否")
                {
                    //账号被禁用了
                    this.RegisterClientScriptBlock("scripterror", "<script language=javascript>alert('该账号已被禁用,请联系管理员!')</script>");
                    return;
                }
                else
                {
                    Session["hyuid"] = this.txt_username.Value;
                    Session["hyuname"] = dt.Rows[0]["hy_username"].ToString();
                    Session["hydeptid"] = dt.Rows[0]["hy_deptid"].ToString();
                    Session["hydeptname"] = dt.Rows[0]["hy_deptname"].ToString();
                    Session["hypost"] = dt.Rows[0]["hy_post"].ToString(); ;
                    //得到风格
                    HyoaClass.Hyoa_mystyle Hyoa_mystyle = new HyoaClass.Hyoa_mystyle();
                    DataTable dt_mystyle = Hyoa_mystyle.Getstylebyuserid(this.txt_username.Value);
                    if (dt_mystyle.Rows.Count > 0 && dt_mystyle.Rows[0]["hy_style"].ToString() != "")
                        Session["mystyle"] = dt_mystyle.Rows[0]["hy_style"].ToString();
                    else
                        Session["mystyle"] = "/hyhtml/images/";

                    this.Response.Redirect(this.lblurl.Text);
                }
            }
            dt.Clear();
        }
        else
        {
            this.RegisterClientScriptBlock("scripterror", "<script language=javascript>alert('输入的用户名或者密码不正确!')</script>");
            return;
        }
    }
示例#9
0
    protected void btndelinfo_Click(object sender, EventArgs e)
    {
        HyoaClass.Hyoa_dept Hyoa_dept = new HyoaClass.Hyoa_dept();
        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
        String[] v_uids = this.txtuids.Value.Split(',');
        for(var i=0;i<v_uids.Length;i++)
        {
            if (v_uids[i] != "")
            {
                //this.Response.Write("<script>alert('aaa')</script>");
                //判断是否有人员
                DataTable dt_dept = Hyoa_dept.Getdept(v_uids[i]);
                DataTable dt_user = Hyoa_user.Getusersbydeptid(v_uids[i]);
                if (dt_user.Rows.Count > 0)
                {
                    Response.Write("<script>alert('" + dt_dept.Rows[0]["hy_deptname"].ToString() + "下存在人员,不能进行删除!');</script>");
                    return;
                }
                //判断是否有子部门
                DataTable dt_subdept = Hyoa_dept.GetSubDepts(v_uids[i]);
                if (dt_subdept.Rows.Count > 0)
                {
                    Response.Write("<script>alert('" + dt_dept.Rows[0]["hy_deptname"].ToString() + "下存在子部门,不能进行删除!');</script>");
                    return;
                }

                //写删除部门系统日志start
                HyoaClass.Hyoa_log Hyoa_log = new HyoaClass.Hyoa_log();
                Hyoa_log.ID = System.Guid.NewGuid().ToString();
                Hyoa_log.hy_createtime = System.DateTime.Now.ToString();
                string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
                if (userip == null || userip == "")
                {
                    userip = Request.ServerVariables["REMOTE_ADDR"];
                }
                Hyoa_log.hy_oppip = userip;
                Hyoa_log.hy_opptype = "删除";
                Hyoa_log.hy_oppcontent = "删除部门:" + dt_dept.Rows[0]["hy_deptname"].ToString();
                Hyoa_log.hy_oppuserid = this.Session["hyuid"].ToString();
                Hyoa_log.hy_oppusername = this.Session["hyuname"].ToString();
                Hyoa_log.Insert();

                Hyoa_dept.hy_deptid = v_uids[i];
                Hyoa_dept.Delete();
            }
        }
        this.txtuids.Value = "";
        //DataPlay(1);
        DataPlay(System.Int32.Parse(this.curpage.Text));
    }
示例#10
0
    private void DataPlay()
    {
        string lsydry="";
        if (this.Request.QueryString["docid"] != null)
        {
            string ls_docid = this.Request.QueryString["docid"].ToString();
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            string lssql = "select * from hyc_" + Request.QueryString["tableid"].ToString() + " where DOCID='" + ls_docid + "'";
            DataTable dt = Hyoa_global.GetDataTable(lssql);
            HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
            string lsusername = "";
            if(dt.Rows.Count>0)
            {
                lsusername = "";
                string[] lvhy_readuserlist;
                string[] lvhy_readdatelist;
                lvhy_readuserlist = dt.Rows[0]["hy_readuserlist"].ToString().Split(',');
                lvhy_readdatelist = dt.Rows[0]["hy_readdatelist"].ToString().Split(',');
                for (int j = 1; j < lvhy_readuserlist.Length; j++)
                {
                    lsydry += "<TR height=27px>";
                    lsydry += "<TD align=\"center\" class=\"Tdcellright\">"+j.ToString()+"</TD>";
                    DataTable dtuser = Hyoa_user.Getuserallinfobyloginid(lvhy_readuserlist[j]);
                    if (dtuser.Rows.Count > 0)
                    {
                        lsusername = dtuser.Rows[0]["hy_username"].ToString();
                    }
                    else
                    {
                        lsusername = "******";
                    }
                    dtuser.Clear();
                    lsydry += "<TD align=\"center\" class=\"Tdcellright\">" + lsusername + "</TD>";
                    if (lvhy_readdatelist.Length > j)
                    {
                        lsydry += "<TD align=\"center\" class=\"Tdcellright\">" + lvhy_readdatelist[j] + "</TD>";
                    }
                    else
                    {
                        lsydry += "<TD align=\"center\" class=\"Tdcellright\">&nbsp;</TD>";
                    }
                    lsydry += "</TR>";
                }

            }

            this.lblydry.Text = lsydry;

        }
    }
示例#11
0
    protected void WebPageOpen()
    {
        string ls_uid = "";
        string ls_pwd = "";
        string ls_key = "";
        string ls_url = "";

        if (this.Request.QueryString["uid"] != null)
            ls_uid = this.Request.QueryString["uid"].ToString();

        if (this.Request.QueryString["pwd"] != null)
            ls_pwd = this.Request.QueryString["pwd"].ToString();

        if (this.Request.QueryString["key"] != null)
            ls_key = this.Request.QueryString["key"].ToString();

        int pos = Request.RawUrl.IndexOf("&redirectto=");
        if (pos > 0)
            ls_url = this.Request.RawUrl.Substring(pos + 12);

        if (ls_key != "cd04fa144ec48507")
            Response.Write("<script language=javascript>alert('非常抱歉,您的访问地址有误,请联系管理员!');self.close();</script>");

        String password = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(ls_pwd, "MD5");
        HyoaClass.Hyoa_user Users = new HyoaClass.Hyoa_user();

        if (Users.Login(ls_uid, password))
        {
            DataTable dt = Users.Getuserallinfo(ls_uid);
            if (dt.Rows.Count > 0)
            {
                Session["hyuid"] = ls_uid;
                Session["hyuname"] = dt.Rows[0]["hy_username"].ToString();
                Session["hydeptid"] = dt.Rows[0]["hy_deptid"].ToString();
                Session["hydeptname"] = dt.Rows[0]["hy_deptname"].ToString();
                this.Response.Redirect(ls_url);
            }
            dt.Clear();
        }
        else
        {
            this.Response.Redirect("/");
            return;
        }
    }
示例#12
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        String password = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(this.txtOldPass.Value, "MD5");
        HyoaClass.Hyoa_user Users = new HyoaClass.Hyoa_user();

        if (Users.Login(this.txtuserid.Value, password))
        {
            HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
            if (Hyoa_user.DoChPwd(this.txtuserid.Value, this.txtNewPass.Value))
            {
                Response.Write("<script>alert('修改密码成功!');self.close();</script>");
            }
        }
        else
        {
            Response.Write("<script>alert('旧密码不正确,请重新输入!');</script>");
            return;
        }
    }
示例#13
0
 private void hysendxx2(string fsrid, string fsrname, string jsrid, string jsrname, string content, string id, string ls_txfs)
 {
     HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
     if (ls_txfs.Contains("即时通讯"))
     {
         //即时消息
         //Hyoa_global.Sendjstx_global(id, fsrid, fsrname, jsrid, jsrname, "wjcd/main_read.aspx?id=" + id + "&pop=1", content, 0, "Tablelwjcd");
         Hyoa_global.Sendjstx_global(id, fsrid, fsrname, jsrid, jsrname, "Mudelwjcd", content, 0, "Tablelwjcd");
     }
     if (ls_txfs.Contains("手机短信"))
     {
         //手机短信
         HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
         string fsrsjh = Hyoa_user.GetMobilebyuserid(fsrid);
         string jsrsjh = Hyoa_user.GetMobilebyuserid(jsrid);
         Hyoa_global.Sendsms_global(id, fsrid, fsrname, fsrsjh, jsrid, jsrname, jsrsjh, "Mudelwjcd", content, 1, "", "", 0, "Tablelwjcd");
         //Hyoa_global.Sendsms_global(id, jsrid, jsrname, cb_fsrsjh, jsrid, jsrname, cb_fsrsjh, "ldrc/main.aspx?op=modify&mid=Mudelldrcap&tableid=Tableldrcap&pop=1&&docid=" + docid, content, 1, "", "", 0, "Tablelwjcd");
     }
 }
    protected void btndelinfo_Click(object sender, EventArgs e)
    {
        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
        String[] v_uids = this.txtuids.Value.Split(',');
        for (var i = 0; i < v_uids.Length; i++)
        {
            if (v_uids[i] != "")
            {
                //写删除人员系统日志start
                DataTable dtuser = Hyoa_user.Getuserbyid(v_uids[i]);

                //如果是admin,提示不能删除
                if (dtuser.Rows[0]["hy_userid"].ToString() == "admin")
                {
                    Response.Write("<script>alert('admin为超级管理员,您无法进行删除!');</script>");
                    return;
                }

                HyoaClass.Hyoa_log Hyoa_log = new HyoaClass.Hyoa_log();
                Hyoa_log.ID = System.Guid.NewGuid().ToString();
                Hyoa_log.hy_createtime = System.DateTime.Now.ToString();
                string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
                if (userip == null || userip == "")
                {
                    userip = Request.ServerVariables["REMOTE_ADDR"];
                }
                Hyoa_log.hy_oppip = userip;
                Hyoa_log.hy_opptype = "删除";
                Hyoa_log.hy_oppcontent = dtuser.Rows[0]["hy_username"].ToString() + "被删除";
                Hyoa_log.hy_oppuserid = this.Session["hyuid"].ToString();
                Hyoa_log.hy_oppusername = this.Session["hyuname"].ToString();
                Hyoa_log.Insert();

                //写删除人员系统日志end
                Hyoa_user.id = v_uids[i];
                Hyoa_user.Deletebyid();
            }
        }
        this.txtuids.Value = "";
        //DataPlay(1);
        DataPlay(System.Int32.Parse(this.curpage.Text));
    }
示例#15
0
    private void DataPlay()
    {
        this.ddlisenabled.Items.Insert(0, "是");
        this.ddlisenabled.Items.Insert(1, "否");

        if (this.Request.QueryString["op"] != null)
        {

            this.txtop.Value = this.Request.QueryString["op"].ToString();           //新增还是修改

            ////判断当前用户是否有保存的权限
            //HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            //if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
            //{
                this.btn_submit.Visible = true; //保存
            //}
            //else
            //{
            //    this.btn_submit.Visible = false; //保存
            //}

                if (this.Request.QueryString["op"] == "add")
                {
                   HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                   DataTable dt2 = Hyoa_user.Getuser(this.Session["hyuid"].ToString());
                   this.txthy_sqrid.Value = this.Session["hyuid"].ToString();
                   this.txthy_sqrname.Text = dt2.Rows[0]["hy_username"].ToString();
                   this.txtcurdate.Value = System.DateTime.Now.ToString("yyyy-MM-dd");
                   dt2.Clear();
                }

            //旧文档

            if (this.Request.QueryString["op"] == "modify")
            {
                if (this.Request.QueryString["id"] != null)
                {
                    //根据id得到信息
                    this.txtdocid.Value = this.Request.QueryString["id"].ToString();
                    HyoaClass.Hyoa_license Hyoa_license = new HyoaClass.Hyoa_license();
                    DataTable dt = Hyoa_license.Getlicense(this.txtdocid.Value);
                    if (dt.Rows.Count > 0)
                    {
                        this.txthy_sqrid.Value = dt.Rows[0]["hy_sqrid"].ToString();
                        this.txthy_sqrname.Text = dt.Rows[0]["hy_sqrname"].ToString();
                        this.txthy_bsqrid.Value = dt.Rows[0]["hy_bsqrid"].ToString();
                        this.txthy_bsqrname.Value = dt.Rows[0]["hy_bsqrname"].ToString();
                        this.txthy_starttime.Value = Convert.ToDateTime(dt.Rows[0]["hy_starttime"].ToString()).ToString("yyyy-MM-dd");
                        this.txthy_endtime.Value = Convert.ToDateTime(dt.Rows[0]["hy_endtime"].ToString()).ToString("yyyy-MM-dd");
                        if (dt.Rows[0]["hy_isenabled"].ToString() == "是")
                            this.ddlisenabled.SelectedIndex = 0;
                        else
                            this.ddlisenabled.SelectedIndex = 1;
                    }

                    //this.txthy_bsqrname.Enabled = false;
                    //this.txthy_starttime.Enabled = false;
                    //this.txthy_endtime.Enabled = false;
                    this.btnstartdate.Visible = false;
                    this.btnenddate.Visible = false;
                    //this.bt
                    this.btnseluser.Visible = false;
                    dt.Clear();
                }
            }
        }
    }
示例#16
0
 private void hysendxx(string lssendtype, string lstxconent)
 {
     //lssendtype:发送哪几个提醒,字符串的值为:手机短信#即时消息#待办事宜
     //向登记人发:手机短信、即时消息、待办事宜  具体哪个环节发送,写在调用的函数里。 此字段不通用
     string[] lvsendtype;
     lvsendtype = lssendtype.Split('#');
     HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
     for (int k = 0; k < lvsendtype.Length; k++)
     {
         if (lvsendtype[k] == "手机短信")
         {
             HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
             string cb_fsrsjh2 = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString());
             string cb_jsrsjh2 = Hyoa_user.GetMobilebyuserid(this.hy_djrid.Text);
             Hyoa_global.Sendsms_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), cb_fsrsjh2, this.hy_djrid.Text, this.hy_djrname.Text, cb_jsrsjh2, this.hy_mudelid.Text, lstxconent, 1, "", "", 0, this.hy_tableid.Text);
         }
         if (lvsendtype[k] == "即时消息")
         {
             Hyoa_global.Sendjstx_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), this.hy_djrid.Text, this.hy_djrname.Text, this.hy_mudelid.Text, lstxconent, 0, this.hy_tableid.Text);
         }
         if (lvsendtype[k] == "待办事宜")
         {
             Hyoa_global.Senddbsy_global(this.txtdocid.Value, this.hy_djrid.Text, this.hy_djrname.Text, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1", "待办", this.hy_mudelid.Text, "待办箱", "一般", lstxconent, "请办理", 0, this.hy_flowid.Text, this.txtnexttacheid.Value, this.hy_tableid.Text);
         }
     }
 }
    private void DataPlay(int PageNo)
    {
        //判断当前用户是否有新建删除权限
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (Hyoa_global.isHaveRole("Role9990", this.Session["hyuid"].ToString()))
        {
            this.isrole.Value = "1";
            this.tdnewdoc.Visible = true; //新建
            this.tddeldoc.Visible = true; //删除

        }
        else
        {
            this.isrole.Value = "0";
            this.tdnewdoc.Visible = false; //新建
            this.tddeldoc.Visible = false; //删除
        }

        if (this.txtdeptid.Value == "")
            this.tdnewdoc.Visible = false;  //新建

        //得到当前页号
        this.curpage.Text = PageNo.ToString();
        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();

        DataTable dt;
        if (this.hy_name.Value != "")
        {
            if (this.txtdeptid.Value == "")
            {
                dt = Hyoa_user.GetusersbynameforCX(this.hy_name.Value);
            }
            else
            {
                dt = Hyoa_user.GetusersbydeptidforCX(this.txtdeptid.Value, this.hy_name.Value);
            }
        }
        else
        {
            if (this.txtdeptid.Value == "")
            {
                //显示所有用户
                dt = Hyoa_user.GetusersOrderbydeptsortandusersort();
            }
            else
            {
                //按部门ID显示
                dt = Hyoa_user.Getusersbydeptid(this.txtdeptid.Value);
            }
        }

        DataTable tempTable = dt.Clone();
        DataColumn col = new DataColumn("ifjz", typeof(String)); //定义新的一列  是否兼职
        tempTable.Columns.Add(col);  //追加一列  add
        for (int i = (PageNo - 1) * System.Int32.Parse(PageSize.Text); i < PageNo * System.Int32.Parse(PageSize.Text); i++)
        {
            if (i > dt.Rows.Count - 1)
                break;

            DataRow dr = tempTable.NewRow();
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
            }
            if (dt.Rows[i]["hy_loginuid"].ToString() == "")
            {
                dr["ifjz"] = "<font color=red>[兼职信息]</font>";  //将新值赋给相应的列  add
            }
            else
            {
                dr["ifjz"] = "";  //将新值赋给相应的列  add
            }
            tempTable.Rows.Add(dr);
        }

        int TotalRecord = dt.Rows.Count;
        this.sumts.Text = TotalRecord.ToString();
        this.sumts2.Text = TotalRecord.ToString();
        this.ShowTotalRecord.Text = TotalRecord.ToString();
        //计算及显示总页数
        int TotalPage;
        if (TotalRecord < System.Int32.Parse(PageSize.Text))
        {
            TotalPage = 1;
        }
        else
        {
            if (TotalRecord % System.Int32.Parse(PageSize.Text) != 0)
            {
                TotalPage = TotalRecord / System.Int32.Parse(PageSize.Text) + 1;

            }
            else
            {
                TotalPage = TotalRecord / System.Int32.Parse(PageSize.Text);

            }
        }
        this.ShowTotalPage.Text = TotalPage.ToString();
        this.rptlist.DataSource = tempTable;
        this.rptlist.DataBind();
        dt.Clear();
    }
示例#18
0
    protected void btnImport_Click(object sender, EventArgs e)
    {
        String sql;
        sql = "";

        if (this.lblDisplay.Text == "")
        {
            this.lblReturnInformation.Text = "请先保存Excel文件!";
        }
        else
        {

            sql = "";
            sql = " select  姓名,日期,签到时间,签退时间,是否旷工,例外情况,部门  from OpenDataSource('Microsoft.Jet.OLEDB.4.0','Data Source=''" + this.lblDisplay.Text + "'';User ID=admin;Password=;Extended properties=Excel 5.0')...Sheet1$ ";

            HyoaClass.DAO db = new HyoaClass.DAO();
            HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();

            DataTable dt = db.GetDataTable(sql);
            
            HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
            DataTable dtuser;

            for (int j = 0; j < dt.Rows.Count; j++)
            {
                HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
                //文档ID
                Hyoa_flowmain.DOCID = Hyoa_global.GetRandom();
                Hyoa_flowmain.hy_mudelid = "kqgl";
                Hyoa_flowmain.hy_tableid = "74e7e280-4fc5-4ccb-be3d-0f995ac2c934";
                Hyoa_flowmain.hy_flowid = "";
                Hyoa_flowmain.hy_flowname = "";
                Hyoa_flowmain.hy_curtacheid = "";
                Hyoa_flowmain.hy_curtachename = "";
                Hyoa_flowmain.hy_curclrid = "";
                Hyoa_flowmain.hy_curclrname = "";

                dtuser = Hyoa_user.GetusersbynameforCX(dt.Rows[j]["姓名"].ToString());
                if (dtuser.Rows.Count > 0)
                {
                    Hyoa_flowmain.hy_djrid = dtuser.Rows[0]["hy_userid"].ToString();
                    Hyoa_flowmain.hy_djrbmid = dtuser.Rows[0]["hy_deptid"].ToString();
                }
                else
                {
                    Hyoa_flowmain.hy_djrid = "";
                    Hyoa_flowmain.hy_djrbmid = "";
                }
                Hyoa_flowmain.hy_djrname = dt.Rows[j]["姓名"].ToString();                
                Hyoa_flowmain.hy_djrbmname = dt.Rows[j]["部门"].ToString();
                Hyoa_flowmain.hy_djsj = System.DateTime.Now.ToString();

                Hyoa_flowmain.hy_bt = "";
                Hyoa_flowmain.hy_content1 = "";
                Hyoa_flowmain.hy_content2 = "";
                Hyoa_flowmain.hy_content3 = "";
                Hyoa_flowmain.hy_content4 = "";
                Hyoa_flowmain.hy_content5 = "";
                Hyoa_flowmain.hy_content6 = "";
                Hyoa_flowmain.hy_content7 = "";
                Hyoa_flowmain.hy_content8 = "";
                Hyoa_flowmain.hy_content9 = "";
                Hyoa_flowmain.hy_content10 = "";
                Hyoa_flowmain.hy_content11 = "";
                Hyoa_flowmain.hy_content12 = "";
                Hyoa_flowmain.hy_content13 = "";
                Hyoa_flowmain.hy_content14 = "";
                Hyoa_flowmain.hy_content15 = "";

                Hyoa_flowmain.hy_field1 = dt.Rows[j]["签到时间"].ToString();
                Hyoa_flowmain.hy_field2 = dt.Rows[j]["签退时间"].ToString();
                if (dt.Rows[j]["是否旷工"].ToString() == "True")
                {
                    Hyoa_flowmain.hy_field3 = "是";
                }
                else
                {
                    Hyoa_flowmain.hy_field3 = "";
                }

                Hyoa_flowmain.hy_field4 = dt.Rows[j]["例外情况"].ToString();
                Hyoa_flowmain.hy_field5 = "";
                Hyoa_flowmain.hy_field6 = "";
                Hyoa_flowmain.hy_field7 = "";
                Hyoa_flowmain.hy_field8 = "";
                Hyoa_flowmain.hy_field9 = "";
                Hyoa_flowmain.hy_field10 = "";
                Hyoa_flowmain.hy_field11 = "";
                Hyoa_flowmain.hy_field12 = "";
                Hyoa_flowmain.hy_field13 = "";
                Hyoa_flowmain.hy_field14 = "";
                Hyoa_flowmain.hy_field15 = "";
                Hyoa_flowmain.hy_field16 = "";
                Hyoa_flowmain.hy_field17 = "";
                Hyoa_flowmain.hy_field18 = "";
                Hyoa_flowmain.hy_field19 = "";
                Hyoa_flowmain.hy_field20 = "";
                Hyoa_flowmain.hy_field21 = "";
                Hyoa_flowmain.hy_field22 = "";
                Hyoa_flowmain.hy_field23 = "";
                Hyoa_flowmain.hy_field24 = "";
                Hyoa_flowmain.hy_field25 = "";
                Hyoa_flowmain.hy_field26 = "";
                Hyoa_flowmain.hy_field27 = "";
                Hyoa_flowmain.hy_field28 = "";
                Hyoa_flowmain.hy_field29 = "";
                Hyoa_flowmain.hy_field30 = "";
                Hyoa_flowmain.hy_field31 = dt.Rows[j]["日期"].ToString(); ;
                Hyoa_flowmain.hy_field32 = "";
                Hyoa_flowmain.hy_field33 = "";
                Hyoa_flowmain.hy_field34 = "";
                Hyoa_flowmain.hy_field35 = "";
                Hyoa_flowmain.hy_field36 = 0;  
                Hyoa_flowmain.hy_field37 = 0;
                Hyoa_flowmain.hy_field38 = 0;
                Hyoa_flowmain.hy_field39 = 0;
                Hyoa_flowmain.hy_field40 = 0;
                Hyoa_flowmain.hy_field41 = "";
                Hyoa_flowmain.hy_field42 = "";
                Hyoa_flowmain.hy_field43 = "";
                Hyoa_flowmain.hy_field44 = "";
                Hyoa_flowmain.hy_field45 = "";
                Hyoa_flowmain.hy_field46 = "";
                Hyoa_flowmain.hy_field47 = "";
                Hyoa_flowmain.hy_field48 = "";
                Hyoa_flowmain.hy_field49 = "";
                Hyoa_flowmain.hy_field50 = "";
                Hyoa_flowmain.hy_field51 = "";
                Hyoa_flowmain.hy_field52 = "";
                Hyoa_flowmain.hy_field53 = "";
                Hyoa_flowmain.hy_field54 = "";
                Hyoa_flowmain.hy_field55 = "";
                Hyoa_flowmain.hy_field56 = "";
                Hyoa_flowmain.hy_field57 = "";
                Hyoa_flowmain.hy_field58 = "";
                Hyoa_flowmain.hy_field59 = "";
                Hyoa_flowmain.hy_field60 = "";

                Hyoa_flowmain.hy_field61 = "";
                Hyoa_flowmain.hy_field62 = "";
                Hyoa_flowmain.hy_field63 = "";
                Hyoa_flowmain.hy_field64 = "";
                Hyoa_flowmain.hy_field65 = "";
                Hyoa_flowmain.hy_field66 = "";
                Hyoa_flowmain.hy_field67 = "";
                Hyoa_flowmain.hy_field68 = "";
                Hyoa_flowmain.hy_field69 = "";
                Hyoa_flowmain.hy_field70 = "";


                Hyoa_flowmain.hy_field71 = 0;
                Hyoa_flowmain.hy_field72 = 0;
                Hyoa_flowmain.hy_field73 = 0;
                Hyoa_flowmain.hy_field74 = 0;
                Hyoa_flowmain.hy_field75 = 0;
                Hyoa_flowmain.hy_field76 = 0;
                Hyoa_flowmain.hy_field77 = 0;
                Hyoa_flowmain.hy_field78 = 0;
                Hyoa_flowmain.hy_field79 = 0;
                Hyoa_flowmain.hy_field80 = 0;

                Hyoa_flowmain.hy_field81 = 0;
                Hyoa_flowmain.hy_field82 = 0;
                Hyoa_flowmain.hy_field83 = 0;
                Hyoa_flowmain.hy_field84 = 0;
                Hyoa_flowmain.hy_field85 = 0;
                Hyoa_flowmain.hy_field86 = 0;
                Hyoa_flowmain.hy_field87 = 0;
                Hyoa_flowmain.hy_field88 = 0;
                Hyoa_flowmain.hy_field89 = 0;
                Hyoa_flowmain.hy_field90 = 0;

                Hyoa_flowmain.hy_field91 = 0;
                Hyoa_flowmain.hy_field92 = 0;
                Hyoa_flowmain.hy_field93 = 0;
                Hyoa_flowmain.hy_field94 = 0;
                Hyoa_flowmain.hy_field95 = 0;
                Hyoa_flowmain.hy_field96 = 0;
                Hyoa_flowmain.hy_field97 = 0;
                Hyoa_flowmain.hy_field98 = 0;
                Hyoa_flowmain.hy_field99 = 0;
                Hyoa_flowmain.hy_field100 = 0;

                Hyoa_flowmain.hy_iftx = "";
                Hyoa_flowmain.hy_zhtxsj = "";
                Hyoa_flowmain.hy_readuserlist = "";

                Hyoa_flowmain.Insert();
                   
            }
            db.Close();
            this.lblReturnInformation.Text = "导入成功";

            if (File.Exists(this.lblDisplay.Text))
            {
                System.IO.File.Delete(this.lblDisplay.Text);
            }

        }
    }
示例#19
0
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("login.aspx");

        string ls_tip = "保存成功!";

        #region 新建时先进行一次保存
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        string sql = "";
        if (this.txtop.Value == "add")
        {
            //处理特殊字符
            this.hy_bt.Text = ReplaceString_Tszf(this.hy_bt.Text);
            if (Session["conntype"].ToString() == "SQL")
            {
                //edited by xf 20140625
                sql = "insert into hyc_" + this.hy_tableid.Text + " (DOCID,hy_mudelid,hy_tableid,hy_flowid,hy_flowname,hy_curtacheid,hy_curtachename,hy_curclrid,hy_curclrname,hy_djrid,hy_djrname,hy_djrbmid,hy_djrbmname,hy_djsj,hy_bt,hy_readuserlist,hy_readdatelist,hy_clrylist,hy_cyrylist) values (";
                sql += "'" + this.txtdocid.Value + "','" + this.hy_mudelid.Text + "','" + this.hy_tableid.Text + "','" + this.hy_flowid.Text + "','" + this.hy_flowname.Text + "'";
                sql += ",'" + this.hy_curtacheid.Text + "','" + this.hy_curtachename.Text + "','" + this.hy_curclrid.Text + "','" + this.hy_curclrname.Text + "','" + this.hy_djrid.Text + "'";
                sql += ",'" + this.hy_djrname.Text + "','" + this.hy_djrbmid.Text + "','" + this.hy_djrbmname.Text + "','" + this.hy_djsj.Text + "','" + this.hy_bt.Text + "'";
                sql += ",'','','," + Session["hyuid"].ToString() + ",',',') ";
            }
            if (Session["conntype"].ToString() == "ORACLE")
            {
                //edited by xf 20140625
                sql = "insert into hyc_" + this.hy_tableid.Text + " (DOCID,hy_mudelid,hy_tableid,hy_flowid,hy_flowname,hy_curtacheid,hy_curtachename,hy_curclrid,hy_curclrname,hy_djrid,hy_djrname,hy_djrbmid,hy_djrbmname,hy_djsj,hy_bt,hy_readuserlist,hy_readdatelist,hy_clrylist,hy_cyrylist) values (";
                sql += "'" + this.txtdocid.Value + "','" + this.hy_mudelid.Text + "','" + this.hy_tableid.Text + "','" + this.hy_flowid.Text + "','" + this.hy_flowname.Text + "'";
                sql += ",'" + this.hy_curtacheid.Text + "','" + this.hy_curtachename.Text + "','" + this.hy_curclrid.Text + "','" + this.hy_curclrname.Text + "','" + this.hy_djrid.Text + "'";
                sql += ",'" + this.hy_djrname.Text + "','" + this.hy_djrbmid.Text + "','" + this.hy_djrbmname.Text + "',to_date('" + this.hy_djsj.Text + "','YYYY-MM-DD HH24:MI:SS'),'" + this.hy_bt.Text + "'";
                sql += ",'','','," + Session["hyuid"].ToString() + ",',',') ";
            }
            Hyoa_global.ExcuteSQL(sql);

            //插入历史处理表
            Hyoa_global.Saveflowhistoryinfo_cl_global(this.txtdocid.Value, this.hy_flowid.Text, this.hy_flowname.Text, this.hy_curtacheid.Text, this.hy_curtachename.Text, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "", "", "", this.hy_djsj.Text, "");
        }
        #endregion

        //更新内容
        sql = "update hyc_" + this.hy_tableid.Text + " set hy_tableid='" + hy_tableid.Text + "',hy_bt='" + hy_bt.Text + "' ";

        #region 根据“需要保存的字段”来进行保存
        if (txtsavefields.Text != "")
        {
            string[] lv_savefields = txtsavefields.Text.Split(',');
            string[] lv_savefields_sx = txtsavefields_sx.Text.Split(',');
            string fielddocvalue = "";
            for (int i = 0; i < lv_savefields.Length; i++)
            {
                if (lv_savefields_sx[i].ToString() == "0")  //文本
                {
                    if (this.Request.Form[lv_savefields[i].ToString()] != null)
                    {
                        fielddocvalue = this.Request.Form[lv_savefields[i].ToString()].ToString();
                        fielddocvalue = ReplaceString_Tszf(fielddocvalue);
                        sql += ",hyc_" + lv_savefields[i].ToString() + "='" + fielddocvalue + "'";
                    }
                }
                if (lv_savefields_sx[i].ToString() == "1")  //日期
                {
                    if (this.Request.Form[lv_savefields[i].ToString()] != null)
                    {
                        fielddocvalue = this.Request.Form[lv_savefields[i].ToString()].ToString();
                        if (Session["conntype"].ToString() == "SQL")
                        {
                            if (fielddocvalue == "")
                                sql += ",hyc_" + lv_savefields[i].ToString() + "=null";
                            else
                                sql += ",hyc_" + lv_savefields[i].ToString() + "='" + fielddocvalue + "'";
                        }
                        if (Session["conntype"].ToString() == "ORACLE")
                        {
                            if (fielddocvalue == "")
                                sql += ",hyc_" + lv_savefields[i].ToString() + "=null";
                            else
                                sql += ",hyc_" + lv_savefields[i].ToString() + "=to_date('" + fielddocvalue + "','YYYY-MM-DD HH24:MI:SS')";
                        }
                    }
                }
                if (lv_savefields_sx[i].ToString() == "3")  //数值
                {
                    if (this.Request.Form[lv_savefields[i].ToString()] != null)
                    {
                        fielddocvalue = this.Request.Form[lv_savefields[i].ToString()].ToString();
                        if (fielddocvalue == "")
                            sql += ",hyc_" + lv_savefields[i].ToString() + "=0";
                        else
                            sql += ",hyc_" + lv_savefields[i].ToString() + "=" + fielddocvalue;
                    }
                }
                if (lv_savefields_sx[i].ToString() == "5")  //口令
                {
                    if (this.Request.Form[lv_savefields[i].ToString()] != null)
                    {
                        fielddocvalue = this.Request.Form[lv_savefields[i].ToString()].ToString();
                        fielddocvalue = ReplaceString_Tszf(fielddocvalue);
                        sql += ",hyc_" + lv_savefields[i].ToString() + "='" + fielddocvalue + "'";
                    }
                }
                if (lv_savefields_sx[i].ToString() == "6")  //编辑器
                {
                    if (this.Request.Form[lv_savefields[i].ToString()] != null)
                    {
                        fielddocvalue = this.Request.Form[lv_savefields[i].ToString()].ToString();
                        fielddocvalue = ReplaceString_Tszf(fielddocvalue);
                        sql += ",hyc_" + lv_savefields[i].ToString() + "='" + fielddocvalue + "'";
                    }
                }
                if (lv_savefields_sx[i].ToString() == "7")  //复选框
                {
                    string s = "";
                    CheckBoxList txfs = (CheckBoxList)this.FindControl(lv_savefields[i].ToString());
                    foreach (ListItem li in txfs.Items)
                    {
                        if (li.Selected)
                        {
                            if (li.Selected) s += li.Value + ",";
                        }
                    }
                    s = s.TrimEnd(',');
                    s = ReplaceString_Tszf(s);
                    sql += ",hyc_" + lv_savefields[i].ToString() + "='" + s + "'";
                }
                if (lv_savefields_sx[i].ToString() == "8")  //单选框
                {
                    string s = "";
                    RadioButtonList txfs = (RadioButtonList)this.FindControl(lv_savefields[i].ToString());
                    foreach (ListItem li in txfs.Items)
                    {
                        if (li.Selected)
                        {
                            if (li.Selected) s += li.Value + ",";
                        }
                    }
                    s = s.TrimEnd(',');
                    s = ReplaceString_Tszf(s);
                    sql += ",hyc_" + lv_savefields[i].ToString() + "='" + s + "'";
                }
                if (lv_savefields_sx[i].ToString() == "9")  //意见
                {
                    if (this.Request.Form[lv_savefields[i].ToString()] != null)
                    {
                        fielddocvalue = this.Request.Form[lv_savefields[i].ToString()].ToString();
                        fielddocvalue = ReplaceString_Tszf(fielddocvalue);
                        if (fielddocvalue != "")
                        {
                            HyoaClass.Hyoa_yj Hyoa_yj = new HyoaClass.Hyoa_yj();
                            Hyoa_yj.yjid = Hyoa_global.GetRandom();
                            Hyoa_yj.hy_tableid = this.hy_tableid.Text;
                            Hyoa_yj.hy_fatherid = this.txtdocid.Value;
                            Hyoa_yj.hy_fieldid = lv_savefields[i].ToString();
                            Hyoa_yj.hy_yjuserid = Session["hyuid"].ToString();
                            Hyoa_yj.hy_yjusername = Session["hyuname"].ToString();
                            Hyoa_yj.hy_yjdeptid = Session["hydeptid"].ToString();
                            Hyoa_yj.hy_yjdeptname = Session["hydeptname"].ToString();
                            Hyoa_yj.hy_yjtime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                            Hyoa_yj.hy_yjbody = fielddocvalue;
                            Hyoa_yj.hy_yjip = HttpContext.Current.Request.UserHostAddress;
                            Hyoa_yj.hy_yjifshow = "";
                            Hyoa_yj.Insert();
                        }
                    }
                }
            }
        }
        #endregion

        #region 保存
        if (this.txtwhichoperation.Value == "1")
        {
            sql += hylcbctscl();  //特殊处理
        }
        #endregion

        #region 提交
        if (this.txtwhichoperation.Value == "2")
        {
            //更新主文档
            sql += ",hy_curtacheid='" + this.txtnexttacheid.Value + "'";
            sql += ",hy_curtachename='" + this.txtnexttachename.Value + "'";
            sql += ",hy_curclrid='" + this.txtnextclrid.Value + "'";
            sql += ",hy_curclrname='" + this.txtnextclrname.Value + "'";

            //---- 添加当前环节的处理时间 ---- start
            HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
            DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocidtacheid(this.txtdocid.Value, this.hy_curtacheid.Text);
            if (dt_clinfo.Rows.Count > 0)
            {
                string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString();                //当前处理的记录ID
                Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc;
                if (dt_clinfo.Rows[0]["hy_clsj"].ToString() == "")
                {
                    Hyoa_flowhistoryinfo_cl.hy_clsj = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                }
                else
                {
                    Hyoa_flowhistoryinfo_cl.hy_clsj = dt_clinfo.Rows[0]["hy_clsj"].ToString() + "," + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                }
                Hyoa_flowhistoryinfo_cl.Update();
            }
            //---- 添加当前环节的处理时间 ---- end

            ////////////////////如果后续环节选择了“结束”,则不需要发待办事宜和短消息 start//////////////////////
            HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
            if (this.txtnexttacheid.Value != "**")
            {
                //---  创建后续处理的处理记录+建立处理人待办事宜 ---- start
                Hyoa_global.Saveflowhistoryinfo_cl_global(this.txtdocid.Value, this.hy_flowid.Text, this.hy_flowname.Text, this.txtnexttacheid.Value, this.txtnexttachename.Value, this.txtnextclrid.Value, this.txtnextclrname.Value, "", this.txtnextcyrid.Value, this.txtnextcyrname.Value, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "");

                //待办事宜、短信、即时消息
                string[] lv_dbrid = this.txtnextclrid.Value.Split(new Char[] { ',' });
                string[] lv_dbrname = this.txtnextclrname.Value.Split(new Char[] { ',' });
                for (var i = 0; i < lv_dbrid.Length; i++)
                {
                    if (lv_dbrid[i].ToString() != "")
                    {
                        //得到当前用户手机号
                        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                        string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString());
                        //得到后续处理人手机号
                        string cb_jsrsjh = Hyoa_user.GetMobilebyuserid(lv_dbrid[i].ToString());

                        //给后续处理人发送一个新的待办事宜(提醒)
                        Hyoa_global.Senddbsy_global(this.txtdocid.Value, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1", "待办", this.hy_mudelid.Text, "待办箱", "一般", this.hy_bt.Text, "请办理", 0, this.hy_flowid.Text, this.txtnexttacheid.Value, this.hy_tableid.Text);
                        //给后续处理人发送即时消息(提醒)
                        if (this.txtisSendjstx_clr.Value == "1")
                        {
                            Hyoa_global.Sendjstx_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), this.hy_mudelid.Text, this.hy_bt.Text, 0, this.hy_tableid.Text);
                        }
                        //给后续处理人发送短信(提醒)
                        if (this.txtisSendsms_clr.Value == "1")
                        {
                            Hyoa_global.Sendsms_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), cb_fsrsjh, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_jsrsjh, this.hy_mudelid.Text, this.hy_bt.Text, 1, "", "", 0, this.hy_tableid.Text);
                        }
                    }

                }
                //--- 创建后续处理的处理记录+建立处理人待办事宜 ---- end

                //--- 创建后续传阅记录+建立待办事宜 ---- start
                string[] lv_cyrid = this.txtnextcyrid.Value.Split(new Char[] { ',' });
                string[] lv_cyrname = this.txtnextcyrname.Value.Split(new Char[] { ',' });
                for (var i = 0; i < lv_cyrid.Length; i++)
                {
                    if (lv_cyrid[i].ToString() != "")
                    {
                        //建立传阅数据
                        Hyoa_global.Saveflowhistoryinfo_cy_global(this.txtdocid.Value, this.hy_flowid.Text, this.hy_flowname.Text, this.txtnexttacheid.Value, this.txtnexttachename.Value, lv_cyrid[i].ToString(), lv_cyrname[i].ToString(), "", System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));

                        //待办事宜、短信、即时消息
                        //得到当前用户手机号
                        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                        string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString());
                        //得到后续传阅人手机号
                        string cb_cyrsjh = Hyoa_user.GetMobilebyuserid(lv_cyrid[i].ToString());

                        //给后续处理人发送一个新的待办事宜(提醒)
                        Hyoa_global.Senddbsy_global(this.txtdocid.Value, lv_cyrid[i].ToString(), lv_cyrname[i].ToString(), this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1", "待阅", this.hy_mudelid.Text, "待办箱", "一般", this.hy_bt.Text, "请阅读", 0, this.hy_flowid.Text, this.txtnexttacheid.Value, this.hy_tableid.Text);
                        //给后续处理人发送即时消息(提醒)
                        if (this.txtisSendjstx_cyr.Value == "1")
                        {
                            Hyoa_global.Sendjstx_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), lv_cyrid[i].ToString(), lv_cyrname[i].ToString(), this.hy_mudelid.Text, this.hy_bt.Text, 0, this.hy_tableid.Text);
                        }
                        //给后续处理人发送短信(提醒)
                        if (this.txtisSendsms_cyr.Value == "1")
                        {
                            Hyoa_global.Sendsms_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), cb_fsrsjh, lv_cyrid[i].ToString(), lv_cyrname[i].ToString(), cb_cyrsjh, this.hy_mudelid.Text, this.hy_bt.Text, 1, "", "", 0, this.hy_tableid.Text);
                        }

                    }
                }
                //--- 创建后续传阅记录+建立待办事宜 ---- end
            }
            ////////////////////如果后续环节选择了“结束”,则不需要发待办事宜和短消息 start//////////////////////

            //--- 当前处理人的待办事宜转已办 ---- start
            Hyoa_dbsy.Dbsytoybbydocidtacheiduserid(this.txtdocid.Value, this.hy_curtacheid.Text, this.Session["hyuid"].ToString());
            //--- 当前处理人的待办事宜转已办 ---- end
            ls_tip = "文档已成功发送到[" + this.txtnexttachename.Value + "]环节";
            sql += hylcclcylist();  //更新hy_clrylist hy_cyrylist edited by xf 20140625
            sql += hylctjtscl();//特殊处理

            //调用添加客户名称的方法
            if (this.hy_mudelid.Text == "MudelVODfwxy" && this.hy_tableid.Text == "TableVODfwxy" || this.hy_mudelid.Text == "Mudelffpdfwht" && this.hy_tableid.Text == "Tableffpdfwht"
             || this.hy_mudelid.Text == "Mudeljdhazfwht" && this.hy_tableid.Text == "Tablejdhazfwht" || this.hy_mudelid.Text == "Mudelsyyhfwxy" && this.hy_tableid.Text == "Tablesyyhfwxy"
             || this.hy_mudelid.Text == "MudelDVBazfwdght" && this.hy_tableid.Text == "TableDVBazfwdght" || this.hy_mudelid.Text == "MudelDVBazfwdght" && this.hy_tableid.Text == "TableDVBazfwdght"
             || this.hy_mudelid.Text == "Mudeljwdsjsxy" && this.hy_tableid.Text == "Tablejwdsjsxy" || this.hy_mudelid.Text == "Mudeljwdscsxy" && this.hy_tableid.Text == "Tablejwdscsxy"
             || this.hy_mudelid.Text == "Mudelkdjrht" && this.hy_tableid.Text == "Tablekdjrht" || this.hy_mudelid.Text == "Mudelsjcsfwht" && this.hy_tableid.Text == "Tablesjcsfwht"
             || this.hy_mudelid.Text == "Mudelsjgdcsfwht" && this.hy_tableid.Text == "Tablesjgdcsfwht" || this.hy_mudelid.Text == "Mudelsjtxyyhzxy" && this.hy_tableid.Text == "Tablesjtxyyhzxy"
             || this.hy_mudelid.Text == "Mudelzdyht" && this.hy_tableid.Text == "Tablezdyht")
            {
                if (this.txtop.Value == "add")
                {
                    Khdaxx();
                }
            }
        }
        #endregion

        #region 收回
        if (this.txtwhichoperation.Value == "3")
        {
            //得到上个环节处理人
            HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
            DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value);
            if (dt_clinfo.Rows.Count > 1)
            {
                //删除当前处理人员的待办事宜
                HyoaClass.Hyoa_dbsy Hyoa_dbsy_sh = new HyoaClass.Hyoa_dbsy();
                //edited by xf 20140625
                string[] lv_temp = dt_clinfo.Rows[0]["hy_clrid"].ToString().Split(',');
                for (int xf = 0; xf < lv_temp.Length; xf++)
                {
                    Hyoa_dbsy_sh.DeleteByDocid_flowid_tacheid_userid(this.txtdocid.Value, dt_clinfo.Rows[0]["hy_flowid"].ToString(), dt_clinfo.Rows[0]["hy_tacheid"].ToString(), lv_temp[xf]);
                }

                string ls_lastclrid = dt_clinfo.Rows[1]["hy_clrid"].ToString();         //上个环节处理人ID
                string ls_lastclrname = dt_clinfo.Rows[1]["hy_clrname"].ToString();     //上个环节处理人中文名
                string ls_lastcldoc = dt_clinfo.Rows[1]["ID"].ToString();               //上个环节处理的记录ID
                string ls_lasttacheid = dt_clinfo.Rows[1]["hy_tacheid"].ToString();     //上个环节处理环节ID
                string ls_lasttachename = dt_clinfo.Rows[1]["hy_tachename"].ToString(); //上个环节处理环节名称
                string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString();                //当前处理的记录ID
                dt_clinfo.Clear();

                //删除当前处理的记录
                Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc;
                Hyoa_flowhistoryinfo_cl.Delete();
                //清空上个环节处理时间,更新创建时间
                Hyoa_flowhistoryinfo_cl.ID = ls_lastcldoc;
                Hyoa_flowhistoryinfo_cl.hy_clsj = "";
                Hyoa_flowhistoryinfo_cl.hy_createtime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                Hyoa_flowhistoryinfo_cl.Update_sh();
                //更新主文档中的当前环节ID、当前环节名称、当前处理人ID和中文名
                sql += ",hy_curtacheid='" + ls_lasttacheid + "'";
                sql += ",hy_curtachename='" + ls_lasttachename + "'";
                sql += ",hy_curclrid='" + ls_lastclrid + "'";
                sql += ",hy_curclrname='" + ls_lastclrname + "'";
                ls_tip = "文档已成功收回到[" + ls_lasttachename + "]环节";
                sql += hylcclcylist();  //更新hy_clrylist hy_cyrylist edited by xf 20140625
                sql += hylcshtscl();//特殊处理
            }
        }
        #endregion

        #region 退回
        if (this.txtwhichoperation.Value == "4")
        {
            //更新主文档
            sql += ",hy_curtacheid='" + this.txtnexttacheid.Value + "'";
            sql += ",hy_curtachename='" + this.txtnexttachename.Value + "'";
            sql += ",hy_curclrid='" + this.txtnextclrid.Value + "'";
            sql += ",hy_curclrname='" + this.txtnextclrname.Value + "'";

            //处理历史处理记录
            HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
            DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value);
            if (dt_clinfo.Rows.Count > 0)
            {
                string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString();                //当前处理的记录ID
                string ls_clsj = "";                                                    //当前处理的记录处理时间
                if (dt_clinfo.Rows[0]["hy_clsj"].ToString() == "")
                    ls_clsj = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                else
                    ls_clsj = dt_clinfo.Rows[0]["hy_clsj"].ToString() + "," + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

                dt_clinfo.Clear();
                Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc;
                Hyoa_flowhistoryinfo_cl.hy_clsj = ls_clsj;
                Hyoa_flowhistoryinfo_cl.Update();
            }
            //新建一条处理记录
            Hyoa_global.Saveflowhistoryinfo_cl_global(this.txtdocid.Value, this.hy_flowid.Text, this.hy_flowname.Text, this.txtnexttacheid.Value, this.txtnexttachename.Value, this.txtnextclrid.Value, this.txtnextclrname.Value, "", "", "", System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "是");

            //处理待办事宜
            //转已办-当前处理人的待办事宜
            HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
            Hyoa_dbsy.Dbsytoybbydociduserid(this.txtdocid.Value, this.Session["hyuid"].ToString());

            //得到发送人手机号
            HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
            string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString());

            //(考虑多人的情况)
            string[] lv_dbrid = this.txtnextclrid.Value.Split(new Char[] { ',' });
            string[] lv_dbrname = this.txtnextclrname.Value.Split(new Char[] { ',' });

            for (var i = 0; i < lv_dbrid.Length; i++)
            {
                if (lv_dbrid[i].ToString() != "")
                {
                    //得到接收人手机号
                    string cb_jsrsjh = Hyoa_user.GetMobilebyuserid(lv_dbrid[i].ToString());
                    HyoaClass.Hyoa_global Hyoa_global2 = new HyoaClass.Hyoa_global();

                    //给退回到的处理人发送一个新的待办事宜(提醒)
                    Hyoa_global2.Senddbsy_global(this.txtdocid.Value, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1", "待办", this.hy_mudelid.Text, "待办箱", "一般", this.hy_bt.Text, "请办理", 0, this.hy_flowid.Text, this.txtnexttacheid.Value, this.hy_tableid.Text);
                    //给退回到的处理人发送即时消息(提醒)
                    if (this.txtisSendjstx.Value == "1")
                    {
                        Hyoa_global.Sendjstx_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), this.hy_mudelid.Text, this.hy_bt.Text, 0, this.hy_tableid.Text);
                    }
                    //给退回到的处理人发送短信(提醒)
                    if (this.txtisSendsms.Value == "1")
                    {
                        Hyoa_global.Sendsms_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), cb_fsrsjh, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_jsrsjh, this.hy_mudelid.Text, this.hy_bt.Text, 1, "", "", 0, this.hy_tableid.Text);
                    }
                }
            }
            ls_tip = "已成功退回到[" + this.txtnexttachename.Value + "]环节";
            sql += hylcthtscl();//特殊处理
        }
        #endregion

        #region 多人处理
        if (this.txtwhichoperation.Value == "5")
        {
            //更新主文档
            string ls_newclrid = Hyoa_global.MoveOneString_dh(this.hy_curclrid.Text, this.Session["hyuid"].ToString());
            string ls_newclrname = Hyoa_global.MoveOneString_dh(this.hy_curclrname.Text, this.Session["hyuname"].ToString());
            sql += ",hy_curclrid='" + ls_newclrid + "'";
            sql += ",hy_curclrname='" + ls_newclrname + "'";
            //处理当前记录
            HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
            DataTable dt_clinfo = new DataTable();
            dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value);
            if (dt_clinfo.Rows.Count > 0)
            {
                string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString();                //当前处理的记录ID
                string ls_clsj = "";                                                    //当前处理的记录处理时间
                if (dt_clinfo.Rows[0]["hy_clsj"].ToString() == "")
                    ls_clsj = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                else
                    ls_clsj = dt_clinfo.Rows[0]["hy_clsj"].ToString() + "," + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

                dt_clinfo.Clear();
                Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc;
                Hyoa_flowhistoryinfo_cl.hy_clsj = ls_clsj;
                Hyoa_flowhistoryinfo_cl.Update();
            }
            //处理待办事宜
            //转已办-当前处理人的待办事宜
            HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
            Hyoa_dbsy.Dbsytoybbydociduserid(this.txtdocid.Value, this.Session["hyuid"].ToString());
            ls_tip = "提交成功,当前环节还需要[" + ls_newclrname + "]进行办理";
            sql += hylcdrcltscl();//特殊处理
        }
        #endregion

        #region 催办
        if (this.txtwhichoperation.Value == "6")
        {
            string cb_docid = this.txtdocid.Value;
            string cb_dbrid = this.hy_curclrid.Text;
            string cb_dbrname = this.hy_curclrname.Text;
            string cb_fsrid = this.Session["hyuid"].ToString();
            string cb_fsrname = this.Session["hyuname"].ToString();
            string cb_url = "main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1";
            string cb_property = "催办";
            string cb_mudelid = this.hy_mudelid.Text;
            string cb_foldername = "待办箱";
            string cb_hj = "一般";
            string cb_bt = this.txtcbideas.Value + "-" + this.hy_bt.Text;
            string cb_subbt = "请阅读";
            float cb_ifyb = 0;
            string cb_flowid = this.hy_flowid.Text;
            string cb_tacheid = this.hy_curtacheid.Text;
            string cb_from = this.hy_mudelid.Text;

            //得到发送人手机号
            HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
            string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(cb_fsrid);
            //得到接收人手机号
            string cb_jsrsjh = Hyoa_user.GetMobilebyuserid(cb_dbrid);

            //给当前处理人发送一个新的待办事宜(提醒)
            Hyoa_global.Senddbsy_global(cb_docid, cb_dbrid, cb_dbrname, cb_fsrid, cb_fsrname, cb_url, cb_property, cb_mudelid, cb_foldername, cb_hj, cb_bt, cb_subbt, cb_ifyb, cb_flowid, cb_tacheid, this.hy_tableid.Text);
            //给当前处理人发送即时消息(提醒)
            if (this.txtisSendjstx.Value == "1")
            {
                Hyoa_global.Sendjstx_global(cb_docid, cb_fsrid, cb_fsrname, cb_dbrid, cb_dbrname, cb_from, cb_bt, 0, this.hy_tableid.Text);
            }
            //给当前处理人发送短信(提醒)
            if (this.txtisSendsms.Value == "1")
            {
                Hyoa_global.Sendsms_global(cb_docid, cb_fsrid, cb_fsrname, cb_fsrsjh, cb_dbrid, cb_dbrname, cb_jsrsjh, cb_from, cb_bt, 1, "", "", 0, this.hy_tableid.Text);
            }

            ls_tip = "催办成功!";
            sql += hylccbtscl();//特殊处理
        }
        #endregion

        #region 流程结束时的提交
        if (this.txtwhichoperation.Value == "7")
        {
            //更新主文档
            sql += ",hy_curtacheid='**'";
            sql += ",hy_curtachename='结束'";
            sql += ",hy_curclrid=''";
            sql += ",hy_curclrname=''";
            //更新处理表
            HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
            DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value);
            if (dt_clinfo.Rows.Count > 0)
            {
                string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString();                //当前处理的记录ID
                string ls_clsj = "";                                                    //当前处理的记录处理时间
                if (dt_clinfo.Rows[0]["hy_clsj"].ToString() == "")
                    ls_clsj = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                else
                    ls_clsj = dt_clinfo.Rows[0]["hy_clsj"].ToString() + "," + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

                dt_clinfo.Clear();
                Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc;
                Hyoa_flowhistoryinfo_cl.hy_clsj = ls_clsj;
                Hyoa_flowhistoryinfo_cl.Update();

                //开票流程中开票在流程结束时付款处理。
                if (this.hy_tableid.Text == "Tablefpbd")
                {
                    htfk();
                }
            }
            ////流程结束时删除所有该文档对应的待办事宜
            //HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
            //Hyoa_dbsy.Deletebydocid(this.txtdocid.Value);

            //处理待办事宜
            //转已办-当前处理人的待办事宜
            HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
            Hyoa_dbsy.Dbsytoybbydociduserid(this.txtdocid.Value, this.Session["hyuid"].ToString());

            ls_tip = "流程结束!";
            sql += hylcjstscl();//特殊处理
        }

        #endregion

        #region 收文阅件分发
        if (this.txtwhichoperation.Value == "8")
        {
            string cb_docid = this.txtdocid.Value;
            string cb_dbrid = this.hy_curclrid.Text;
            string cb_dbrname = this.hy_curclrname.Text;
            string cb_fsrid = this.Session["hyuid"].ToString();
            string cb_fsrname = this.Session["hyuname"].ToString();
            string cb_url = "main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1";
            string cb_property = "待阅";
            string cb_mudelid = this.hy_mudelid.Text;
            string cb_foldername = "待办箱";
            string cb_hj = "一般";
            string cb_bt = this.hy_bt.Text;
            string cb_subbt = "请阅读";
            float cb_ifyb = 0;
            string cb_flowid = this.hy_flowid.Text;
            string cb_tacheid = this.hy_curtacheid.Text;
            string cb_from = this.hy_mudelid.Text;

            string[] lv_dbrid = this.txtswly_dbsy_userids.Text.Split(new Char[] { '+' });
            string[] lv_dbrname = this.txtswly_dbsy_usernames.Text.Split(new Char[] { '+' });
            for (var i = 0; i < lv_dbrid.Length; i++)
            {
                if (lv_dbrid[i].ToString() != "")
                {
                    //得到当前用户手机号
                    HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                    string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString());
                    //得到后续处理人手机号
                    string cb_jsrsjh = Hyoa_user.GetMobilebyuserid(lv_dbrid[i].ToString());

                    //给后续处理人发送一个新的待办事宜(提醒)
                    Hyoa_global.Senddbsy_global(cb_docid, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_fsrid, cb_fsrname, cb_url, cb_property, cb_mudelid, cb_foldername, cb_hj, cb_bt, cb_subbt, 0, cb_flowid, cb_tacheid, this.hy_tableid.Text);
                    //给后续处理人发送即时消息(提醒)
                    Hyoa_global.Sendjstx_global(cb_docid, cb_fsrid, cb_fsrname, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_mudelid, cb_bt, 0, this.hy_tableid.Text);
                    //给后续处理人发送短信(提醒)
                    Hyoa_global.Sendsms_global(cb_docid, cb_fsrid, cb_fsrname, cb_fsrsjh, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_jsrsjh, cb_mudelid, cb_bt, 1, "", "", 0, this.hy_tableid.Text);

                    //在hyp_flowhistoryinfo_cy中添加传阅信息
                    string sql_cy = "select * from hyp_flowhistoryinfo_cy where DOCID='" + this.txtdocid.Value + "' and hy_cyrid='" + lv_dbrid[i] + "' order by hy_createtime DESC ";
                    DataTable dt_cy = Hyoa_global.GetDataTable(sql_cy);
                    if (dt_cy.Rows.Count > 0)
                    {
                    }
                    else
                    {
                        HyoaClass.Hyoa_flowhistoryinfo_cy Hyoa_flowhistoryinfo_cy = new HyoaClass.Hyoa_flowhistoryinfo_cy();
                        Hyoa_flowhistoryinfo_cy.ID = Hyoa_global.GetRandom();
                        Hyoa_flowhistoryinfo_cy.DOCID = this.txtdocid.Value;
                        Hyoa_flowhistoryinfo_cy.hy_flowid = this.hy_flowid.Text;
                        Hyoa_flowhistoryinfo_cy.hy_flowname = this.hy_flowname.Text;
                        Hyoa_flowhistoryinfo_cy.hy_tacheid = this.hy_curtacheid.Text;
                        Hyoa_flowhistoryinfo_cy.hy_tachename = this.hy_curtachename.Text;
                        Hyoa_flowhistoryinfo_cy.hy_cyrid = lv_dbrid[i];
                        Hyoa_flowhistoryinfo_cy.hy_cyrname = lv_dbrname[i];
                        Hyoa_flowhistoryinfo_cy.hy_ydsj = "";
                        Hyoa_flowhistoryinfo_cy.hy_createtime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                        Hyoa_flowhistoryinfo_cy.Insert();
                    }
                }
            }
            //在当前环节处理的记录中添加传阅信息,主要用于列表的显示控制
            string sql_cl = "select * from hyp_flowhistoryinfo_cl where DOCID='" + this.txtdocid.Value + "' order by hy_createtime DESC ";
            DataTable dt_cl = Hyoa_global.GetDataTable(sql_cl);
            if (dt_cl.Rows.Count > 0)
            {
                if (dt_cl.Rows[0]["hy_cyrid"].ToString() == "")
                {
                    sql_cl = "update hyp_flowhistoryinfo_cl set hy_cyrid='" + this.txtswly_dbsy_userids.Text.Replace("+", ",") + "',hy_cyrname='" + this.txtswly_dbsy_usernames.Text.Replace("+", ",") + "' where ID='" + dt_cl.Rows[0]["ID"].ToString() + "'";
                    Hyoa_global.ExcuteSQL(sql_cl);
                }
                else
                {
                    if (Session["conntype"].ToString() == "SQL")
                    {
                        sql_cl = "update hyp_flowhistoryinfo_cl set hy_cyrid=hy_cyrid+'," + this.txtswly_dbsy_userids.Text.Replace("+", ",") + "',hy_cyrname=hy_cyrname+'," + this.txtswly_dbsy_usernames.Text.Replace("+", ",") + "' where ID='" + dt_cl.Rows[0]["ID"].ToString() + "'";
                    }
                    if (Session["conntype"].ToString() == "ORACLE")
                    {
                        sql_cl = "update hyp_flowhistoryinfo_cl set hy_cyrid=CONCAT(hy_cyrid,'," + this.txtswly_dbsy_userids.Text.Replace("+", ",") + "'),hy_cyrname=CONCAT(hy_cyrname,'," + this.txtswly_dbsy_usernames.Text.Replace("+", ",") + ")' where ID='" + dt_cl.Rows[0]["ID"].ToString() + "'";
                    }
                    Hyoa_global.ExcuteSQL(sql_cl);
                }
            }
            ls_tip = "阅件分发成功!";
            sql += hylcclcylist();  //更新hy_clrylist hy_cyrylist edited by xf 20140625
        }
        #endregion

        //20140809 hjadd start
        #region 收发文分发
        if (this.txtwhichoperation.Value == "11")
        {
            string cb_docid = this.txtdocid.Value;
            string cb_dbrid = this.hy_curclrid.Text;
            string cb_dbrname = this.hy_curclrname.Text;
            string cb_fsrid = this.Session["hyuid"].ToString();
            string cb_fsrname = this.Session["hyuname"].ToString();
            string cb_url = "main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1";
            string cb_property = "待阅";
            string cb_mudelid = this.hy_mudelid.Text;
            string cb_foldername = "待办箱";
            string cb_hj = "一般";
            string cb_bt = this.hy_bt.Text;
            string cb_subbt = "请阅读";
            float cb_ifyb = 0;
            string cb_flowid = this.hy_flowid.Text;
            string cb_tacheid = this.hy_curtacheid.Text;
            string cb_from = this.hy_mudelid.Text;

            string[] lv_dbrid = this.txtffly_dbsy_userids.Text.Split(new Char[] { '+' });
            string[] lv_dbrname = this.txtffly_dbsy_usernames.Text.Split(new Char[] { '+' });
            for (var i = 0; i < lv_dbrid.Length; i++)
            {
                if (lv_dbrid[i].ToString() != "")
                {
                    //得到当前用户手机号
                    HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                    string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString());
                    //得到后续处理人手机号
                    string cb_jsrsjh = Hyoa_user.GetMobilebyuserid(lv_dbrid[i].ToString());

                    //给后续处理人发送一个新的待办事宜(提醒)
                    Hyoa_global.Senddbsy_global(cb_docid, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_fsrid, cb_fsrname, cb_url, cb_property, cb_mudelid, cb_foldername, cb_hj, cb_bt, cb_subbt, 0, cb_flowid, cb_tacheid, this.hy_tableid.Text);
                    //给后续处理人发送即时消息(提醒)
                    Hyoa_global.Sendjstx_global(cb_docid, cb_fsrid, cb_fsrname, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_mudelid, cb_bt, 0, this.hy_tableid.Text);
                    //给后续处理人发送短信(提醒)
                    Hyoa_global.Sendsms_global(cb_docid, cb_fsrid, cb_fsrname, cb_fsrsjh, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_jsrsjh, cb_mudelid, cb_bt, 1, "", "", 0, this.hy_tableid.Text);

                    //在hyp_flowhistoryinfo_cy中添加传阅信息
                    string sql_cy = "select * from hyp_flowhistoryinfo_cy where DOCID='" + this.txtdocid.Value + "' and hy_cyrid='" + lv_dbrid[i] + "' order by hy_createtime DESC ";
                    DataTable dt_cy = Hyoa_global.GetDataTable(sql_cy);
                    if (dt_cy.Rows.Count > 0)
                    {
                    }
                    else
                    {
                        HyoaClass.Hyoa_flowhistoryinfo_cy Hyoa_flowhistoryinfo_cy = new HyoaClass.Hyoa_flowhistoryinfo_cy();
                        Hyoa_flowhistoryinfo_cy.ID = Hyoa_global.GetRandom();
                        Hyoa_flowhistoryinfo_cy.DOCID = this.txtdocid.Value;
                        Hyoa_flowhistoryinfo_cy.hy_flowid = this.hy_flowid.Text;
                        Hyoa_flowhistoryinfo_cy.hy_flowname = this.hy_flowname.Text;
                        Hyoa_flowhistoryinfo_cy.hy_tacheid = this.hy_curtacheid.Text;
                        Hyoa_flowhistoryinfo_cy.hy_tachename = this.hy_curtachename.Text;
                        Hyoa_flowhistoryinfo_cy.hy_cyrid = lv_dbrid[i];
                        Hyoa_flowhistoryinfo_cy.hy_cyrname = lv_dbrname[i];
                        Hyoa_flowhistoryinfo_cy.hy_ydsj = "";
                        Hyoa_flowhistoryinfo_cy.hy_createtime = System.DateTime.Now.ToString();
                        Hyoa_flowhistoryinfo_cy.Insert();
                    }
                }
            }

            ls_tip = "分发成功!";
        }
        #endregion
        //20140809 hj add end

        #region 在主表单内嵌列表的功能中,保存、提交和确认子表单时,需要将父文档的DOCID保存到当前记录的hy_motherid中
        //ADD BY XF 2011-11-17
        if (this.txtwhichoperation.Value == "1" || this.txtwhichoperation.Value == "2" || this.txtwhichoperation.Value == "111")
        {
            if (Request.QueryString["op"] != null)
            {
                if (Request.QueryString["op"].ToString() != "")
                {
                    if (Request.QueryString["motherid"] != null)
                    {
                        if (Request.QueryString["motherid"].ToString() != "")
                        {
                            sql += ",hy_motherid='" + Request.QueryString["motherid"].ToString() + "'";
                        }
                    }
                }
            }
        }
        #endregion

        sql += " where DOCID='" + this.txtdocid.Value + "'";
        Hyoa_global.ExcuteSQL(sql);

        #region 处理完成后的提示及跳转(增加刷新附件功能)
        if (this.txtifsxfj.Text == "1")
        {
            Response.Write("<script>window.location='main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&url=" + this.txturl.Value + "'</script>");
        }
        else
        {

            if (this.txturl.Value == "2")
            {

                Response.Write("<script>alert('" + ls_tip + "');try{window.opener.location.reload();}catch(err){}self.close();parent.location.reload();</script>");
            }
            else
                if (this.txtifpop.Value == "")
            {
                if (this.hy_tableid.Text == "Tablefpbd")
                {
                    Response.Write("<script>alert('" + ls_tip + "');window.location='list_myadd.aspx?mid=Mudelfp&tableid=Tablefpbd&listid=6b07b57d-2906-4f5b-bc47-a8c7754ea5bf&rnd=afc25663-de8a-43ba-bc48-db224b3e5c92'</script>");
                }
                else
                {
                    Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
                }
            }
            else
            {
                Response.Write("<script>alert('" + ls_tip + "');try{window.opener.location.reload();}catch(err){}self.close();</script>");
            }
        }
        #endregion
    }
示例#20
0
    private void DataPlay()
    {
        if (this.Request.QueryString["op"] != null)
        {
            this.txtop.Value = this.Request.QueryString["op"].ToString();           //新增还是修改

            //判断当前用户是否有保存的权限
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
            {
                this.btn_submit.Visible = true; //保存
            }
            else
            {
                this.btn_submit.Visible = false; //保存
            }

            //新文档
            if (this.Request.QueryString["op"] == "add")
            {
                if (this.hy_deptid.Text != "")
                {
                    //根据部门ID得到部门名称
                    HyoaClass.Hyoa_dept Hyoa_dept = new HyoaClass.Hyoa_dept();
                    DataTable dtdept = Hyoa_dept.Getdept(this.hy_deptid.Text);
                    if (dtdept.Rows.Count > 0)
                        this.hy_deptname.Text = dtdept.Rows[0]["hy_deptname"].ToString();

                    this.ddlifleader.Items.Insert(0, "否");
                    this.ddlifleader.Items.Insert(1, "是");

                    this.ddlisenabled.Items.Insert(0, "是");
                    this.ddlisenabled.Items.Insert(1, "否");

                    this.ddlxb.Items.Insert(0, "--请选择--");
                    this.ddlxb.Items.Insert(1, "男");
                    this.ddlxb.Items.Insert(2, "女");

                    dtdept.Clear();
                }
            }
            //旧文档
            if (this.Request.QueryString["op"] == "modify")
            {
                if (this.Request.QueryString["userid"] != null)
                {
                    this.ddlifleader.Items.Insert(0, "否");
                    this.ddlifleader.Items.Insert(1, "是");

                    this.ddlisenabled.Items.Insert(0, "是");
                    this.ddlisenabled.Items.Insert(1, "否");

                    this.ddlxb.Items.Insert(0, "--请选择--");
                    this.ddlxb.Items.Insert(1, "男");
                    this.ddlxb.Items.Insert(2, "女");

                    //根据用户ID得到信息
                    this.txtuserid.Text = this.Request.QueryString["userid"].ToString();
                    HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                    HyoaClass.Hyoa_user_detail Hyoa_user_detail = new HyoaClass.Hyoa_user_detail();
                    DataTable dtuser = Hyoa_user.Getuserallinfo(this.txtuserid.Text);
                    if (dtuser.Rows.Count > 0)
                    {
                        this.txtusername.Value = dtuser.Rows[0]["hy_username"].ToString();
                        this.hy_deptid.Text = dtuser.Rows[0]["hy_deptid"].ToString();
                        this.hy_deptname.Text = dtuser.Rows[0]["hy_deptname"].ToString();
                        this.txtposition.Value = dtuser.Rows[0]["hy_post"].ToString();

                        if (dtuser.Rows[0]["hy_ifleader"].ToString() == "是")
                            this.ddlifleader.SelectedIndex = 1;
                        else
                            this.ddlifleader.SelectedIndex = 0;

                        this.txtofficetel.Value = dtuser.Rows[0]["hy_officetel"].ToString();
                        this.txthometel.Value = dtuser.Rows[0]["hy_hometel"].ToString();
                        this.txtmobile.Value = dtuser.Rows[0]["hy_mobile"].ToString();
                        this.txtvirtualtel.Value = dtuser.Rows[0]["hy_virtualnumber"].ToString();
                        this.txtuserno.Value = dtuser.Rows[0]["hy_sort"].ToString();

                        if (dtuser.Rows[0]["hy_isenabled"].ToString() == "是")
                            this.ddlisenabled.SelectedIndex = 0;
                        else
                            this.ddlisenabled.SelectedIndex = 1;

                        DataTable dtdetail = Hyoa_user_detail.Getuserdetail(this.txtuserid.Text);
                        if (dtdetail.Rows.Count > 0)
                        {
                            this.txtbirthday.Value = System.DateTime.Parse(dtdetail.Rows[0]["hy_birthday"].ToString()).ToString("yyyy-MM-dd");
                            this.txtfjh.Value = dtdetail.Rows[0]["hy_fjh"].ToString();
                            this.ddlxb.SelectedValue = dtdetail.Rows[0]["hy_xb"].ToString();
                            this.txtzzmm.Value = dtdetail.Rows[0]["hy_zzmm"].ToString();
                            this.txtxl.Value = dtdetail.Rows[0]["hy_xl"].ToString();
                            this.txtbyyx.Value = dtdetail.Rows[0]["hy_byyx"].ToString();

                            if (dtdetail.Rows[0]["hy_jdwsj"].ToString() != "" && dtdetail.Rows[0]["hy_jdwsj"].ToString() != null && dtdetail.Rows[0]["hy_jdwsj"].ToString() != "1900-01-01")
                                this.txtjdwsj.Value = System.DateTime.Parse(dtdetail.Rows[0]["hy_jdwsj"].ToString()).ToShortDateString();

                            this.txtjtzz.Value = dtdetail.Rows[0]["hy_jtzz"].ToString();
                            this.txtsfzhm.Value = dtdetail.Rows[0]["hy_sfzhm"].ToString();
                        }

                        if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
                        { }
                        else
                        {
                            this.txtsfzhm.Value = "您无权查看,如有需要请联系管理员!";
                        }

                    }
                    dtuser.Clear();
                    this.txtuserid.Enabled = false;
                }
            }
        }
    }
示例#21
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("/login.aspx");

        string ls_tip = "保存成功!";

        //新文档时
        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
        HyoaClass.Hyoa_user_detail Hyoa_user_detail = new HyoaClass.Hyoa_user_detail();
        if (this.txtop.Value == "add")
        {
            //先判断这个用户是否已经存在
            DataTable dtjudge = Hyoa_user.Getuser(this.txtuserid.Text);
            if (dtjudge.Rows.Count > 0)
            {
                Response.Write("<script>alert('该用户名已注册,请重新注册!');history.back();</script>");
                return;
            }
            else
            {
                Hyoa_user.hy_userid = this.txtuserid.Text;
                Hyoa_user.hy_deptid = this.hy_deptid.Text;
                Hyoa_user.hy_username = this.txtusername.Value;
                Hyoa_user.hy_post = this.txtposition.Value;
                Hyoa_user.hy_ifleader = this.ddlifleader.SelectedValue.ToString();
                Hyoa_user.hy_officetel = this.txtofficetel.Value;
                Hyoa_user.hy_hometel = this.txthometel.Value;
                Hyoa_user.hy_mobile = this.txtmobile.Value;
                Hyoa_user.hy_virtualnumber = this.txtvirtualtel.Value;
                Hyoa_user.hy_sort = System.Int32.Parse(this.txtuserno.Value);
                Hyoa_user.hy_isenabled = this.ddlisenabled.SelectedValue.ToString();
                Hyoa_user.hy_createtime = System.DateTime.Now.ToString();
                Hyoa_user.Insert();
            }
        }
        else
        {
            Hyoa_user.hy_userid = this.txtuserid.Text;
            Hyoa_user.hy_deptid = this.hy_deptid.Text;
            Hyoa_user.hy_username = this.txtusername.Value;
            Hyoa_user.hy_post = this.txtposition.Value;
            Hyoa_user.hy_ifleader = this.ddlifleader.SelectedValue.ToString();
            Hyoa_user.hy_officetel = this.txtofficetel.Value;
            Hyoa_user.hy_hometel = this.txthometel.Value;
            Hyoa_user.hy_mobile = this.txtmobile.Value;
            Hyoa_user.hy_virtualnumber = this.txtvirtualtel.Value;
            Hyoa_user.hy_sort = System.Int32.Parse(this.txtuserno.Value);
            Hyoa_user.hy_isenabled = this.ddlisenabled.SelectedValue.ToString();
            Hyoa_user.Update();
        }

        //先判断这个用户详细信息是否已经存在
        DataTable dtdetail = Hyoa_user_detail.Getuserdetail(this.txtuserid.Text);
        if (dtdetail.Rows.Count > 0)
        {
            //更新详细信息
            Hyoa_user_detail.hy_userid = this.txtuserid.Text;
            Hyoa_user_detail.hy_birthday = this.txtbirthday.Value;
            Hyoa_user_detail.hy_ifsrtx = "";
            Hyoa_user_detail.hy_fjh = this.txtfjh.Value;
            Hyoa_user_detail.hy_xb = this.ddlxb.SelectedValue;
            Hyoa_user_detail.hy_zzmm = this.txtzzmm.Value;
            Hyoa_user_detail.hy_xl = this.txtxl.Value;
            Hyoa_user_detail.hy_byyx = this.txtbyyx.Value;
            Hyoa_user_detail.hy_jdwsj = this.txtjdwsj.Value;
            Hyoa_user_detail.hy_jtzz = this.txtjtzz.Value;
            Hyoa_user_detail.hy_sfzhm = this.txtsfzhm.Value;
            Hyoa_user_detail.Update();
        }
        else
        {
            //插入详细信息
            Hyoa_user_detail.hy_userid = this.txtuserid.Text;
            Hyoa_user_detail.hy_birthday = this.txtbirthday.Value;
            Hyoa_user_detail.hy_ifsrtx = "";
            Hyoa_user_detail.hy_fjh = this.txtfjh.Value;
            Hyoa_user_detail.hy_xb = this.ddlxb.SelectedValue;
            Hyoa_user_detail.hy_zzmm = this.txtzzmm.Value;
            Hyoa_user_detail.hy_xl = this.txtxl.Value;
            Hyoa_user_detail.hy_byyx = this.txtbyyx.Value;
            Hyoa_user_detail.hy_jdwsj = this.txtjdwsj.Value;
            Hyoa_user_detail.hy_jtzz = this.txtjtzz.Value;
            Hyoa_user_detail.hy_sfzhm = this.txtsfzhm.Value;
            Hyoa_user_detail.Insert();
        }

        //处理完成后的提示及跳转
        if (this.txtifpop.Value == "")
        {
            Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
        }
        else
        {
            Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
        }
    }
示例#22
0
    //得到某一个字段的HTML  Written by xf 20110515
    //pi_flag 0:不赋值  1:需赋值
    //ifsearch:是否查询时使用 0:非查询时使用 1:查询时使用
    //docid:旧文档使用时,文档ID,新文档则为空就可以
    //ifhavarole:是否有权限  0:lable输出 1:input输出
    public string GetFieldHtml(string hy_mudelid, string hy_fieldid, string pi_flag, string hy_tableid, string ifsearch, string docid, string ifhavarole)
    {
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        DataTable dtfield = Hyoa_flowfield.GetSQLfieldBymudelidAndFieldidAndTableid(hy_mudelid, hy_fieldid, hy_tableid);
        HyoaClass.DAO db = new HyoaClass.DAO();
        string lsField = "";
        string field_css = "";
        string field_value = "";
        string field_functionhy_onclick = "";
        string field_functionhy_ondblclick = "";
        string field_functionhy_onchange = "";
        string field_functionhy_onkeydown = "";
        string field_functionhy_onkeyup = "";
        string field_wordlimit = "";

        if (dtfield.Rows.Count > 0)
        {
            //得到该字段的样式start
            if (dtfield.Rows[0]["hy_ifreadonly"].ToString() == "是")
            {
                if (ifsearch == "0")
                    field_css += " readonly ";
            }
            if (dtfield.Rows[0]["hy_class"].ToString() != "")
            {
                field_css += " class='" + dtfield.Rows[0]["hy_class"].ToString() + "' ";
            }
            if (dtfield.Rows[0]["hy_width"].ToString() != "")
            {
                field_css += " style='width:" + dtfield.Rows[0]["hy_width"].ToString() + ";";
            }
            else
            {
                field_css += " style='";
            }
            if (dtfield.Rows[0]["hy_height"].ToString() != "")
            {
                field_css += " height:" + dtfield.Rows[0]["hy_height"].ToString() + "'";
            }
            else
            {
                field_css += "'";
            }

            //得到字数限制
            if (dtfield.Rows[0]["hy_wordlimit"].ToString() != "")
            {
                field_wordlimit += " maxlength='" + dtfield.Rows[0]["hy_wordlimit"].ToString() + "' ";
            }

            //默认值
            //默认值取值的方式,查询时不使用默认值

            if (ifsearch == "0")
            {
                if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() != "")
                {
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "0")
                        field_value += dtfield.Rows[0]["hy_defaultvalue"].ToString();

                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "1")
                    {
                        DataTable dtdefault = db.GetDataTable(dtfield.Rows[0]["hy_defaultvalue"].ToString());
                        if (dtdefault.Rows.Count > 0)
                            field_value += dtdefault.Rows[0][0].ToString();
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "2")
                    {
                        field_value += Session[dtfield.Rows[0]["hy_defaultvalue"].ToString()].ToString();
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "3")
                    {
                        if (dtfield.Rows[0]["hy_defaultvalue"].ToString() == "yyyy-mm-dd")
                            field_value += System.DateTime.Now.ToShortDateString();
                        else
                            field_value += System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    }
                    //自动生成值的情况 Added by xf 20110719
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "4")
                    {
                        if (dtfield.Rows[0]["hy_fieldtype"].ToString() == "数值")
                        {
                            //得到目前最大的数值,然后+1,未找到则赋值为1
                            HyoaClass.DAO db_autovalue = new HyoaClass.DAO();

                            DataTable dt_autovalue = db_autovalue.GetDataTable("select max(hy_field36) as maxint from hyp_flowmain where hy_tableid='" + dtfield.Rows[0]["hy_tableid"].ToString() + "'");
                            if (dt_autovalue.Rows[0]["maxint"].ToString() == null || dt_autovalue.Rows[0]["maxint"].ToString() == "")
                                field_value += "1";
                            else
                                field_value += (System.Int32.Parse(dt_autovalue.Rows[0]["maxint"].ToString()) + 1).ToString();
                        }
                        else
                        {
                            field_value += System.Guid.NewGuid().ToString();
                        }
                    }
                }
            }

            //事件
            if (dtfield.Rows[0]["hy_onclick"].ToString() != "")
            {
                field_functionhy_onclick += " onclick=\"" + dtfield.Rows[0]["hy_onclick"].ToString() + "\" ";
            }
            if (dtfield.Rows[0]["hy_ondblclick"].ToString() != "")
            {
                field_functionhy_ondblclick += " ondblclick=\"" + dtfield.Rows[0]["hy_ondblclick"].ToString() + "\" ";
            }
            if (dtfield.Rows[0]["hy_onchange"].ToString() != "")
            {
                field_functionhy_onchange += " onchange=\"" + dtfield.Rows[0]["hy_onchange"].ToString() + "\" ";
            }
            if (dtfield.Rows[0]["hy_onkeydown"].ToString() != "")
            {
                field_functionhy_onkeydown += " onkeydown=\"" + dtfield.Rows[0]["hy_onkeydown"].ToString() + "\" ";
            }
            if (dtfield.Rows[0]["hy_onkeyup"].ToString() != "")
            {
                field_functionhy_onkeyup += " onkeyup=\"" + dtfield.Rows[0]["hy_onkeyup"].ToString() + "\" ";
            }
            //得到该字段的样式end
            string field_type = dtfield.Rows[0]["hy_fieldtype"].ToString();

            //是否需要赋值,如果需要赋值,得到当前字段对应的值(日期型需要根据格式进行转换)
            string field_docvalue = "";
            //this.Response.Write("<script>alert('" + pi_flag + "');</script>");
            if (pi_flag == "1")
            {
                HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
                DataTable dt_flowmain = Hyoa_flowmain.Getflowmain(docid);
                if (dt_flowmain.Rows.Count > 0)
                {
                    if (dtfield.Rows[0]["hy_defaultvalue"].ToString() == "yyyy-mm-dd")
                    {
                        field_docvalue = System.DateTime.Parse(dt_flowmain.Rows[0][dtfield.Rows[0]["hy_sqlfield"].ToString()].ToString()).ToShortDateString();
                    }
                    else
                    {
                        //如果SQL为数值的字段部分,则需要截取小数点后边两位
                        if (dtfield.Rows[0]["hy_fieldtype"].ToString() == "数值")
                        {
                            if (dt_flowmain.Rows[0][dtfield.Rows[0]["hy_sqlfield"].ToString()].ToString().Contains(".") == true)
                                field_docvalue = float.Parse(dt_flowmain.Rows[0][dtfield.Rows[0]["hy_sqlfield"].ToString()].ToString()).ToString("F2");
                            else
                                field_docvalue = dt_flowmain.Rows[0][dtfield.Rows[0]["hy_sqlfield"].ToString()].ToString();
                        }
                        else
                        {
                            field_docvalue = dt_flowmain.Rows[0][dtfield.Rows[0]["hy_sqlfield"].ToString()].ToString();
                        }
                    }
                }
            }
            //如果没有权限,直接输出lable
            //this.Response.Write("<script>alert('" + ifhavarole + "');</script>");
            if (ifhavarole == "0")
            {
                //痕迹保留
                if (field_type == "痕迹保留")
                {
                    lsField += "<input type=button id=\"btn_zwxg\" value='正  文' class=btn3 onclick=\"window.open('ntko/readoffice.aspx?newofficetype=1&fatherid=" + docid + "&tacheByhj=1&jsxd=1','newwindow','height=768,width=1024,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no, status=no');\" ";
                }
                else
                {
                    //附件组件
                    if (field_type == "附件组件")
                    {
                        //根据docid得到目前已上传的附件信息
                        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                        HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
                        DataTable dt_fileatt = Hyoa_fileatt.GetfileattByFatherid(docid);
                        if (dt_fileatt.Rows.Count > 0)
                        {
                            for (var ii = 0; ii < dt_fileatt.Rows.Count; ii++)
                            {
                                string ls_name = "";
                                DataTable dt_user = Hyoa_user.Getuser(dt_fileatt.Rows[ii]["hy_userid"].ToString());
                                if (dt_user.Rows.Count > 0)
                                {
                                    ls_name = dt_user.Rows[0]["hy_username"].ToString();
                                }
                                lsField += (ii + 1).ToString() + "、<a href=\"" + dt_fileatt.Rows[ii]["hy_filepath"].ToString() + "\" target=_blank>" + dt_fileatt.Rows[ii]["hy_filename"].ToString() + "&nbsp;&nbsp;&nbsp;&nbsp;" + ls_name + "&nbsp;&nbsp;[" + dt_fileatt.Rows[ii]["hy_djsj"].ToString() + "]" + "</a><br />";
                            }
                        }
                        else
                        {
                            lsField += "&nbsp;";
                        }
                    }
                    else
                    {
                        //ztmztmztm2start
                        if (field_docvalue.Length > 8)
                        {
                            if (field_docvalue.Substring(0, 8) == "1900-1-1")
                            {
                                field_docvalue = "&nbsp;";
                            }
                        }
                        //ztmztmztm2end
                        lsField = field_docvalue + "&nbsp;";
                    }
                }
            }
            else
            {
                //单行文本
                if (field_type == "文本")
                {
                    if (pi_flag == "0")
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + field_wordlimit + " value=\"" + field_value + "\">";
                    else
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + field_wordlimit + " value=\"" + field_docvalue + "\">";
                }
                //多行文本
                if (field_type == "多行文本")
                {
                    //格式化内容,将<br>转为/n
                    if (field_docvalue.Contains("<br>"))
                        field_docvalue = field_docvalue.Replace("<br>", "\n");

                    if (pi_flag == "0")
                        lsField = "<textarea name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_css + field_wordlimit + " >" + field_value + "</textarea>";
                    else
                        lsField = "<textarea name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_css + field_wordlimit + " >" + field_docvalue + "</textarea>";
                }
                //日期
                if (field_type == "日期")
                {
                    //this.Response.Write("<script>alert('aaaaaa');</script>");
                    //this.Response.Write("<script>alert('" + pi_flag + "');</script>");

                    if (ifsearch == "0")
                    {
                        if (pi_flag == "0")
                            lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + field_wordlimit + " value=\"" + field_value + "\">";
                        else
                        {

                            //add ztm3 start
                            if (field_docvalue.Length > 7)
                            {
                                if (field_docvalue.Substring(0, 8) == "1900-1-1")
                                {
                                    field_docvalue = "";
                                }
                            }
                            //add ztm3 end
                            lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + field_wordlimit + " value=\"" + field_docvalue + "\">";

                        }
                    }
                    else
                    {
                        //this.Response.Write("<script>alert('aaaa');</script>");
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_start_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_start_1\" " + field_functionhy_onclick + field_css + field_wordlimit + " value=\"" + field_value + "\">至";
                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_end_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_end_1\" " + field_functionhy_onclick + field_css + field_wordlimit + " value=\"" + field_value + "\">";
                    }
                }
                //文本加按钮
                if (field_type == "文本加按钮")
                {
                    if (pi_flag == "0")
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + field_wordlimit + " value=\"" + field_value + "\">&nbsp;<input type=button id=\"btn_" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "\" name=\"btn_" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "\" value=" + dtfield.Rows[0]["hy_fieldname"].ToString() + " class=btn3 " + field_functionhy_onclick + " >";
                    else
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + field_wordlimit + " value=\"" + field_docvalue + "\">&nbsp;<input type=button id=\"btn_" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "\" name=\"btn_" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "\" value=" + dtfield.Rows[0]["hy_fieldname"].ToString() + " class=btn3 " + field_functionhy_onclick + " >";
                }
                //多行文本加按钮
                if (field_type == "多行文本加按钮")
                {
                    //格式化内容,将<br>转为/n
                    if (field_docvalue.Contains("<br>"))
                        field_docvalue = field_docvalue.Replace("<br>", "\n");

                    if (pi_flag == "0")
                        lsField = "<textarea name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_wordlimit + " " + field_css + " >" + field_value + "</textarea>&nbsp;<input type=button id=\"btn_" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "\" name=\"btn_" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "\" value=" + dtfield.Rows[0]["hy_fieldname"].ToString() + " class=btn3 " + field_functionhy_onclick + " >";
                    else
                        lsField = "<textarea name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_wordlimit + " " + field_css + " >" + field_docvalue + "</textarea>&nbsp;<input type=button id=\"btn_" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "\" name=\"btn_" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "\" value=" + dtfield.Rows[0]["hy_fieldname"].ToString() + " class=btn3 " + field_functionhy_onclick + " >";
                }
                //数值
                if (field_type == "数值")
                {
                    if (ifsearch == "0")
                    {
                        if (pi_flag == "0")
                            lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + field_wordlimit + " value=\"" + field_value + "\">";
                        else
                            lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + field_wordlimit + " value=\"" + field_docvalue + "\">";
                    }
                    else
                    {
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_start_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_start_1\" " + field_functionhy_onclick + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + field_wordlimit + " value=\"" + field_value + "\">到";
                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_end_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_end_1\" " + field_functionhy_onclick + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + field_wordlimit + " value=\"" + field_value + "\">";
                    }
                }
                //对话框列表(下拉框
                if (field_type == "对话框列表")
                {
                    lsField = "<select name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onchange + field_css + "> ";
                    //第一项:请选择
                    lsField += "<option value=''>--请选择--</option>";
                    //有哪些选项
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "0")
                    {
                        string[] lv_options = dtfield.Rows[0]["hy_options"].ToString().Split('#');
                        for (var ii = 0; ii < lv_options.Length; ii++)
                        {
                            if (pi_flag == "0")
                            {
                                lsField += "<option value='" + lv_options[ii].ToString() + "'>" + lv_options[ii].ToString() + "</option>";
                            }
                            else
                            {
                                if (field_docvalue == lv_options[ii].ToString())
                                    lsField += "<option value='" + lv_options[ii].ToString() + "' selected>" + lv_options[ii].ToString() + "</option>";
                                else
                                    lsField += "<option value='" + lv_options[ii].ToString() + "'>" + lv_options[ii].ToString() + "</option>";
                            }
                        }
                    }
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "1")
                    {
                        DataTable dtoptions = db.GetDataTable(dtfield.Rows[0]["hy_options"].ToString());
                        if (dtoptions.Rows.Count > 0)
                        {
                            for (var ii = 0; ii < dtoptions.Rows.Count; ii++)
                            {
                                if (pi_flag == "0")
                                {
                                    lsField += "<option value='" + dtoptions.Rows[ii][0].ToString() + "'>" + dtoptions.Rows[ii][0].ToString() + "</option>";
                                }
                                else
                                {
                                    if (field_docvalue == dtoptions.Rows[ii][0].ToString())
                                        lsField += "<option value='" + dtoptions.Rows[ii][0].ToString() + "' selected>" + dtoptions.Rows[ii][0].ToString() + "</option>";
                                    else
                                        lsField += "<option value='" + dtoptions.Rows[ii][0].ToString() + "'>" + dtoptions.Rows[ii][0].ToString() + "</option>";
                                }
                            }
                        }
                    }
                    lsField += "</select>";
                }
                //复选框
                if (field_type == "复选框")
                {
                    //有哪些选项
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "0")
                    {
                        string[] lv_options = dtfield.Rows[0]["hy_options"].ToString().Split('#');
                        for (var ii = 0; ii < lv_options.Length; ii++)
                        {
                            if (pi_flag == "0")
                            {
                                if (field_value == lv_options[ii].ToString())
                                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=checkbox checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                                else
                                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=checkbox id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                            }
                            else
                            {
                                if (field_docvalue.Contains(lv_options[ii].ToString()))
                                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=checkbox checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                                else
                                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=checkbox id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                            }
                        }
                    }
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "1")
                    {
                        DataTable dtoptions = db.GetDataTable(dtfield.Rows[0]["hy_options"].ToString());
                        if (dtoptions.Rows.Count > 0)
                        {
                            for (var ii = 0; ii < dtoptions.Rows.Count; ii++)
                            {
                                if (pi_flag == "0")
                                {
                                    if (field_value == dtoptions.Rows[ii][0].ToString())
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=checkbox checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                    else
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=checkbox id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                }
                                else
                                {
                                    if (field_docvalue.Contains(dtoptions.Rows[ii][0].ToString()))
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=checkbox checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                    else
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=checkbox id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                }
                            }
                        }
                    }
                }

                //单选框
                if (field_type == "单选框")
                {
                    //有哪些选项
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "0")
                    {
                        string[] lv_options = dtfield.Rows[0]["hy_options"].ToString().Split('#');
                        for (var ii = 0; ii < lv_options.Length; ii++)
                        {
                            if (pi_flag == "0")
                            {
                                if (field_value == lv_options[ii].ToString())
                                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                                else
                                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                            }
                            else
                            {
                                if (field_docvalue == lv_options[ii].ToString())
                                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                                else
                                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                            }
                        }
                    }
                    if (dtfield.Rows[0]["hy_optiontype"].ToString() == "1")
                    {
                        DataTable dtoptions = db.GetDataTable(dtfield.Rows[0]["hy_options"].ToString());
                        if (dtoptions.Rows.Count > 0)
                        {
                            for (var ii = 0; ii < dtoptions.Rows.Count; ii++)
                            {
                                if (pi_flag == "0")
                                {
                                    if (field_value == dtoptions.Rows[ii][0].ToString())
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                    else
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                }
                                else
                                {
                                    if (field_docvalue == dtoptions.Rows[ii][0].ToString())
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                    else
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                }
                            }
                        }
                    }
                }
                //口令
                if (field_type == "口令")
                {
                    if (pi_flag == "0")
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=password id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + field_wordlimit + " value=\"" + field_value + "\">";
                    else
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=password id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + field_wordlimit + " value=\"" + field_docvalue + "\">";
                }
                //附件组件
                if (field_type == "附件组件")
                {
                    lsField = "";
                    //根据docid得到目前已上传的附件信息
                    HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
                    DataTable dt_fileatt = Hyoa_fileatt.GetfileattByFatherid(docid);
                    HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();

                    if (dt_fileatt.Rows.Count > 0)
                    {
                        for (var ii = 0; ii < dt_fileatt.Rows.Count; ii++)
                        {
                            string ls_name = "";
                            DataTable dt_user = Hyoa_user.Getuser(dt_fileatt.Rows[ii]["hy_userid"].ToString());
                            if (dt_user.Rows.Count > 0)
                            {
                                ls_name = dt_user.Rows[0]["hy_username"].ToString();
                            }
                            lsField += (ii + 1).ToString() + "、<a href=\"" + dt_fileatt.Rows[ii]["hy_filepath"].ToString() + "\" target=_blank>" + dt_fileatt.Rows[ii]["hy_filename"].ToString() + "</a>&nbsp;&nbsp;&nbsp;&nbsp;" + ls_name + "&nbsp;&nbsp;[" + dt_fileatt.Rows[ii]["hy_djsj"].ToString() + "]" + "<br />";
                        }
                    }
                    lsField += "<input type=button id=\"uploadfile1\" value='附件管理' class=btn3 onclick=\"window.open('/ggdy/main_fileatt.aspx?fatherid=" + docid + "','newwindow','height=350,width=600,top=100,left=200,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no');\" ";
                }
                //说明文字
                if (field_type == "说明文字")
                {
                    lsField = "<span id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\">" + field_value + "</span>";
                }
                //编辑器
                if (field_type == "编辑器")
                {
                    //lsField = "<textarea name=\"hy_content1_1\" id=\"hy_content1_1\" style=\"display:none\" runat="server">" + field_docvalue + "</textarea>";
                    lsField += "<iframe ID=\"eWebEditor1\" src=\"system/eWebEditor/ewebeditor.htm?id=" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "&style=Portal\" frameborder=\"0\" scrolling=\"no\" width=\"100%\" height=\"350\"></iframe>";
                }
                //痕迹保留
                //this.Response.Write("<script>alert('" + field_type + "');</script>");
                if (field_type == "痕迹保留")
                {
                    //判断是否为第一环节
                    HyoaClass.Hyoa_flowwork Hyoa_flowwork = new HyoaClass.Hyoa_flowwork();
                    DataTable dtflowwork = Hyoa_flowwork.Getflowworkbyflowidtacheid(this.hy_flowid.Text, "*");

                    if (dtflowwork.Rows.Count > 0)
                    {
                        if (dtflowwork.Rows[0]["hy_nexttacheid"].ToString() == this.hy_curtacheid.Text)
                        {
                            lsField += "<input type=button id=\"btn_zwxg\" value='正  文' class=btn3 onclick=\"window.open('ntko/editoffice.aspx?newofficetype=1&fatherid=" + docid + "&tacheByhj=1&jsxd=0','newwindow','height=768,width=1024,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no, status=no');\" ";
                        }
                        else
                        {
                            //判断是否为最后一个环节
                            dtflowwork.Clear();
                            dtflowwork = Hyoa_flowwork.Getflowworkbyflowidtacheid(this.hy_flowid.Text, this.hy_curtacheid.Text);
                            if (dtflowwork.Rows.Count > 0)
                            {
                                if (dtflowwork.Rows[0]["hy_nexttacheid"].ToString() == "**")
                                {
                                    lsField += "<input type=button id=\"btn_zwxg\" value='正  文' class=btn3 onclick=\"window.open('ntko/editoffice.aspx?newofficetype=1&fatherid=" + docid + "&tacheByhj=0&jsxd=1','newwindow','height=768,width=1024,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no, status=no');\" ";
                                }
                                else
                                {
                                    lsField += "<input type=button id=\"btn_zwxg\" value='正  文' class=btn3 onclick=\"window.open('ntko/editoffice.aspx?newofficetype=1&fatherid=" + docid + "&tacheByhj=0&jsxd=0','newwindow','height=768,width=1024,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no, status=no');\" ";
                                }
                            }

                        }
                    }

                }
            }

            db.Close();
        }
        return lsField;
    }
示例#23
0
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("/login.aspx");

        string ls_tip = "保存成功!";

        //新文档时
        //新建时先进行一次保存
        HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
        if (this.txtop.Value == "add")
        {
            #region 字段信息
            Hyoa_flowmain.DOCID = this.txtdocid.Value;
            Hyoa_flowmain.hy_mudelid = this.hy_mudelid.Text;
            Hyoa_flowmain.hy_tableid = this.hy_tableid.Text;
            Hyoa_flowmain.hy_flowid = this.hy_flowid.Text;
            Hyoa_flowmain.hy_flowname = this.hy_flowname.Text;
            Hyoa_flowmain.hy_curtacheid = this.hy_curtacheid.Text;
            Hyoa_flowmain.hy_curtachename = this.hy_curtachename.Text;
            Hyoa_flowmain.hy_curclrid = this.hy_curclrid.Text;
            Hyoa_flowmain.hy_curclrname = this.hy_curclrname.Text;
            Hyoa_flowmain.hy_djrid = this.hy_djrid.Text;
            Hyoa_flowmain.hy_djrname = this.hy_djrname.Text;
            Hyoa_flowmain.hy_djrbmid = this.hy_djrbmid.Text;
            Hyoa_flowmain.hy_djrbmname = this.hy_djrbmname.Text;
            Hyoa_flowmain.hy_djsj = this.hy_djsj.Text;

            Hyoa_flowmain.hy_bt = this.hy_bt.Text;

            Hyoa_flowmain.hy_content1 = this.hy_content1.Text;
            Hyoa_flowmain.hy_content2 = this.hy_content2.Text;
            Hyoa_flowmain.hy_content3 = this.hy_content3.Text;
            Hyoa_flowmain.hy_content4 = this.hy_content4.Text;
            Hyoa_flowmain.hy_content5 = this.hy_content5.Text;
            Hyoa_flowmain.hy_content6 = this.hy_content6.Text;
            Hyoa_flowmain.hy_content7 = this.hy_content7.Text;
            Hyoa_flowmain.hy_content8 = this.hy_content8.Text;
            Hyoa_flowmain.hy_content9 = this.hy_content9.Text;
            Hyoa_flowmain.hy_content10 = this.hy_content10.Text;
            Hyoa_flowmain.hy_content11 = this.hy_content11.Text;
            Hyoa_flowmain.hy_content12 = this.hy_content12.Text;
            Hyoa_flowmain.hy_content13 = this.hy_content13.Text;
            Hyoa_flowmain.hy_content14 = this.hy_content14.Text;
            Hyoa_flowmain.hy_content15 = this.hy_content15.Text;

            Hyoa_flowmain.hy_field1 = this.hy_field1.Text;
            Hyoa_flowmain.hy_field2 = this.hy_field2.Text;
            Hyoa_flowmain.hy_field3 = this.hy_field3.Text;
            Hyoa_flowmain.hy_field4 = this.hy_field4.Text;
            Hyoa_flowmain.hy_field5 = this.hy_field5.Text;
            Hyoa_flowmain.hy_field6 = this.hy_field6.Text;
            Hyoa_flowmain.hy_field7 = this.hy_field7.Text;
            Hyoa_flowmain.hy_field8 = this.hy_field8.Text;
            Hyoa_flowmain.hy_field9 = this.hy_field9.Text;
            Hyoa_flowmain.hy_field10 = this.hy_field10.Text;
            Hyoa_flowmain.hy_field11 = this.hy_field11.Text;
            Hyoa_flowmain.hy_field12 = this.hy_field12.Text;
            Hyoa_flowmain.hy_field13 = this.hy_field13.Text;
            Hyoa_flowmain.hy_field14 = this.hy_field14.Text;
            Hyoa_flowmain.hy_field15 = this.hy_field15.Text;
            Hyoa_flowmain.hy_field16 = this.hy_field16.Text;
            Hyoa_flowmain.hy_field17 = this.hy_field17.Text;
            Hyoa_flowmain.hy_field18 = this.hy_field18.Text;
            Hyoa_flowmain.hy_field19 = this.hy_field19.Text;
            Hyoa_flowmain.hy_field20 = this.hy_field20.Text;
            Hyoa_flowmain.hy_field21 = this.hy_field21.Text;
            Hyoa_flowmain.hy_field22 = this.hy_field22.Text;
            Hyoa_flowmain.hy_field23 = this.hy_field23.Text;
            Hyoa_flowmain.hy_field24 = this.hy_field24.Text;
            Hyoa_flowmain.hy_field25 = this.hy_field25.Text;
            Hyoa_flowmain.hy_field26 = this.hy_field26.Text;
            Hyoa_flowmain.hy_field27 = this.hy_field27.Text;
            Hyoa_flowmain.hy_field28 = this.hy_field28.Text;
            Hyoa_flowmain.hy_field29 = this.hy_field29.Text;
            Hyoa_flowmain.hy_field30 = this.hy_field30.Text;
            Hyoa_flowmain.hy_field31 = this.hy_field31.Text;
            Hyoa_flowmain.hy_field32 = this.hy_field32.Text;
            Hyoa_flowmain.hy_field33 = this.hy_field33.Text;
            Hyoa_flowmain.hy_field34 = this.hy_field34.Text;
            Hyoa_flowmain.hy_field35 = this.hy_field35.Text;

            if (this.hy_field36.Text == "")
                Hyoa_flowmain.hy_field36 = 0;
            else
                Hyoa_flowmain.hy_field36 = float.Parse(this.hy_field36.Text);

            if (this.hy_field37.Text == "")
                Hyoa_flowmain.hy_field37 = 0;
            else
                Hyoa_flowmain.hy_field37 = float.Parse(this.hy_field37.Text);

            if (this.hy_field38.Text == "")
                Hyoa_flowmain.hy_field38 = 0;
            else
                Hyoa_flowmain.hy_field38 = float.Parse(this.hy_field38.Text);

            if (this.hy_field39.Text == "")
                Hyoa_flowmain.hy_field39 = 0;
            else
                Hyoa_flowmain.hy_field39 = float.Parse(this.hy_field39.Text);

            if (this.hy_field40.Text == "")
                Hyoa_flowmain.hy_field40 = 0;
            else
                Hyoa_flowmain.hy_field40 = float.Parse(this.hy_field40.Text);

            Hyoa_flowmain.hy_field41 = this.hy_field41.Text;
            Hyoa_flowmain.hy_field42 = this.hy_field42.Text;
            Hyoa_flowmain.hy_field43 = this.hy_field43.Text;
            Hyoa_flowmain.hy_field44 = this.hy_field44.Text;
            Hyoa_flowmain.hy_field45 = this.hy_field45.Text;
            Hyoa_flowmain.hy_field46 = this.hy_field46.Text;
            Hyoa_flowmain.hy_field47 = this.hy_field47.Text;
            Hyoa_flowmain.hy_field48 = this.hy_field48.Text;
            Hyoa_flowmain.hy_field49 = this.hy_field49.Text;
            Hyoa_flowmain.hy_field50 = this.hy_field50.Text;
            Hyoa_flowmain.hy_field51 = this.hy_field51.Text;
            Hyoa_flowmain.hy_field52 = this.hy_field52.Text;
            Hyoa_flowmain.hy_field53 = this.hy_field53.Text;
            Hyoa_flowmain.hy_field54 = this.hy_field54.Text;
            Hyoa_flowmain.hy_field55 = this.hy_field55.Text;
            Hyoa_flowmain.hy_field56 = this.hy_field56.Text;
            Hyoa_flowmain.hy_field57 = this.hy_field57.Text;
            Hyoa_flowmain.hy_field58 = this.hy_field58.Text;
            Hyoa_flowmain.hy_field59 = this.hy_field59.Text;
            Hyoa_flowmain.hy_field60 = this.hy_field60.Text;

            Hyoa_flowmain.hy_field61 = this.hy_field61.Text;
            Hyoa_flowmain.hy_field62 = this.hy_field62.Text;
            Hyoa_flowmain.hy_field63 = this.hy_field63.Text;
            Hyoa_flowmain.hy_field64 = this.hy_field64.Text;
            Hyoa_flowmain.hy_field65 = this.hy_field65.Text;
            Hyoa_flowmain.hy_field66 = this.hy_field66.Text;
            Hyoa_flowmain.hy_field67 = this.hy_field67.Text;
            Hyoa_flowmain.hy_field68 = this.hy_field68.Text;
            Hyoa_flowmain.hy_field69 = this.hy_field69.Text;
            Hyoa_flowmain.hy_field70 = this.hy_field70.Text;

            if (this.hy_field71.Text == "")
                Hyoa_flowmain.hy_field71 = 0;
            else
                Hyoa_flowmain.hy_field71 = float.Parse(this.hy_field71.Text);

            if (this.hy_field72.Text == "")
                Hyoa_flowmain.hy_field72 = 0;
            else
                Hyoa_flowmain.hy_field72 = float.Parse(this.hy_field72.Text);

            if (this.hy_field73.Text == "")
                Hyoa_flowmain.hy_field73 = 0;
            else
                Hyoa_flowmain.hy_field73 = float.Parse(this.hy_field73.Text);

            if (this.hy_field74.Text == "")
                Hyoa_flowmain.hy_field74 = 0;
            else
                Hyoa_flowmain.hy_field74 = float.Parse(this.hy_field74.Text);

            if (this.hy_field75.Text == "")
                Hyoa_flowmain.hy_field75 = 0;
            else
                Hyoa_flowmain.hy_field75 = float.Parse(this.hy_field75.Text);

            if (this.hy_field76.Text == "")
                Hyoa_flowmain.hy_field76 = 0;
            else
                Hyoa_flowmain.hy_field76 = float.Parse(this.hy_field76.Text);

            if (this.hy_field77.Text == "")
                Hyoa_flowmain.hy_field77 = 0;
            else
                Hyoa_flowmain.hy_field77 = float.Parse(this.hy_field77.Text);

            if (this.hy_field78.Text == "")
                Hyoa_flowmain.hy_field78 = 0;
            else
                Hyoa_flowmain.hy_field78 = float.Parse(this.hy_field78.Text);

            if (this.hy_field79.Text == "")
                Hyoa_flowmain.hy_field79 = 0;
            else
                Hyoa_flowmain.hy_field79 = float.Parse(this.hy_field79.Text);

            if (this.hy_field80.Text == "")
                Hyoa_flowmain.hy_field80 = 0;
            else
                Hyoa_flowmain.hy_field80 = float.Parse(this.hy_field80.Text);

            if (this.hy_field81.Text == "")
                Hyoa_flowmain.hy_field81 = 0;
            else
                Hyoa_flowmain.hy_field81 = float.Parse(this.hy_field81.Text);

            if (this.hy_field82.Text == "")
                Hyoa_flowmain.hy_field82 = 0;
            else
                Hyoa_flowmain.hy_field82 = float.Parse(this.hy_field82.Text);

            if (this.hy_field83.Text == "")
                Hyoa_flowmain.hy_field83 = 0;
            else
                Hyoa_flowmain.hy_field83 = float.Parse(this.hy_field83.Text);

            if (this.hy_field84.Text == "")
                Hyoa_flowmain.hy_field84 = 0;
            else
                Hyoa_flowmain.hy_field84 = float.Parse(this.hy_field84.Text);

            if (this.hy_field85.Text == "")
                Hyoa_flowmain.hy_field85 = 0;
            else
                Hyoa_flowmain.hy_field85 = float.Parse(this.hy_field85.Text);

            if (this.hy_field86.Text == "")
                Hyoa_flowmain.hy_field86 = 0;
            else
                Hyoa_flowmain.hy_field86 = float.Parse(this.hy_field86.Text);

            if (this.hy_field87.Text == "")
                Hyoa_flowmain.hy_field87 = 0;
            else
                Hyoa_flowmain.hy_field87 = float.Parse(this.hy_field87.Text);

            if (this.hy_field88.Text == "")
                Hyoa_flowmain.hy_field88 = 0;
            else
                Hyoa_flowmain.hy_field88 = float.Parse(this.hy_field88.Text);

            if (this.hy_field89.Text == "")
                Hyoa_flowmain.hy_field89 = 0;
            else
                Hyoa_flowmain.hy_field89 = float.Parse(this.hy_field89.Text);

            if (this.hy_field90.Text == "")
                Hyoa_flowmain.hy_field90 = 0;
            else
                Hyoa_flowmain.hy_field90 = float.Parse(this.hy_field90.Text);

            if (this.hy_field91.Text == "")
                Hyoa_flowmain.hy_field91 = 0;
            else
                Hyoa_flowmain.hy_field91 = float.Parse(this.hy_field91.Text);

            if (this.hy_field92.Text == "")
                Hyoa_flowmain.hy_field92 = 0;
            else
                Hyoa_flowmain.hy_field92 = float.Parse(this.hy_field92.Text);

            if (this.hy_field93.Text == "")
                Hyoa_flowmain.hy_field93 = 0;
            else
                Hyoa_flowmain.hy_field93 = float.Parse(this.hy_field93.Text);

            if (this.hy_field94.Text == "")
                Hyoa_flowmain.hy_field94 = 0;
            else
                Hyoa_flowmain.hy_field94 = float.Parse(this.hy_field94.Text);

            if (this.hy_field95.Text == "")
                Hyoa_flowmain.hy_field95 = 0;
            else
                Hyoa_flowmain.hy_field95 = float.Parse(this.hy_field95.Text);

            if (this.hy_field96.Text == "")
                Hyoa_flowmain.hy_field96 = 0;
            else
                Hyoa_flowmain.hy_field96 = float.Parse(this.hy_field96.Text);

            if (this.hy_field97.Text == "")
                Hyoa_flowmain.hy_field97 = 0;
            else
                Hyoa_flowmain.hy_field97 = float.Parse(this.hy_field97.Text);

            if (this.hy_field98.Text == "")
                Hyoa_flowmain.hy_field98 = 0;
            else
                Hyoa_flowmain.hy_field98 = float.Parse(this.hy_field98.Text);

            if (this.hy_field99.Text == "")
                Hyoa_flowmain.hy_field99 = 0;
            else
                Hyoa_flowmain.hy_field99 = float.Parse(this.hy_field99.Text);

            if (this.hy_field100.Text == "")
                Hyoa_flowmain.hy_field100 = 0;
            else
                Hyoa_flowmain.hy_field100 = float.Parse(this.hy_field100.Text);

            Hyoa_flowmain.hy_iftx = this.hy_iftx.Text;
            Hyoa_flowmain.hy_zhtxsj = this.hy_zhtxsj.Text;
            Hyoa_flowmain.hy_readuserlist = this.hy_readuserlist.Text;
            #endregion

            Hyoa_flowmain.Insert();

            //插入历史处理表
            HyoaClass.Hyoa_global Hyoa_global_add = new HyoaClass.Hyoa_global();
            Hyoa_global_add.Saveflowhistoryinfo_cl_global(this.txtdocid.Value, this.hy_flowid.Text, this.hy_flowname.Text, this.hy_curtacheid.Text, this.hy_curtachename.Text, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "", "", "", this.hy_djsj.Text, "");

        }

        #region 更新内容
        Hyoa_flowmain.DOCID = this.txtdocid.Value;
        Hyoa_flowmain.hy_curtacheid = this.hy_curtacheid.Text;
        Hyoa_flowmain.hy_curtachename = this.hy_curtachename.Text;
        Hyoa_flowmain.hy_curclrid = this.hy_curclrid.Text;
        Hyoa_flowmain.hy_curclrname = this.hy_curclrname.Text;

        Hyoa_flowmain.hy_bt = this.hy_bt.Text;

        Hyoa_flowmain.hy_content1 = this.hy_content1.Text;
        Hyoa_flowmain.hy_content2 = this.hy_content2.Text;
        Hyoa_flowmain.hy_content3 = this.hy_content3.Text;
        Hyoa_flowmain.hy_content4 = this.hy_content4.Text;
        Hyoa_flowmain.hy_content5 = this.hy_content5.Text;
        Hyoa_flowmain.hy_content6 = this.hy_content6.Text;
        Hyoa_flowmain.hy_content7 = this.hy_content7.Text;
        Hyoa_flowmain.hy_content8 = this.hy_content8.Text;
        Hyoa_flowmain.hy_content9 = this.hy_content9.Text;
        Hyoa_flowmain.hy_content10 = this.hy_content10.Text;
        Hyoa_flowmain.hy_content11 = this.hy_content11.Text;
        Hyoa_flowmain.hy_content12 = this.hy_content12.Text;
        Hyoa_flowmain.hy_content13 = this.hy_content13.Text;
        Hyoa_flowmain.hy_content14 = this.hy_content14.Text;
        Hyoa_flowmain.hy_content15 = this.hy_content15.Text;

        Hyoa_flowmain.hy_field1 = this.hy_field1.Text;
        Hyoa_flowmain.hy_field2 = this.hy_field2.Text;
        Hyoa_flowmain.hy_field3 = this.hy_field3.Text;
        Hyoa_flowmain.hy_field4 = this.hy_field4.Text;
        Hyoa_flowmain.hy_field5 = this.hy_field5.Text;
        Hyoa_flowmain.hy_field6 = this.hy_field6.Text;
        Hyoa_flowmain.hy_field7 = this.hy_field7.Text;
        Hyoa_flowmain.hy_field8 = this.hy_field8.Text;
        Hyoa_flowmain.hy_field9 = this.hy_field9.Text;
        Hyoa_flowmain.hy_field10 = this.hy_field10.Text;
        Hyoa_flowmain.hy_field11 = this.hy_field11.Text;
        Hyoa_flowmain.hy_field12 = this.hy_field12.Text;
        Hyoa_flowmain.hy_field13 = this.hy_field13.Text;
        Hyoa_flowmain.hy_field14 = this.hy_field14.Text;
        Hyoa_flowmain.hy_field15 = this.hy_field15.Text;
        Hyoa_flowmain.hy_field16 = this.hy_field16.Text;
        Hyoa_flowmain.hy_field17 = this.hy_field17.Text;
        Hyoa_flowmain.hy_field18 = this.hy_field18.Text;
        Hyoa_flowmain.hy_field19 = this.hy_field19.Text;
        Hyoa_flowmain.hy_field20 = this.hy_field20.Text;
        Hyoa_flowmain.hy_field21 = this.hy_field21.Text;
        Hyoa_flowmain.hy_field22 = this.hy_field22.Text;
        Hyoa_flowmain.hy_field23 = this.hy_field23.Text;
        Hyoa_flowmain.hy_field24 = this.hy_field24.Text;
        Hyoa_flowmain.hy_field25 = this.hy_field25.Text;
        Hyoa_flowmain.hy_field26 = this.hy_field26.Text;
        Hyoa_flowmain.hy_field27 = this.hy_field27.Text;
        Hyoa_flowmain.hy_field28 = this.hy_field28.Text;
        Hyoa_flowmain.hy_field29 = this.hy_field29.Text;
        Hyoa_flowmain.hy_field30 = this.hy_field30.Text;
        Hyoa_flowmain.hy_field31 = this.hy_field31.Text;
        Hyoa_flowmain.hy_field32 = this.hy_field32.Text;
        Hyoa_flowmain.hy_field33 = this.hy_field33.Text;
        Hyoa_flowmain.hy_field34 = this.hy_field34.Text;
        Hyoa_flowmain.hy_field35 = this.hy_field35.Text;

        if (this.hy_field36.Text == "")
            Hyoa_flowmain.hy_field36 = 0;
        else
            Hyoa_flowmain.hy_field36 = float.Parse(this.hy_field36.Text);

        if (this.hy_field37.Text == "")
            Hyoa_flowmain.hy_field37 = 0;
        else
            Hyoa_flowmain.hy_field37 = float.Parse(this.hy_field37.Text);

        if (this.hy_field38.Text == "")
            Hyoa_flowmain.hy_field38 = 0;
        else
            Hyoa_flowmain.hy_field38 = float.Parse(this.hy_field38.Text);

        if (this.hy_field39.Text == "")
            Hyoa_flowmain.hy_field39 = 0;
        else
            Hyoa_flowmain.hy_field39 = float.Parse(this.hy_field39.Text);

        if (this.hy_field40.Text == "")
            Hyoa_flowmain.hy_field40 = 0;
        else
            Hyoa_flowmain.hy_field40 = float.Parse(this.hy_field40.Text);

        Hyoa_flowmain.hy_field41 = this.hy_field41.Text;
        Hyoa_flowmain.hy_field42 = this.hy_field42.Text;
        Hyoa_flowmain.hy_field43 = this.hy_field43.Text;
        Hyoa_flowmain.hy_field44 = this.hy_field44.Text;
        Hyoa_flowmain.hy_field45 = this.hy_field45.Text;
        Hyoa_flowmain.hy_field46 = this.hy_field46.Text;
        Hyoa_flowmain.hy_field47 = this.hy_field47.Text;
        Hyoa_flowmain.hy_field48 = this.hy_field48.Text;
        Hyoa_flowmain.hy_field49 = this.hy_field49.Text;
        Hyoa_flowmain.hy_field50 = this.hy_field50.Text;
        Hyoa_flowmain.hy_field51 = this.hy_field51.Text;
        Hyoa_flowmain.hy_field52 = this.hy_field52.Text;
        Hyoa_flowmain.hy_field53 = this.hy_field53.Text;
        Hyoa_flowmain.hy_field54 = this.hy_field54.Text;
        Hyoa_flowmain.hy_field55 = this.hy_field55.Text;
        Hyoa_flowmain.hy_field56 = this.hy_field56.Text;
        Hyoa_flowmain.hy_field57 = this.hy_field57.Text;
        Hyoa_flowmain.hy_field58 = this.hy_field58.Text;
        Hyoa_flowmain.hy_field59 = this.hy_field59.Text;
        Hyoa_flowmain.hy_field60 = this.hy_field60.Text;

        Hyoa_flowmain.hy_field61 = this.hy_field61.Text;
        Hyoa_flowmain.hy_field62 = this.hy_field62.Text;
        Hyoa_flowmain.hy_field63 = this.hy_field63.Text;
        Hyoa_flowmain.hy_field64 = this.hy_field64.Text;
        Hyoa_flowmain.hy_field65 = this.hy_field65.Text;
        Hyoa_flowmain.hy_field66 = this.hy_field66.Text;
        Hyoa_flowmain.hy_field67 = this.hy_field67.Text;
        Hyoa_flowmain.hy_field68 = this.hy_field68.Text;
        Hyoa_flowmain.hy_field69 = this.hy_field69.Text;
        Hyoa_flowmain.hy_field70 = this.hy_field70.Text;

        if (this.hy_field71.Text == "")
            Hyoa_flowmain.hy_field71 = 0;
        else
            Hyoa_flowmain.hy_field71 = float.Parse(this.hy_field71.Text);

        if (this.hy_field72.Text == "")
            Hyoa_flowmain.hy_field72 = 0;
        else
            Hyoa_flowmain.hy_field72 = float.Parse(this.hy_field72.Text);

        if (this.hy_field73.Text == "")
            Hyoa_flowmain.hy_field73 = 0;
        else
            Hyoa_flowmain.hy_field73 = float.Parse(this.hy_field73.Text);

        if (this.hy_field74.Text == "")
            Hyoa_flowmain.hy_field74 = 0;
        else
            Hyoa_flowmain.hy_field74 = float.Parse(this.hy_field74.Text);

        if (this.hy_field75.Text == "")
            Hyoa_flowmain.hy_field75 = 0;
        else
            Hyoa_flowmain.hy_field75 = float.Parse(this.hy_field75.Text);

        if (this.hy_field76.Text == "")
            Hyoa_flowmain.hy_field76 = 0;
        else
            Hyoa_flowmain.hy_field76 = float.Parse(this.hy_field76.Text);

        if (this.hy_field77.Text == "")
            Hyoa_flowmain.hy_field77 = 0;
        else
            Hyoa_flowmain.hy_field77 = float.Parse(this.hy_field77.Text);

        if (this.hy_field78.Text == "")
            Hyoa_flowmain.hy_field78 = 0;
        else
            Hyoa_flowmain.hy_field78 = float.Parse(this.hy_field78.Text);

        if (this.hy_field79.Text == "")
            Hyoa_flowmain.hy_field79 = 0;
        else
            Hyoa_flowmain.hy_field79 = float.Parse(this.hy_field79.Text);

        if (this.hy_field80.Text == "")
            Hyoa_flowmain.hy_field80 = 0;
        else
            Hyoa_flowmain.hy_field80 = float.Parse(this.hy_field80.Text);

        if (this.hy_field81.Text == "")
            Hyoa_flowmain.hy_field81 = 0;
        else
            Hyoa_flowmain.hy_field81 = float.Parse(this.hy_field81.Text);

        if (this.hy_field82.Text == "")
            Hyoa_flowmain.hy_field82 = 0;
        else
            Hyoa_flowmain.hy_field82 = float.Parse(this.hy_field82.Text);

        if (this.hy_field83.Text == "")
            Hyoa_flowmain.hy_field83 = 0;
        else
            Hyoa_flowmain.hy_field83 = float.Parse(this.hy_field83.Text);

        if (this.hy_field84.Text == "")
            Hyoa_flowmain.hy_field84 = 0;
        else
            Hyoa_flowmain.hy_field84 = float.Parse(this.hy_field84.Text);

        if (this.hy_field85.Text == "")
            Hyoa_flowmain.hy_field85 = 0;
        else
            Hyoa_flowmain.hy_field85 = float.Parse(this.hy_field85.Text);

        if (this.hy_field86.Text == "")
            Hyoa_flowmain.hy_field86 = 0;
        else
            Hyoa_flowmain.hy_field86 = float.Parse(this.hy_field86.Text);

        if (this.hy_field87.Text == "")
            Hyoa_flowmain.hy_field87 = 0;
        else
            Hyoa_flowmain.hy_field87 = float.Parse(this.hy_field87.Text);

        if (this.hy_field88.Text == "")
            Hyoa_flowmain.hy_field88 = 0;
        else
            Hyoa_flowmain.hy_field88 = float.Parse(this.hy_field88.Text);

        if (this.hy_field89.Text == "")
            Hyoa_flowmain.hy_field89 = 0;
        else
            Hyoa_flowmain.hy_field89 = float.Parse(this.hy_field89.Text);

        if (this.hy_field90.Text == "")
            Hyoa_flowmain.hy_field90 = 0;
        else
            Hyoa_flowmain.hy_field90 = float.Parse(this.hy_field90.Text);

        if (this.hy_field91.Text == "")
            Hyoa_flowmain.hy_field91 = 0;
        else
            Hyoa_flowmain.hy_field91 = float.Parse(this.hy_field91.Text);

        if (this.hy_field92.Text == "")
            Hyoa_flowmain.hy_field92 = 0;
        else
            Hyoa_flowmain.hy_field92 = float.Parse(this.hy_field92.Text);

        if (this.hy_field93.Text == "")
            Hyoa_flowmain.hy_field93 = 0;
        else
            Hyoa_flowmain.hy_field93 = float.Parse(this.hy_field93.Text);

        if (this.hy_field94.Text == "")
            Hyoa_flowmain.hy_field94 = 0;
        else
            Hyoa_flowmain.hy_field94 = float.Parse(this.hy_field94.Text);

        if (this.hy_field95.Text == "")
            Hyoa_flowmain.hy_field95 = 0;
        else
            Hyoa_flowmain.hy_field95 = float.Parse(this.hy_field95.Text);

        if (this.hy_field96.Text == "")
            Hyoa_flowmain.hy_field96 = 0;
        else
            Hyoa_flowmain.hy_field96 = float.Parse(this.hy_field96.Text);

        if (this.hy_field97.Text == "")
            Hyoa_flowmain.hy_field97 = 0;
        else
            Hyoa_flowmain.hy_field97 = float.Parse(this.hy_field97.Text);

        if (this.hy_field98.Text == "")
            Hyoa_flowmain.hy_field98 = 0;
        else
            Hyoa_flowmain.hy_field98 = float.Parse(this.hy_field98.Text);

        if (this.hy_field99.Text == "")
            Hyoa_flowmain.hy_field99 = 0;
        else
            Hyoa_flowmain.hy_field99 = float.Parse(this.hy_field99.Text);

        if (this.hy_field100.Text == "")
            Hyoa_flowmain.hy_field100 = 0;
        else
            Hyoa_flowmain.hy_field100 = float.Parse(this.hy_field100.Text);

        Hyoa_flowmain.hy_iftx = this.hy_iftx.Text;
        Hyoa_flowmain.hy_zhtxsj = this.hy_zhtxsj.Text;
        Hyoa_flowmain.hy_readuserlist = this.hy_readuserlist.Text;
        #endregion

        //保存
        if (this.txtwhichoperation.Value == "1")
        {
            hylcbctscl(Hyoa_flowmain);//特殊处理

            //效能系统日志20150603
            if (this.txtop.Value == "add")
            {
                hyXnxtSaveLogs("撰写", "表单:" + this.lblcurtachenameshow.Text + "新增一条记录", "新增");
            }
            else if (this.txtop.Value == "modify")
            {
                hyXnxtSaveLogs("修改", "表单:" + this.lblcurtachenameshow.Text + "修改一条记录", "修改");
            }
            if (this.hy_tableid.Text == "f1265875-5494-465f-ac33-6fa43d208c8f" && this.txtop.Value == "add")
            {
                string strAuthor = "";
                string strAuthorDept = "";
                if (this.hy_field6.Text != "")
                {
                    strAuthor += this.hy_field6.Text + ",";
                }
                if (this.hy_field5.Text != "")
                {
                    strAuthorDept += this.hy_field5.Text + ",";
                }
                hyXnxtMessageLogs("录用", "录用一篇文章", strAuthor, strAuthorDept);
            }
        }
        //提交
        if (this.txtwhichoperation.Value == "2")
        {
            //更新主文档
            Hyoa_flowmain.hy_curtacheid = this.txtnexttacheid.Value;
            Hyoa_flowmain.hy_curtachename = this.txtnexttachename.Value;
            Hyoa_flowmain.hy_curclrid = this.txtnextclrid.Value;
            Hyoa_flowmain.hy_curclrname = this.txtnextclrname.Value;

            //---- 添加当前环节的处理时间 ---- start
            HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();

            DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocidtacheid(this.txtdocid.Value, this.hy_curtacheid.Text);
            if (dt_clinfo.Rows.Count > 0)
            {
                string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString();                //当前处理的记录ID
                Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc;
                if (dt_clinfo.Rows[0]["hy_clsj"].ToString() == "")
                {
                    Hyoa_flowhistoryinfo_cl.hy_clsj = System.DateTime.Now.ToString();
                }
                else
                {
                    Hyoa_flowhistoryinfo_cl.hy_clsj = dt_clinfo.Rows[0]["hy_clsj"].ToString() + "," + System.DateTime.Now.ToString();
                }
                Hyoa_flowhistoryinfo_cl.Update();
            }
            //---- 添加当前环节的处理时间 ---- end

            //---  创建后续处理的处理记录+建立处理人待办事宜 ---- start
            Hyoa_global.Saveflowhistoryinfo_cl_global(this.txtdocid.Value, this.hy_flowid.Text, this.hy_flowname.Text, this.txtnexttacheid.Value, this.txtnexttachename.Value, this.txtnextclrid.Value, this.txtnextclrname.Value, "", this.txtnextcyrid.Value, this.txtnextcyrname.Value, System.DateTime.Now.ToString(), "");

            //待办事宜、短信、即时消息
            HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
            string[] lv_dbrid = this.txtnextclrid.Value.Split(new Char[] { ',' });
            string[] lv_dbrname = this.txtnextclrname.Value.Split(new Char[] { ',' });
            for (var i = 0; i < lv_dbrid.Length; i++)
            {
                if (lv_dbrid[i].ToString() != "")
                {
                    //得到当前用户手机号
                    HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                    string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString());
                    //得到后续处理人手机号
                    string cb_jsrsjh = Hyoa_user.GetMobilebyuserid(lv_dbrid[i].ToString());

                    //给后续处理人发送一个新的待办事宜(提醒)
                    Hyoa_global.Senddbsy_global(this.txtdocid.Value, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "/main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1", "待办", this.hy_mudelid.Text, "待办箱", "一般", this.hy_bt.Text, "请办理", 0, this.hy_flowid.Text, this.txtnexttacheid.Value);
                    //给后续处理人发送即时消息(提醒)
                    if (this.txtisSendjstx_clr.Value == "1")
                    {
                        Hyoa_global.Sendjstx_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), this.hy_mudelid.Text, this.hy_bt.Text, 0);
                    }
                    //给后续处理人发送短信(提醒)
                    if (this.txtisSendsms_clr.Value == "1")
                    {
                        Hyoa_global.Sendsms_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), cb_fsrsjh, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_jsrsjh, this.hy_mudelid.Text, this.hy_bt.Text, 1, "", "", 0);
                    }
                }
            }
            //--- 创建后续处理的处理记录+建立处理人待办事宜 ---- end

            //--- 创建后续传阅记录+建立待办事宜 ---- start
            string[] lv_cyrid = this.txtnextcyrid.Value.Split(new Char[] { ',' });
            string[] lv_cyrname = this.txtnextcyrname.Value.Split(new Char[] { ',' });

            for (var i = 0; i < lv_cyrid.Length; i++)
            {
                if (lv_cyrid[i].ToString() != "")
                {
                    //建立传阅数据
                    Hyoa_global.Saveflowhistoryinfo_cy_global(this.txtdocid.Value, this.hy_flowid.Text, this.hy_flowname.Text, this.txtnexttacheid.Value, this.txtnexttachename.Value, lv_cyrid[i].ToString(), lv_cyrname[i].ToString(), "", System.DateTime.Now.ToString());
                    //待办事宜、短信、即时消息
                    //得到当前用户手机号
                    HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                    string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString());
                    //得到后续传阅人手机号
                    string cb_cyrsjh = Hyoa_user.GetMobilebyuserid(lv_cyrid[i].ToString());

                    //给后续处理人发送一个新的待办事宜(提醒)
                    Hyoa_global.Senddbsy_global(this.txtdocid.Value, lv_cyrid[i].ToString(), lv_cyrname[i].ToString(), this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "/main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1", "待阅", this.hy_mudelid.Text, "待办箱", "一般", this.hy_bt.Text, "请阅读", 0, this.hy_flowid.Text, this.txtnexttacheid.Value);
                    //给后续处理人发送即时消息(提醒)
                    if (this.txtisSendjstx_cyr.Value == "1")
                    {
                        Hyoa_global.Sendjstx_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), lv_cyrid[i].ToString(), lv_cyrname[i].ToString(), this.hy_mudelid.Text, this.hy_bt.Text, 0);
                    }
                    //给后续处理人发送短信(提醒)
                    if (this.txtisSendsms_cyr.Value == "1")
                    {
                        Hyoa_global.Sendsms_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), cb_fsrsjh, lv_cyrid[i].ToString(), lv_cyrname[i].ToString(), cb_cyrsjh, this.hy_mudelid.Text, this.hy_bt.Text, 1, "", "", 0);
                    }

                }
            }
            //效能办公系统传阅数据
            hyXnxtFlowLogs("文章发送给" + this.txtnextcyrname.Value + "阅读", "传阅");
            //--- 创建后续传阅记录+建立待办事宜 ---- end

            //--- 当前处理人的待办事宜转已办 ---- start
            Hyoa_dbsy.Dbsytoybbydocidtacheiduserid(this.txtdocid.Value, this.hy_curtacheid.Text, this.Session["hyuid"].ToString());
            //--- 当前处理人的待办事宜转已办 ---- end

            ls_tip = "文档已成功发送到[" + this.txtnexttachename.Value + "]环节";
            hylctjtscl(Hyoa_flowmain);//特殊处理
        }
        //收回
        if (this.txtwhichoperation.Value == "3")
        {
            //得到上个环节处理人
            HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
            DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value);
            if (dt_clinfo.Rows.Count > 1)
            {
                //删除当前处理人员的待办事宜
                HyoaClass.Hyoa_dbsy Hyoa_dbsy_sh = new HyoaClass.Hyoa_dbsy();
                Hyoa_dbsy_sh.DeleteByDocid_flowid_tacheid_userid(this.txtdocid.Value, dt_clinfo.Rows[0]["hy_flowid"].ToString(), dt_clinfo.Rows[0]["hy_tacheid"].ToString(), dt_clinfo.Rows[0]["hy_clrid"].ToString());

                string ls_lastclrid = dt_clinfo.Rows[1]["hy_clrid"].ToString();         //上个环节处理人ID
                string ls_lastclrname = dt_clinfo.Rows[1]["hy_clrname"].ToString();     //上个环节处理人中文名
                string ls_lastcldoc = dt_clinfo.Rows[1]["ID"].ToString();               //上个环节处理的记录ID
                string ls_lasttacheid = dt_clinfo.Rows[1]["hy_tacheid"].ToString();     //上个环节处理环节ID
                string ls_lasttachename = dt_clinfo.Rows[1]["hy_tachename"].ToString(); //上个环节处理环节名称
                string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString();                //当前处理的记录ID
                dt_clinfo.Clear();

                //删除当前处理的记录
                Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc;
                Hyoa_flowhistoryinfo_cl.Delete();
                //清空上个环节处理时间,更新创建时间
                Hyoa_flowhistoryinfo_cl.ID = ls_lastcldoc;
                Hyoa_flowhistoryinfo_cl.hy_clsj = "";
                Hyoa_flowhistoryinfo_cl.hy_createtime = System.DateTime.Now.ToString();
                Hyoa_flowhistoryinfo_cl.Update_sh();
                //更新主文档中的当前环节ID、当前环节名称、当前处理人ID和中文名
                Hyoa_flowmain.hy_curtacheid = ls_lasttacheid;
                Hyoa_flowmain.hy_curtachename = ls_lasttachename;
                Hyoa_flowmain.hy_curclrid = ls_lastclrid;
                Hyoa_flowmain.hy_curclrname = ls_lastclrname;

                ls_tip = "文档已成功收回到[" + ls_lasttachename + "]环节";
                //绩效考核日志
                hyXnxtFlowLogs("从" + this.hy_curtachename.Text + "环节收回到" + ls_lasttachename + "", "收回");
                hylcshtscl(Hyoa_flowmain);//特殊处理
            }
        }
        //退回
        if (this.txtwhichoperation.Value == "4")
        {
            //更新主文档
            Hyoa_flowmain.hy_curtacheid = this.txtnexttacheid.Value;
            Hyoa_flowmain.hy_curtachename = this.txtnexttachename.Value;
            Hyoa_flowmain.hy_curclrid = this.txtnextclrid.Value;
            Hyoa_flowmain.hy_curclrname = this.txtnextclrname.Value;

            //处理历史处理记录
            HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
            DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value);
            if (dt_clinfo.Rows.Count > 0)
            {
                string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString();                //当前处理的记录ID
                string ls_clsj = "";                                                    //当前处理的记录处理时间
                if (dt_clinfo.Rows[0]["hy_clsj"].ToString() == "")
                    ls_clsj = System.DateTime.Now.ToString();
                else
                    ls_clsj = dt_clinfo.Rows[0]["hy_clsj"].ToString() + "," + System.DateTime.Now.ToString();

                dt_clinfo.Clear();
                Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc;
                Hyoa_flowhistoryinfo_cl.hy_clsj = ls_clsj;
                Hyoa_flowhistoryinfo_cl.Update();
            }
            //新建一条处理记录
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            Hyoa_global.Saveflowhistoryinfo_cl_global(this.txtdocid.Value, this.hy_flowid.Text, this.hy_flowname.Text, this.txtnexttacheid.Value, this.txtnexttachename.Value, this.txtnextclrid.Value, this.txtnextclrname.Value, "", "", "", System.DateTime.Now.ToString(), "是");

            //处理待办事宜
            //转已办-当前处理人的待办事宜
            HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
            Hyoa_dbsy.Dbsytoybbydociduserid(this.txtdocid.Value, this.Session["hyuid"].ToString());

            //得到发送人手机号
            HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
            string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(this.Session["hyuid"].ToString());

            //(考虑多人的情况)
            string[] lv_dbrid = this.txtnextclrid.Value.Split(new Char[] { ',' });
            string[] lv_dbrname = this.txtnextclrname.Value.Split(new Char[] { ',' });

            for (var i = 0; i < lv_dbrid.Length; i++)
            {
                if (lv_dbrid[i].ToString() != "")
                {
                    //得到接收人手机号
                    string cb_jsrsjh = Hyoa_user.GetMobilebyuserid(lv_dbrid[i].ToString());
                    HyoaClass.Hyoa_global Hyoa_global2 = new HyoaClass.Hyoa_global();

                    //给退回到的处理人发送一个新的待办事宜(提醒)
                    Hyoa_global2.Senddbsy_global(this.txtdocid.Value, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), "/main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&pop=1", "待办", this.hy_mudelid.Text, "待办箱", "一般", this.hy_bt.Text, "请办理", 0, this.hy_flowid.Text, this.txtnexttacheid.Value);
                    //给退回到的处理人发送即时消息(提醒)
                    if (this.txtisSendjstx.Value == "1")
                    {
                        Hyoa_global.Sendjstx_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), this.hy_mudelid.Text, this.hy_bt.Text, 0);
                    }
                    //给退回到的处理人发送短信(提醒)
                    if (this.txtisSendsms.Value == "1")
                    {
                        Hyoa_global.Sendsms_global(this.txtdocid.Value, this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), cb_fsrsjh, lv_dbrid[i].ToString(), lv_dbrname[i].ToString(), cb_jsrsjh, this.hy_mudelid.Text, this.hy_bt.Text, 1, "", "", 0);
                    }
                }
            }
            //绩效考核写日志  add by wjs at 20150603
            hyXnxtFlowLogs("从" + this.hy_curtachename.Text + "环节退回到" + this.txtnexttachename.Value + "", "退回");

            ls_tip = "已成功退回到[" + this.txtnexttachename.Value + "]环节";
            hylcthtscl(Hyoa_flowmain);//特殊处理
        }
        //多人处理
        if (this.txtwhichoperation.Value == "5")
        {
            //更新主文档
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            string ls_newclrid = Hyoa_global.MoveOneString_dh(this.hy_curclrid.Text, this.Session["hyuid"].ToString());
            string ls_newclrname = Hyoa_global.MoveOneString_dh(this.hy_curclrname.Text, this.Session["hyuname"].ToString());
            Hyoa_flowmain.hy_curclrid = ls_newclrid;
            Hyoa_flowmain.hy_curclrname = ls_newclrname;
            //处理处理记录
            HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
            DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value);
            if (dt_clinfo.Rows.Count > 0)
            {
                string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString();                //当前处理的记录ID
                string ls_clsj = "";                                                    //当前处理的记录处理时间
                if (dt_clinfo.Rows[0]["hy_clsj"].ToString() == "")
                    ls_clsj = System.DateTime.Now.ToString();
                else
                    ls_clsj = dt_clinfo.Rows[0]["hy_clsj"].ToString() + "," + System.DateTime.Now.ToString();

                dt_clinfo.Clear();
                Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc;
                Hyoa_flowhistoryinfo_cl.hy_clsj = ls_clsj;
                Hyoa_flowhistoryinfo_cl.Update();

                //办公效率智能分析添加  add by wjs at 20150603
                hyXnxtFlowLogs("从" + this.hy_curtachename.Text + "环节提交到" + this.txtnexttachename.Value + "环节", "提交");
            }
            //处理待办事宜
            //转已办-当前处理人的待办事宜
            HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
            Hyoa_dbsy.Dbsytoybbydociduserid(this.txtdocid.Value, this.Session["hyuid"].ToString());

            ls_tip = "提交成功,当前环节还需要[" + ls_newclrname + "]进行办理";
            hylcdrcltscl(Hyoa_flowmain);//特殊处理
        }
        //催办
        if (this.txtwhichoperation.Value == "6")
        {
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();

            string cb_docid = this.txtdocid.Value;
            string cb_dbrid = this.hy_curclrid.Text;
            string cb_dbrname = this.hy_curclrname.Text;
            string cb_fsrid = this.Session["hyuid"].ToString();
            string cb_fsrname = this.Session["hyuname"].ToString();
            string cb_url = "main.aspx?op=modify&docid=" + this.txtdocid.Value + "&pop=1";
            string cb_property = "催办";
            string cb_mudelid = this.hy_mudelid.Text;
            string cb_foldername = "待办箱";
            string cb_hj = "一般";
            string cb_bt = this.txtcbideas.Value + "-" + this.hy_bt.Text;
            string cb_subbt = "请阅读";
            float cb_ifyb = 0;
            string cb_flowid = this.hy_flowid.Text;
            string cb_tacheid = this.hy_curtacheid.Text;
            string cb_from = this.hy_mudelid.Text;

            //得到发送人手机号
            HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
            string cb_fsrsjh = Hyoa_user.GetMobilebyuserid(cb_fsrid);
            //得到接收人手机号
            string cb_jsrsjh = Hyoa_user.GetMobilebyuserid(cb_dbrid);

            //给当前处理人发送一个新的待办事宜(提醒)
            Hyoa_global.Senddbsy_global(cb_docid, cb_dbrid, cb_dbrname, cb_fsrid, cb_fsrname, cb_url, cb_property, cb_mudelid, cb_foldername, cb_hj, cb_bt, cb_subbt, cb_ifyb, cb_flowid, cb_tacheid);
            //给当前处理人发送即时消息(提醒)
            if (this.txtisSendjstx.Value == "1")
            {
                Hyoa_global.Sendjstx_global(cb_docid, cb_fsrid, cb_fsrname, cb_dbrid, cb_dbrname, cb_from, cb_bt, 0);
            }
            //给当前处理人发送短信(提醒)
            if (this.txtisSendsms.Value == "1")
            {
                Hyoa_global.Sendsms_global(cb_docid, cb_fsrid, cb_fsrname, cb_fsrsjh, cb_dbrid, cb_dbrname, cb_jsrsjh, cb_from, cb_bt, 1, "", "", 0);
            }
            //绩效考核写日志  add by wjs at 20150603
            hyXnxtFlowLogs("催办" + this.hy_curtachename.Text + "环节", "催办");
            ls_tip = "催办成功!";
            hylccbtscl(Hyoa_flowmain);//特殊处理
        }

        //流程结束时的提交
        if (this.txtwhichoperation.Value == "7")
        {
            //更新主文档
            Hyoa_flowmain.hy_curtacheid = "**";
            Hyoa_flowmain.hy_curtachename = "结束";
            Hyoa_flowmain.hy_curclrid = "";
            Hyoa_flowmain.hy_curclrname = "";
            //更新处理表
            HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
            DataTable dt_clinfo = Hyoa_flowhistoryinfo_cl.Getflowhistoryinfo_clsbydocid(this.txtdocid.Value);
            if (dt_clinfo.Rows.Count > 0)
            {
                string ls_curcldoc = dt_clinfo.Rows[0]["ID"].ToString();                //当前处理的记录ID
                string ls_clsj = "";                                                    //当前处理的记录处理时间
                if (dt_clinfo.Rows[0]["hy_clsj"].ToString() == "")
                    ls_clsj = System.DateTime.Now.ToString();
                else
                    ls_clsj = dt_clinfo.Rows[0]["hy_clsj"].ToString() + "," + System.DateTime.Now.ToString();

                dt_clinfo.Clear();
                Hyoa_flowhistoryinfo_cl.ID = ls_curcldoc;
                Hyoa_flowhistoryinfo_cl.hy_clsj = ls_clsj;
                Hyoa_flowhistoryinfo_cl.Update();
            }
            ////流程结束时删除所有该文档对应的待办事宜
            //HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
            //Hyoa_dbsy.Deletebydocid(this.txtdocid.Value);

            //处理待办事宜
            //转已办-当前处理人的待办事宜
            HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
            Hyoa_dbsy.Dbsytoybbydociduserid(this.txtdocid.Value, this.Session["hyuid"].ToString());

            ls_tip = "流程结束!";
            hylcjstscl(Hyoa_flowmain);//特殊处理
            hyXnxtFlowLogs("流程结束,文件已归档", "归档");
            if (this.hy_tableid.Text == "1a564b74-3d94-4cef-bb94-f0c0342ae8dd")
            {
                string strAuthor = "";
                string strAuthorDept = "";
                if (this.hy_field2.Text != "")
                {
                    strAuthor += this.hy_field2.Text + ",";
                }
                if (this.hy_field3.Text != "")
                {
                    strAuthorDept += this.hy_field3.Text + ",";
                }
                if (this.hy_field4.Text != "")
                {
                    strAuthor += this.hy_field4.Text + ",";
                }
                if (this.hy_field5.Text != "")
                {
                    strAuthorDept += this.hy_field5.Text + ",";
                }
                if (this.hy_field6.Text != "")
                {
                    strAuthor += this.hy_field6.Text + ",";
                }
                if (this.hy_field7.Text != "")
                {
                    strAuthorDept += this.hy_field7.Text + ",";
                }
                hyXnxtMessageLogs("通过", "通过一篇文章", strAuthor, strAuthorDept);
            }
        }

        Hyoa_flowmain.Update();

        ////处理完成后的提示及跳转(增加刷新附件功能)
        if (this.txtifsxfj.Text == "1")
        {
            //Response.Write("<script>window.location='/main.aspx?op=modify&mid="+this.hy_mudelid.Text+"&tableid="+this.hy_tableid.Text+"&docid="+this.txtdocid.Value+"&url="+this.txturl.Value+"'</script>");
            Response.Write("<script>window.location='/main.aspx?op=modify&mid=" + this.hy_mudelid.Text + "&tableid=" + this.hy_tableid.Text + "&docid=" + this.txtdocid.Value + "&url=" + this.txturl.Value + "'</script>");
        }
        else
        {
            if (this.txtifpop.Value == "")
            {
                Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
            }
            else
            {
                Response.Write("<script>alert('" + ls_tip + "');window.opener.location.reload();window.opener=null;window.open('','_self');window.close();</script>");
            }
        }
    }
    //输出群组
    private void Hy_showgroup(string ls_users)
    {
        //得到群组名称
        HyoaClass.Hyoa_group Hyoa_group = new HyoaClass.Hyoa_group();
        HyoaClass.Hyoa_groupuser Hyoa_groupuser = new HyoaClass.Hyoa_groupuser();
        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
        DataTable dt = Hyoa_group.Getgroups();
        if (dt.Rows.Count > 0)
        {
            for (var i = 0; i < dt.Rows.Count; i++)
            {
                //输出群组名称
                Response.Write("<dd class=\"folderClose\">");
                Response.Write("<input type=\"checkbox\" name=\"Group" + dt.Rows[i]["hy_groupid"].ToString() + "\" value=\"" + dt.Rows[i]["hy_groupid"].ToString() + "\">");
                Response.Write(dt.Rows[i]["hy_groupname"].ToString());
                Response.Write("<dl>");
                //输出人员
                DataTable dtuser = Hyoa_groupuser.Getgroupusersbygroupid(dt.Rows[i]["hy_groupid"].ToString());
                if (dtuser.Rows.Count > 0)
                {
                    for (var j = 0; j < dtuser.Rows.Count; j++)
                    {
                        DataTable dt_username = Hyoa_user.Getuserallinfo(dtuser.Rows[j]["hy_userid"].ToString());
                        Response.Write("<dt>");
                        //判断已选中
                        if (ls_users.Contains("," + dtuser.Rows[j]["hy_userid"].ToString() + ","))
                        {
                            Response.Write("<input type=\"checkbox\" checked=\"checked\" name=\"GroupUser" + dtuser.Rows[j]["hy_userid"].ToString() + "_subuser\" value=\"");
                            Response.Write(dtuser.Rows[j]["hy_userid"].ToString() + "|" + dt_username.Rows[0]["hy_username"].ToString() + "\" text=\"" + dt_username.Rows[0]["hy_username"].ToString() + "\">");
                            Response.Write(dt_username.Rows[0]["hy_username"].ToString());
                            Response.Write("</dt>");
                        }
                        else
                        {
                            Response.Write("<input type=\"checkbox\" name=\"GroupUser" + dtuser.Rows[j]["hy_userid"].ToString() + "_subuser\" value=\"");
                            Response.Write(dtuser.Rows[j]["hy_userid"].ToString() + "|" + dt_username.Rows[0]["hy_username"].ToString() + "\" text=\"" + dt_username.Rows[0]["hy_username"].ToString() + "\">");
                            Response.Write(dt_username.Rows[0]["hy_username"].ToString());
                            Response.Write("</dt>");
                        }
                    }
                }

                //输出一级部门尾部
                Response.Write("</dl>");
                Response.Write("</dd>");
            }
        }
    }
示例#25
0
    protected void Hy_nexttachename_SelectedIndexChanged(object sender, EventArgs e)
    {
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        //后序环节处理人部门
        HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
        DataTable dt = new DataTable();
        //先清空
        this.Hy_deptlist_clr.DataSource = dt;
        this.Hy_deptlist_clr.DataTextField = "hy_deptname";
        this.Hy_deptlist_clr.DataValueField = "hy_deptid";
        this.Hy_deptlist_clr.DataBind();
        //先得到后续环节处理人集合
        DataTable dt_nextflowuser = Hyoa_flowtacheuser.Getflowtacheusersbyflowidtacheid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString());
        if (dt_nextflowuser.Rows.Count > 0)
        {
            string ls_temp1 = "";
            for (int i = 0; i < dt_nextflowuser.Rows.Count; i++)
            {
                ls_temp1 += "," + dt_nextflowuser.Rows[i]["hy_userid"].ToString();
            }
            ls_temp1 += ",";
            string sql = "";
            if (Session["conntype"].ToString() == "SQL")
            {
                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' order by a.hy_deptsort,b.hy_sort";
            }
            if (Session["conntype"].ToString() == "ORACLE")
            {
                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') order by a.hy_deptsort,b.hy_sort";
            }
            dt = Hyoa_global.GetDataTable_USER(sql);
            if (dt.Rows.Count > 0)
            {
                this.Hy_deptlist_clr.Items.Insert(0, "--请选择--");
                ls_temp1 = "";
                int t = 1;
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    if ((ls_temp1 + ",").Contains("," + dt.Rows[i]["hy_deptid"].ToString() + ","))
                    {
                    }
                    else
                    {
                        //解决多级部门后续提交时部门显示的问题  added by xf 20131226
                        string ls_deptname = "";
                        if (dt.Rows[i]["hy_deptid"].ToString().Length == 3)
                        {
                            ls_deptname = dt.Rows[i]["hy_deptname"].ToString();
                        }
                        else
                        {
                            ls_deptname = GetAllDeptNameByDeptId(dt.Rows[i]["hy_deptid"].ToString());
                        }
                        this.Hy_deptlist_clr.Items.Insert(t, new ListItem(ls_deptname, dt.Rows[i]["hy_deptid"].ToString()));
                        t += 1;
                        ls_temp1 += "," + dt.Rows[i]["hy_deptid"].ToString();
                    }
                }
                this.Hy_deptlist_clr.SelectedIndex = 0;
            }
        }
        dt.Clear();
        //后序环节传阅人员部门
        //先清空
        this.Hy_deptlist.DataSource = dt;
        this.Hy_deptlist.DataTextField = "hy_deptname";
        this.Hy_deptlist.DataValueField = "hy_deptid";
        this.Hy_deptlist.DataBind();
        HyoaClass.Hyoa_dept Hyoa_dept = new HyoaClass.Hyoa_dept();
        dt = Hyoa_dept.Getdepts();
        if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                //解决多级部门后续提交时部门显示的问题  added by xf 20131226
                string ls_deptname = "";
                if (dt.Rows[i]["hy_deptid"].ToString().Length == 3)
                {
                    ls_deptname = dt.Rows[i]["hy_deptname"].ToString();
                }
                else
                {
                    ls_deptname = GetAllDeptNameByDeptId(dt.Rows[i]["hy_deptid"].ToString());
                }
                this.Hy_deptlist.Items.Insert(i, new ListItem(ls_deptname, dt.Rows[i]["hy_deptid"].ToString()));
            }
            this.Hy_deptlist.SelectedIndex = 0;
        }
        dt.Clear();
        //后序环节处理人员
        //先得到后续环节处理人集合
        //先清空
        this.Hy_hjclr.DataSource = dt;
        this.Hy_hjclr.DataTextField = "hy_username";
        this.Hy_hjclr.DataValueField = "hy_userid";
        this.Hy_hjclr.DataBind();
        dt_nextflowuser.Clear();
        dt_nextflowuser = Hyoa_flowtacheuser.Getflowtacheusersbyflowidtacheid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString());
        if (dt_nextflowuser.Rows.Count > 0)
        {
            string ls_temp1 = "";
            for (int i = 0; i < dt_nextflowuser.Rows.Count; i++)
            {
                ls_temp1 += "," + dt_nextflowuser.Rows[i]["hy_userid"].ToString();
            }
            ls_temp1 += ",";
            string sql = "";
            if (this.Hy_deptlist_clr.SelectedValue.ToString() == "--请选择--")
            {
                if (Session["conntype"].ToString() == "SQL")
                {
                    sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' order by a.hy_deptsort,b.hy_sort";
                }
                if (Session["conntype"].ToString() == "ORACLE")
                {
                    sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') order by a.hy_deptsort,b.hy_sort";
                }
            }
            else
            {
                if (Session["conntype"].ToString() == "SQL")
                {
                    sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                }
                if (Session["conntype"].ToString() == "ORACLE")
                {
                    sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                }
            }
            dt = Hyoa_global.GetDataTable_USER(sql);
            if (dt.Rows.Count > 0)
            {
                ls_temp1 = "";
                int t = 0;
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    if ((ls_temp1 + ",").Contains("," + dt.Rows[i]["hy_userid"].ToString() + ","))
                    {
                    }
                    else
                    {
                        this.Hy_hjclr.Items.Insert(t, new ListItem(dt.Rows[i]["hy_username"].ToString(), dt.Rows[i]["hy_userid"].ToString()));
                        t += 1;
                        ls_temp1 += "," + dt.Rows[i]["hy_userid"].ToString();
                    }
                }
            }
        }
        dt.Clear();
        //后序环节传阅人员
        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
        dt = Hyoa_user.Getusersbydeptid(this.Hy_deptlist.SelectedValue.ToString());
        if (dt.Rows.Count > 0)
        {
            this.Hy_rylist.DataSource = dt;
            this.Hy_rylist.DataTextField = "hy_username";
            this.Hy_rylist.DataValueField = "hy_userid";
            this.Hy_rylist.DataBind();
        }
        dt.Clear();
        //得到 后续环节的默认环节 对应的 提醒默认值,然后进行赋值
        string ls_temp_tacheid = this.Hy_nexttachename.SelectedValue.ToString();
        HyoaClass.Hyoa_flowtache Hyoa_flowtache = new HyoaClass.Hyoa_flowtache();
        DataTable dt_getrddoissendsmsandmsg = Hyoa_flowtache.Getflowtachebyflowidtacheid(this.txtflowid.Text, ls_temp_tacheid);
        if (dt_getrddoissendsmsandmsg.Rows.Count > 0)
        {
            if (dt_getrddoissendsmsandmsg.Rows[0]["hy_rdDoIsSendSms"].ToString() == "是")
                this.f_isSendsms_clr.Checked = true;
            else
                this.f_isSendsms_clr.Checked = false;

            if (dt_getrddoissendsmsandmsg.Rows[0]["hy_rdDoIsSendMessage"].ToString() == "是")
                this.f_isSendjstx_clr.Checked = true;
            else
                this.f_isSendjstx_clr.Checked = false;

            if (dt_getrddoissendsmsandmsg.Rows[0]["hy_rdPassIsSendSms"].ToString() == "是")
                this.f_isSendsms_cyr.Checked = true;
            else
                this.f_isSendsms_cyr.Checked = false;

            if (dt_getrddoissendsmsandmsg.Rows[0]["hy_rdPassIsSendMessage"].ToString() == "是")
                this.f_isSendjstx_cyr.Checked = true;
            else
                this.f_isSendjstx_cyr.Checked = false;

            this.txthy_ifshowcurcomp.Text = dt_getrddoissendsmsandmsg.Rows[0]["hy_ifshowcurcomp"].ToString();
            this.txthy_ifshowcurdept.Text = dt_getrddoissendsmsandmsg.Rows[0]["hy_ifshowcurdept"].ToString();
        }

        //----考虑只显示本单位的情况start-----
        if (this.txthy_ifshowcurcomp.Text == "是")
        {
            DataTable tempTable = new DataTable();
            DataColumn col = new DataColumn("value1", typeof(String)); //定义新的一列
            tempTable.Columns.Add(col);  //追加一列  add
            DataColumn col2 = new DataColumn("value2", typeof(String)); //定义新的一列
            tempTable.Columns.Add(col2);  //追加一列  add

            //更新部门
            for (var j = 0; j < this.Hy_deptlist_clr.Items.Count; j++)
            {
                string ls_dept1 = this.Hy_deptlist_clr.Items[j].Value;
                ls_dept1 = ls_dept1.Substring(0, 3);
                string ls_curdept = Session["hydeptid"].ToString();
                ls_curdept = ls_curdept.Substring(0, 3);

                if (ls_dept1 == ls_curdept)
                {
                    DataRow dr = tempTable.NewRow();
                    dr["value1"] = Hy_deptlist_clr.Items[j].Text;
                    dr["value2"] = Hy_deptlist_clr.Items[j].Value;
                    tempTable.Rows.Add(dr);
                }
            }
            //先清空
            this.Hy_deptlist_clr.Items.Clear();

            this.Hy_deptlist_clr.DataSource = tempTable;
            this.Hy_deptlist_clr.DataTextField = "value1";
            this.Hy_deptlist_clr.DataValueField = "value2";
            this.Hy_deptlist_clr.DataBind();

            this.Hy_hjclr.Items.Clear();

            //在调用这个部门对应的人员
            //先得到后续环节处理人集合
            dt_nextflowuser.Clear();
            dt_nextflowuser = Hyoa_flowtacheuser.Getflowtacheusersbyflowidtacheid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString());
            if (dt_nextflowuser.Rows.Count > 0)
            {
                string ls_temp1 = "";
                for (int i = 0; i < dt_nextflowuser.Rows.Count; i++)
                {
                    ls_temp1 += "," + dt_nextflowuser.Rows[i]["hy_userid"].ToString();
                }
                ls_temp1 += ",";
                string sql = "";
                if (this.Hy_deptlist_clr.SelectedValue.ToString() == "--请选择--")
                {
                    if (Session["conntype"].ToString() == "SQL")
                    {
                        sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' order by a.hy_deptsort,b.hy_sort";
                    }
                    if (Session["conntype"].ToString() == "ORACLE")
                    {
                        sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') order by a.hy_deptsort,b.hy_sort";
                    }
                }
                else
                {
                    if (Session["conntype"].ToString() == "SQL")
                    {
                        sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                    }
                    if (Session["conntype"].ToString() == "ORACLE")
                    {
                        sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                    }
                }
                dt = Hyoa_global.GetDataTable_USER(sql);
                if (dt.Rows.Count > 0)
                {
                    ls_temp1 = "";
                    int t = 0;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        if ((ls_temp1 + ",").Contains("," + dt.Rows[i]["hy_userid"].ToString() + ","))
                        {
                        }
                        else
                        {
                            this.Hy_hjclr.Items.Insert(t, new ListItem(dt.Rows[i]["hy_username"].ToString(), dt.Rows[i]["hy_userid"].ToString()));
                            t += 1;
                            ls_temp1 += "," + dt.Rows[i]["hy_userid"].ToString();
                        }
                    }
                }
            }
            dt.Clear();
        }
        //----考虑只显示本单位的情况end-------

        //----考虑只显示和登记人同单位的情况start-----
        if (this.txthy_ifshowcurcomp.Text == "和登记人同单位")
        {
            if (Request.QueryString["docid"] != null)
            {
                //得到登记人的部门ID
                string ls_djrbmid = "";
                string sql = "select * from hyc_" + this.txttableid.Text + " where DOCID='" + Request.QueryString["docid"].ToString() + "'";
                DataTable dt_flowmain = Hyoa_global.GetDataTable(sql);
                if (dt_flowmain.Rows.Count > 0)
                {
                    ls_djrbmid = dt_flowmain.Rows[0]["hy_djrbmid"].ToString();

                    DataTable tempTable = new DataTable();
                    DataColumn col = new DataColumn("value1", typeof(String)); //定义新的一列
                    tempTable.Columns.Add(col);  //追加一列  add
                    DataColumn col2 = new DataColumn("value2", typeof(String)); //定义新的一列
                    tempTable.Columns.Add(col2);  //追加一列  add

                    //更新部门
                    for (var j = 0; j < this.Hy_deptlist_clr.Items.Count; j++)
                    {
                        string ls_dept1 = this.Hy_deptlist_clr.Items[j].Value;
                        if (ls_dept1.Substring(0, 3) == ls_djrbmid.Substring(0, 3))
                        {
                            DataRow dr = tempTable.NewRow();
                            dr["value1"] = Hy_deptlist_clr.Items[j].Text;
                            dr["value2"] = Hy_deptlist_clr.Items[j].Value;
                            tempTable.Rows.Add(dr);
                        }
                    }
                    //先清空
                    this.Hy_deptlist_clr.Items.Clear();

                    this.Hy_deptlist_clr.DataSource = tempTable;
                    this.Hy_deptlist_clr.DataTextField = "value1";
                    this.Hy_deptlist_clr.DataValueField = "value2";
                    this.Hy_deptlist_clr.DataBind();

                    this.Hy_hjclr.Items.Clear();

                    //在调用这个部门对应的人员
                    dt_nextflowuser.Clear();
                    dt_nextflowuser = Hyoa_flowtacheuser.Getflowtacheusersbyflowidtacheid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString());
                    if (dt_nextflowuser.Rows.Count > 0)
                    {
                        string ls_temp1 = "";
                        for (int i = 0; i < dt_nextflowuser.Rows.Count; i++)
                        {
                            ls_temp1 += "," + dt_nextflowuser.Rows[i]["hy_userid"].ToString();
                        }
                        ls_temp1 += ",";
                        if (this.Hy_deptlist_clr.SelectedValue.ToString() == "--请选择--")
                        {
                            if (Session["conntype"].ToString() == "SQL")
                            {
                                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' order by a.hy_deptsort,b.hy_sort";
                            }
                            if (Session["conntype"].ToString() == "ORACLE")
                            {
                                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') order by a.hy_deptsort,b.hy_sort";
                            }
                        }
                        else
                        {
                            if (Session["conntype"].ToString() == "SQL")
                            {
                                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                            }
                            if (Session["conntype"].ToString() == "ORACLE")
                            {
                                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                            }
                        }
                        dt = Hyoa_global.GetDataTable_USER(sql);
                        if (dt.Rows.Count > 0)
                        {
                            ls_temp1 = "";
                            int t = 0;
                            for (int i = 0; i < dt.Rows.Count; i++)
                            {
                                if ((ls_temp1 + ",").Contains("," + dt.Rows[i]["hy_userid"].ToString() + ","))
                                {
                                }
                                else
                                {
                                    this.Hy_hjclr.Items.Insert(t, new ListItem(dt.Rows[i]["hy_username"].ToString(), dt.Rows[i]["hy_userid"].ToString()));
                                    t += 1;
                                    ls_temp1 += "," + dt.Rows[i]["hy_userid"].ToString();
                                }
                            }
                        }
                    }
                    dt.Clear();
                }
            }
        }
        //----考虑只显示和登记人同单位的情况end-------

        //----考虑只显示登记人的分管领导的情况start-----
        if (this.txthy_ifshowcurcomp.Text == "登记人的分管领导")
        {
            if (Request.QueryString["docid"] != null)
            {
                //得到登记人的部门ID
                string ls_djrbmid = "";
                string sql = "select * from hyc_" + this.txttableid.Text + " where DOCID='" + Request.QueryString["docid"].ToString() + "'";
                DataTable dt_flowmain = Hyoa_global.GetDataTable(sql);
                if (dt_flowmain.Rows.Count > 0)
                {
                    ls_djrbmid = dt_flowmain.Rows[0]["hy_djrbmid"].ToString();

                    DataTable tempTable = new DataTable();
                    DataColumn col = new DataColumn("value1", typeof(String)); //定义新的一列
                    tempTable.Columns.Add(col);  //追加一列  add
                    DataColumn col2 = new DataColumn("value2", typeof(String)); //定义新的一列
                    tempTable.Columns.Add(col2);  //追加一列  add

                    //更新部门
                    for (var j = 0; j < this.Hy_deptlist_clr.Items.Count; j++)
                    {
                        string ls_dept1 = this.Hy_deptlist_clr.Items[j].Value;
                        if (ls_dept1.Substring(3) == ls_djrbmid.Substring(3))
                        {
                            DataRow dr = tempTable.NewRow();
                            dr["value1"] = Hy_deptlist_clr.Items[j].Text;
                            dr["value2"] = Hy_deptlist_clr.Items[j].Value;
                            tempTable.Rows.Add(dr);
                        }
                    }
                    //先清空
                    this.Hy_deptlist_clr.Items.Clear();

                    this.Hy_deptlist_clr.DataSource = tempTable;
                    this.Hy_deptlist_clr.DataTextField = "value1";
                    this.Hy_deptlist_clr.DataValueField = "value2";
                    this.Hy_deptlist_clr.DataBind();

                    this.Hy_hjclr.Items.Clear();

                    //在调用这个部门对应的人员
                    dt_nextflowuser.Clear();
                    dt_nextflowuser = Hyoa_flowtacheuser.Getflowtacheusersbyflowidtacheid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString());
                    if (dt_nextflowuser.Rows.Count > 0)
                    {
                        string ls_temp1 = "";
                        for (int i = 0; i < dt_nextflowuser.Rows.Count; i++)
                        {
                            ls_temp1 += "," + dt_nextflowuser.Rows[i]["hy_userid"].ToString();
                        }
                        ls_temp1 += ",";
                        if (this.Hy_deptlist_clr.SelectedValue.ToString() == "--请选择--")
                        {
                            if (Session["conntype"].ToString() == "SQL")
                            {
                                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' order by a.hy_deptsort,b.hy_sort";
                            }
                            if (Session["conntype"].ToString() == "ORACLE")
                            {
                                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') order by a.hy_deptsort,b.hy_sort";
                            }
                        }
                        else
                        {
                            if (Session["conntype"].ToString() == "SQL")
                            {
                                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                            }
                            if (Session["conntype"].ToString() == "ORACLE")
                            {
                                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                            }
                        }
                        dt = Hyoa_global.GetDataTable_USER(sql);
                        if (dt.Rows.Count > 0)
                        {
                            ls_temp1 = "";
                            int t = 0;
                            for (int i = 0; i < dt.Rows.Count; i++)
                            {
                                if ((ls_temp1 + ",").Contains("," + dt.Rows[i]["hy_userid"].ToString() + ","))
                                {
                                }
                                else
                                {
                                    this.Hy_hjclr.Items.Insert(t, new ListItem(dt.Rows[i]["hy_username"].ToString(), dt.Rows[i]["hy_userid"].ToString()));
                                    t += 1;
                                    ls_temp1 += "," + dt.Rows[i]["hy_userid"].ToString();
                                }
                            }
                        }
                    }
                    dt.Clear();
                }
            }
        }
        //----考虑只显示登记人的分管领导的情况end-------

        //----只显示登记人start-----
        if (this.txthy_ifshowcurdept.Text == "只显示登记人")
        {
            if (Request.QueryString["docid"] != null)
            {
                string sql = "select * from hyc_" + this.txttableid.Text + " where DOCID='" + Request.QueryString["docid"].ToString() + "'";
                DataTable dt_flowmain = Hyoa_global.GetDataTable(sql);
                if (dt_flowmain.Rows.Count > 0)
                {
                    //先清空
                    this.Hy_deptlist_clr.Items.Clear();
                    Hy_deptlist_clr.Items.Insert(0, new ListItem(dt_flowmain.Rows[0]["hy_djrbmname"].ToString(), dt_flowmain.Rows[0]["hy_djrbmid"].ToString()));

                    //先清空
                    this.Hy_hjclr.Items.Clear();
                    Hy_hjclr.Items.Insert(0, new ListItem(dt_flowmain.Rows[0]["hy_djrname"].ToString(), dt_flowmain.Rows[0]["hy_djrid"].ToString()));
                }
            }
        }
        //----只显示登记人end-------

        //----只显示当前用户本部门人员start-----
        if (this.txthy_ifshowcurdept.Text == "是")
        {
            if (Request.QueryString["docid"] != null)
            {
                DataTable tempTable = new DataTable();
                DataColumn col = new DataColumn("value1", typeof(String)); //定义新的一列
                tempTable.Columns.Add(col);  //追加一列  add
                DataColumn col2 = new DataColumn("value2", typeof(String)); //定义新的一列
                tempTable.Columns.Add(col2);  //追加一列  add
                //更新部门
                for (var j = 0; j < this.Hy_deptlist_clr.Items.Count; j++)
                {
                    string ls_dept1 = this.Hy_deptlist_clr.Items[j].Value;
                    if (ls_dept1 == Session["hydeptid"].ToString())
                    {
                        DataRow dr = tempTable.NewRow();
                        dr["value1"] = Hy_deptlist_clr.Items[j].Text;
                        dr["value2"] = Hy_deptlist_clr.Items[j].Value;
                        tempTable.Rows.Add(dr);
                    }
                }
                //先清空
                this.Hy_deptlist_clr.Items.Clear();

                this.Hy_deptlist_clr.DataSource = tempTable;
                this.Hy_deptlist_clr.DataTextField = "value1";
                this.Hy_deptlist_clr.DataValueField = "value2";
                this.Hy_deptlist_clr.DataBind();

                this.Hy_hjclr.Items.Clear();

                //在调用这个部门对应的人员
                dt_nextflowuser.Clear();
                dt_nextflowuser = Hyoa_flowtacheuser.Getflowtacheusersbyflowidtacheid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString());
                if (dt_nextflowuser.Rows.Count > 0)
                {
                    string ls_temp1 = "";
                    for (int i = 0; i < dt_nextflowuser.Rows.Count; i++)
                    {
                        ls_temp1 += "," + dt_nextflowuser.Rows[i]["hy_userid"].ToString();
                    }
                    ls_temp1 += ",";
                    string sql = "";
                    if (this.Hy_deptlist_clr.SelectedValue.ToString() == "--请选择--")
                    {
                        if (Session["conntype"].ToString() == "SQL")
                        {
                            sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' order by a.hy_deptsort,b.hy_sort";
                        }
                        if (Session["conntype"].ToString() == "ORACLE")
                        {
                            sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') order by a.hy_deptsort,b.hy_sort";
                        }
                    }
                    else
                    {
                        if (Session["conntype"].ToString() == "SQL")
                        {
                            sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                        }
                        if (Session["conntype"].ToString() == "ORACLE")
                        {
                            sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                        }
                    }
                    dt = Hyoa_global.GetDataTable_USER(sql);
                    if (dt.Rows.Count > 0)
                    {
                        ls_temp1 = "";
                        int t = 0;
                        for (int i = 0; i < dt.Rows.Count; i++)
                        {
                            if ((ls_temp1 + ",").Contains("," + dt.Rows[i]["hy_userid"].ToString() + ","))
                            {
                            }
                            else
                            {
                                this.Hy_hjclr.Items.Insert(t, new ListItem(dt.Rows[i]["hy_username"].ToString(), dt.Rows[i]["hy_userid"].ToString()));
                                t += 1;
                                ls_temp1 += "," + dt.Rows[i]["hy_userid"].ToString();
                            }
                        }
                    }
                }
                dt.Clear();
            }
        }
        //----只显示当前用户本部门人员end-------
    }
示例#26
0
 protected void btnsqlogin_Click(object sender, EventArgs e)
 {
     HyoaClass.Hyoa_user Users = new HyoaClass.Hyoa_user();
         DataTable dt = Users.Getuserallinfo(this.rdsqyh.SelectedValue);
         if (dt.Rows.Count > 0)
         {
             Session["hyuid"] = this.rdsqyh.SelectedValue;
             Session["hyuname"] = dt.Rows[0]["hy_username"].ToString();
             Session["hydeptid"] = dt.Rows[0]["hy_deptid"].ToString();
             Session["hydeptname"] = dt.Rows[0]["hy_deptname"].ToString();
             this.Response.Redirect(this.lblurl.Text);
         }
         dt.Clear();
 }
示例#27
0
    //protected string IPlimted()
    //{
    //IP限制
    //string lscurip, configip, lsflag;
    //lsflag = "0";
    //lscurip = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
    ////return;
    //MagicPortalClass.DAO dbconfigip = new MagicPortalClass.DAO();
    //DataTable dtconfigip = dbconfigip.GetDataTable("select * from JpConfig where fdtype='ip'");
    //configip = dtconfigip.Rows[0]["fdname"].ToString();
    //dtconfigip.Clear();
    //dbconfigip.Close();
    //string[] lvconfigip = configip.Split(',');
    //for (var i = 0; i < lvconfigip.Length; i++)
    //{
    //    if (lvconfigip[i].Contains("-") == true)
    //    {
    //        string[] lvconfigipsub = lvconfigip[i].Split('-');
    //        string[] lvconfigipsub1 = lvconfigipsub[0].Split('.');
    //        string[] lvconfigipsub2 = lvconfigipsub[1].Split('.');
    //        string[] lvcurip = lscurip.Split('.');
    //        if (lvcurip[0] == lvconfigipsub1[0] & lvcurip[1] == lvconfigipsub1[1] & lvcurip[2] == lvconfigipsub1[2] & lvcurip[0] == lvconfigipsub2[0] & lvcurip[1] == lvconfigipsub2[1] & lvcurip[2] == lvconfigipsub2[2])
    //        {
    //            if ((int.Parse(lvcurip[3]) >= int.Parse(lvconfigipsub1[3]) & int.Parse(lvcurip[3]) <= int.Parse(lvconfigipsub2[3])))
    //            {
    //                lsflag = "1";
    //                break;
    //            }
    //            else
    //            {
    //                continue;
    //            }
    //        }
    //        else
    //        {
    //            continue;
    //        }
    //    }
    //    else
    //    {
    //        if (lvconfigip[i] == lscurip)
    //        {
    //            lsflag = "1";
    //            break;
    //        }
    //    }
    //}
    //return lsflag;
    ////this.aaaa.Value = lscurip;
    ///////////IP限制结束
    //}
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        //if (Session["checkcode"].ToString().Equals(this.txt_checkcode.Value))
        //{
            String password = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(this.txt_password.Value, "MD5");
            HyoaClass.Hyoa_user Users = new HyoaClass.Hyoa_user();
            //Response.Write("<script>alert('aaaa');</script>");
            if (Users.Login(this.txt_username.Value, password))
            {
               // Response.Write("<script>alert('bbb');</script>");
                DataTable dt = Users.Getuserallinfo(this.txt_username.Value);
                if (dt.Rows.Count > 0)
                {
                    Session["hyuid"] = this.txt_username.Value;
                    Session["hyuname"] = dt.Rows[0]["hy_username"].ToString();
                    Session["hydeptid"] = dt.Rows[0]["hy_deptid"].ToString();
                    Session["hydeptname"] = dt.Rows[0]["hy_deptname"].ToString();

                    //登录日志 start
                    string ls_oppcontent = this.Session["hyuname"].ToString() + "登录";
                    HyoaClass.Hyoa_log Hyoa_log = new HyoaClass.Hyoa_log();
                    Hyoa_log.ID = System.Guid.NewGuid().ToString();
                    Hyoa_log.hy_createtime = System.DateTime.Now.ToString();
                    string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
                    if (userip == null || userip == "")
                    {
                        userip = Request.ServerVariables["REMOTE_ADDR"];
                    }
                    Hyoa_log.hy_oppip = userip;
                    Hyoa_log.hy_opptype = "登录";
                    Hyoa_log.hy_oppcontent = ls_oppcontent;
                    Hyoa_log.hy_oppuserid = this.Session["hyuid"].ToString();
                    Hyoa_log.hy_oppusername = this.Session["hyuname"].ToString();
                    Hyoa_log.Insert();
                    //登录日志 end

                    HyoaClass.Hyoa_license Hyoa_license = new HyoaClass.Hyoa_license();
                    DataTable dtlicense = Hyoa_license.Getlicensesbybsquseridanddate(this.Session["hyuid"].ToString());

                    if (dtlicense.Rows.Count > 0)
                    {
                        this.rdsqyh.DataSource = dtlicense;
                        this.rdsqyh.DataTextField = "hy_sqrname";
                        this.rdsqyh.DataValueField = "hy_sqrid";
                        this.rdsqyh.DataBind();
                        this.rdsqyh.Items.Insert(0, new ListItem(this.Session["hyuname"].ToString(), this.Session["hyuid"].ToString()));
                        this.rdsqyh.SelectedIndex = 0;
                        this.table3.Visible = true;
                    }
                    else
                    {
                        this.Response.Redirect(this.lblurl.Text);
                    }

                }
                dt.Clear();
            }
            else
            {
                this.RegisterClientScriptBlock("scripterror", "<script language=javascript>alert('输入的用户名或者密码不正确!')</script>");
                return;
            }
    }
示例#28
0
    //发布投票add by fy 2014-02-23
    protected void Button_Pub_Click(object sender, EventArgs e)
    {
        //发布投票时发送邮件给参与投票人
        HyoaClass.DAO db = new HyoaClass.DAO();
        HyoaClass.Hyoa_mail Hyoa_mail = new HyoaClass.Hyoa_mail();
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
        string ls_yqmlists = "";

        if (this.hy_field43.Text == "")
        {
            //从人员库中读取人员
            DataTable dt = Hyoa_user.GetusersOrderbydeptsortandusersort();
            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    string ls_jsrid = dt.Rows[i]["hy_userid"].ToString();
                    string ls_jsrname = dt.Rows[i]["hy_username"].ToString();
                    string ls_yqm = "";
                    string ls_yqms = GetRandom3();
                    if (ls_jsrid == "admin")
                    {
                        ls_yqm = "000" + ls_yqms;
                    }
                    else
                    {
                        ls_yqm = ls_jsrid.Substring(ls_jsrid.Length - 3) + ls_yqms;  //获得6位数字的随机数
                    }
                    //string ls_dburl = "/wstp.aspx?yqm=" + ls_yqm + "&rnd=" + Hyoa_global.GetRandom();
                    string ls_dburl = "/wstp.aspx?rnd=" + Hyoa_global.GetRandom();
                    string ls_body = this.Session["hyuname"].ToString() + "发起投票,您的投票邀请码为:" + ls_yqm + "。<a href=" + ls_dburl + " target=\"_blank\">请点击进入</a>";
                    String ls_sql = "insert into hyt_mail(ID,DOCID,hy_type,hy_foldername,hy_fsrid,hy_fsrname,hy_jsrid,hy_wbjsrid,hy_jsrname,hy_title,hy_body,hy_datetime,hy_ifsavetofjx,hy_yxj,hy_yjbg,hy_zycd,hy_hz,hy_wbjszh) values ";
                    ls_sql += "('" + Hyoa_global.GetRandom() + "','" + Hyoa_global.GetRandom() + "','收件','收件箱','" + this.hy_djrid.Text + "','" + this.hy_djrname.Text + "','" + ls_jsrid + "','','" + ls_jsrname + "','" + this.hy_field23.Text + "','" + ls_body + "','" + System.DateTime.Now.ToString() + "','','','','','','') ";

                    db.Execute(ls_sql);

                    //将邀请码
                    if (ls_yqmlists == "")
                    {
                        ls_yqmlists = ls_yqm;
                    }
                    else
                    {
                        ls_yqmlists = ls_yqmlists + "+" + ls_yqm;
                    }
                }
            }
        }
        else
        {
            string ls_jsrid = this.hy_field43.Text;
            string ls_jsrname = this.hy_field41.Text;

            string[] lv_jsrid = ls_jsrid.Split('+');
            string[] lv_jsrname = ls_jsrname.Split('+');
            for (var i = 0; i < lv_jsrid.Length; i++)
            {
                if (lv_jsrid[i] != "")
                {
                    string ls_yqm = "";
                    string ls_yqms = GetRandom3();
                    if (lv_jsrid[i] == "admin")
                    {
                        ls_yqm = "000" + ls_yqms;
                    }
                    else
                    {
                        ls_yqm = lv_jsrid[i].Substring(lv_jsrid[i].Length - 3) + ls_yqms;  //获得6位数字的随机数
                    }

                    ////发送待办
                    //string ls_dburl = "wstp.aspx?rnd=" + Hyoa_global.GetRandom();
                    //string ls_body = this.Session["hyuname"].ToString() + "发起投票,请您参与";
                    //Hyoa_global.Senddbsy_global(this.txtdocid.Value, lv_jsrid[i].ToString(), lv_jsrname[i].ToString(),
                    //    this.Session["hyuid"].ToString(), this.Session["hyuname"].ToString(), ls_dburl, "待办", this.hy_mudelid.Text, "待办箱", "一般", ls_body, "请参与", 0, "", "");
                    //给参与的人发送邮件
                    //string ls_dburl = "/wstp.aspx?yqm=" + ls_yqm + "&rnd=" + Hyoa_global.GetRandom();
                    string ls_dburl = "/wstp.aspx?rnd=" + Hyoa_global.GetRandom();
                    string ls_body = this.Session["hyuname"].ToString() + "发起投票,您的投票邀请码为:" + ls_yqm + "。<a href=" + ls_dburl + " target=\"_blank\">请点击进入</a>";
                    String ls_sql = "insert into hyt_mail(ID,DOCID,hy_type,hy_foldername,hy_fsrid,hy_fsrname,hy_jsrid,hy_wbjsrid,hy_jsrname,hy_title,hy_body,hy_datetime,hy_ifsavetofjx,hy_yxj,hy_yjbg,hy_zycd,hy_hz,hy_wbjszh) values ";
                    ls_sql += "('" + Hyoa_global.GetRandom() + "','" + Hyoa_global.GetRandom() + "','收件','收件箱','" + this.hy_djrid.Text + "','" + this.hy_djrname.Text + "','" + lv_jsrid[i].ToString() + "','','" + lv_jsrname[i].ToString() + "','" + this.hy_field23.Text + "','" + ls_body + "','" + System.DateTime.Now.ToString() + "','','','','','','') ";

                    db.Execute(ls_sql);

                    //将邀请码
                    if (ls_yqmlists == "")
                    {
                        ls_yqmlists = ls_yqm;
                    }
                    else
                    {
                        ls_yqmlists = ls_yqmlists + "+" + ls_yqm;
                    }
                }
            }
        }

        //更新表
        string sql = "update hyp_flowmain set hy_field30='" + ls_yqmlists + "',hy_field100=1 where docid='" + this.txtdocid.Value + "'";
        db.Execute(sql);
        db.Close();
        db.Dispose();

        Response.Write("<script>alert('发布投票成功!');window.location = '/list_tpgl.aspx?mid=moduletpgl&tableid=bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd';</script>");
    }
示例#29
0
    private void DataPlay()
    {
        //文档ID
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_flowwork Hyoa_flowwork = new HyoaClass.Hyoa_flowwork();
        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
        if (this.Request.QueryString["tableid"] != null)
        {
            this.txttableid.Text = this.Request.QueryString["tableid"].ToString();
        }
        if (this.Request.QueryString["flowid"] != null)
        {
            this.txtflowid.Text = this.Request.QueryString["flowid"].ToString();
        }
        if (this.Request.QueryString["tacheid"] != null)
        {
           this.txtcurtacheid.Text = this.Request.QueryString["tacheid"].ToString();
        }
        if (this.Request.QueryString["nexttacheids"] != null)
        {
            string pis_nexttacheids = this.Request.QueryString["nexttacheids"].ToString();
            string pis_nexttachenames = this.Request.QueryString["nexttachenames"].ToString();

            //-----条件流程的情况 start-----
            //根据模块ID得到流程信息
            DataTable dt = Hyoa_flowwork.Getflowworkbyflowidtacheid(this.txtflowid.Text, this.txtcurtacheid.Text);
            if (dt.Rows.Count > 0)
            {
                //给相应的域赋值
                //当前环节
                this.Hy_CurrTacheName_Show.Text = dt.Rows[0]["hy_curtachename"].ToString();
                //后续环节
                if (pis_nexttacheids != "")
                {
                    string[] piv_nexttacheids = pis_nexttacheids.Split(',');
                    string[] piv_nexttachenames = pis_nexttachenames.Split(',');
                    for (var i = 0; i < piv_nexttacheids.Length; i++)
                    {
                        Hy_nexttachename.Items.Add(new ListItem(piv_nexttachenames[i], piv_nexttacheids[i]));
                    }
                    this.Hy_nexttachename.SelectedIndex = 0;

                    //得到 后续环节的默认环节 对应的 提醒默认值,然后进行赋值
                    string ls_temp_tacheid = piv_nexttacheids[0];
                    HyoaClass.Hyoa_flowtache Hyoa_flowtache = new HyoaClass.Hyoa_flowtache();
                    DataTable dt_getrddoissendsmsandmsg = Hyoa_flowtache.Getflowtachebyflowidtacheid(this.txtflowid.Text, ls_temp_tacheid);
                    if (dt_getrddoissendsmsandmsg.Rows.Count > 0)
                    {
                        if (dt_getrddoissendsmsandmsg.Rows[0]["hy_rdDoIsSendSms"].ToString() == "是")
                            this.f_isSendsms_clr.Checked = true;

                        if (dt_getrddoissendsmsandmsg.Rows[0]["hy_rdDoIsSendMessage"].ToString() == "是")
                            this.f_isSendjstx_clr.Checked = true;

                        if (dt_getrddoissendsmsandmsg.Rows[0]["hy_rdPassIsSendSms"].ToString() == "是")
                            this.f_isSendsms_cyr.Checked = true;

                        if (dt_getrddoissendsmsandmsg.Rows[0]["hy_rdPassIsSendMessage"].ToString() == "是")
                            this.f_isSendjstx_cyr.Checked = true;

                        this.txthy_ifshowcurcomp.Text = dt_getrddoissendsmsandmsg.Rows[0]["hy_ifshowcurcomp"].ToString();
                        this.txthy_ifshowcurdept.Text = dt_getrddoissendsmsandmsg.Rows[0]["hy_ifshowcurdept"].ToString();
                    }

                }
            }
            dt.Clear();
            //后序环节处理人部门
            HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
            //先得到后续环节处理人集合
            DataTable dt_nextflowuser = Hyoa_flowtacheuser.Getflowtacheusersbyflowidtacheid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString());
            if (dt_nextflowuser.Rows.Count > 0)
            {
                string ls_temp1 = "";
                for (int i = 0; i < dt_nextflowuser.Rows.Count; i++)
                {
                    ls_temp1 += "," + dt_nextflowuser.Rows[i]["hy_userid"].ToString();
                }
                ls_temp1 += ",";
                string sql = "";
                if (Session["conntype"].ToString() == "SQL")
                {
                    sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' order by a.hy_deptsort,b.hy_sort";
                }
                if (Session["conntype"].ToString() == "ORACLE")
                {
                    sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') order by a.hy_deptsort,b.hy_sort";
                }
                dt = Hyoa_global.GetDataTable_USER(sql);
                if (dt.Rows.Count > 0)
                {
                    this.Hy_deptlist_clr.Items.Insert(0, "--请选择--");
                    ls_temp1 = "";
                    int t = 1;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        if ((ls_temp1 + ",").Contains("," + dt.Rows[i]["hy_deptid"].ToString() + ","))
                        {
                        }
                        else
                        {
                            //解决多级部门后续提交时部门显示的问题  added by xf 20131226
                            string ls_deptname = "";
                            if (dt.Rows[i]["hy_deptid"].ToString().Length == 3)
                            {
                                ls_deptname = dt.Rows[i]["hy_deptname"].ToString();
                            }
                            else
                            {
                                ls_deptname = GetAllDeptNameByDeptId(dt.Rows[i]["hy_deptid"].ToString());
                            }
                            this.Hy_deptlist_clr.Items.Insert(t, new ListItem(ls_deptname, dt.Rows[i]["hy_deptid"].ToString()));
                            t += 1;
                            ls_temp1 += "," + dt.Rows[i]["hy_deptid"].ToString();
                        }
                    }
                    this.Hy_deptlist_clr.SelectedIndex = 0;
                }
            }
            dt.Clear();
            //后序环节传阅人部门
            HyoaClass.Hyoa_dept Hyoa_dept = new HyoaClass.Hyoa_dept();
            dt = Hyoa_dept.Getdepts();
            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    //解决多级部门后续提交时部门显示的问题  added by xf 20131226
                    string ls_deptname = "";
                    if (dt.Rows[i]["hy_deptid"].ToString().Length == 3)
                    {
                        ls_deptname = dt.Rows[i]["hy_deptname"].ToString();
                    }
                    else
                    {
                        ls_deptname = GetAllDeptNameByDeptId(dt.Rows[i]["hy_deptid"].ToString());
                    }
                    this.Hy_deptlist.Items.Insert(i, new ListItem(ls_deptname, dt.Rows[i]["hy_deptid"].ToString()));
                }
                //this.Hy_deptlist.DataSource = dt;
                //this.Hy_deptlist.DataTextField = "hy_deptname";
                //this.Hy_deptlist.DataValueField = "hy_deptid";
                //this.Hy_deptlist.DataBind();
                this.Hy_deptlist.SelectedIndex = 0;
            }
            dt.Clear();
            //后序环节处理人员
            //先得到后续环节处理人集合
            dt_nextflowuser.Clear();
            dt_nextflowuser = Hyoa_flowtacheuser.Getflowtacheusersbyflowidtacheid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString());
            if (dt_nextflowuser.Rows.Count > 0)
            {
                string ls_temp1 = "";
                for (int i = 0; i < dt_nextflowuser.Rows.Count; i++)
                {
                    ls_temp1 += "," + dt_nextflowuser.Rows[i]["hy_userid"].ToString();
                }
                ls_temp1 += ",";
                string sql = "";
                if (this.Hy_deptlist_clr.SelectedValue.ToString() == "--请选择--")
                {
                    if (Session["conntype"].ToString() == "SQL")
                    {
                        sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' order by a.hy_deptsort,b.hy_sort";
                    }
                    if (Session["conntype"].ToString() == "ORACLE")
                    {
                        sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') order by a.hy_deptsort,b.hy_sort";
                    }
                }
                else
                {
                    if (Session["conntype"].ToString() == "SQL")
                    {
                        sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                    }
                    if (Session["conntype"].ToString() == "ORACLE")
                    {
                        sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                    }
                }
                dt = Hyoa_global.GetDataTable_USER(sql);
                if (dt.Rows.Count > 0)
                {
                    ls_temp1 = "";
                    int t = 0;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        if ((ls_temp1 + ",").Contains("," + dt.Rows[i]["hy_userid"].ToString() + ","))
                        {
                        }
                        else
                        {
                            this.Hy_hjclr.Items.Insert(t, new ListItem(dt.Rows[i]["hy_username"].ToString(), dt.Rows[i]["hy_userid"].ToString()));
                            t += 1;
                            ls_temp1 += "," + dt.Rows[i]["hy_userid"].ToString();
                        }
                    }
                }
            }
            dt.Clear();
            //后序环节传阅人员
            dt = Hyoa_user.Getusersbydeptid(this.Hy_deptlist.SelectedValue.ToString());
            if (dt.Rows.Count > 0)
            {
                this.Hy_rylist.DataSource = dt;
                this.Hy_rylist.DataTextField = "hy_username";
                this.Hy_rylist.DataValueField = "hy_userid";
                this.Hy_rylist.DataBind();
                //this.Hy_rylist.SelectedIndex = 0;
            }
            dt.Clear();
            //-----条件流程的情况 end-----
        }
        else
        {
            //-----非条件流程的情况 start-----
            //根据模块ID得到流程信息
            DataTable dt = Hyoa_flowwork.Getflowworkbyflowidtacheid(this.txtflowid.Text, this.txtcurtacheid.Text);
            if (dt.Rows.Count > 0)
            {
                //给相应的域赋值
                //当前环节
                this.Hy_CurrTacheName_Show.Text = dt.Rows[0]["hy_curtachename"].ToString();
                //后续环节
                this.Hy_nexttachename.DataSource = dt;
                this.Hy_nexttachename.DataTextField = "hy_nexttachename";
                this.Hy_nexttachename.DataValueField = "hy_nexttacheid";
                this.Hy_nexttachename.DataBind();
                this.Hy_nexttachename.SelectedIndex = 0;

                //得到 后续环节的默认环节 对应的 提醒默认值,然后进行赋值
                string ls_temp_tacheid = dt.Rows[0]["hy_nexttacheid"].ToString();
                HyoaClass.Hyoa_flowtache Hyoa_flowtache = new HyoaClass.Hyoa_flowtache();
                DataTable dt_getrddoissendsmsandmsg = Hyoa_flowtache.Getflowtachebyflowidtacheid(this.txtflowid.Text, ls_temp_tacheid);
                if (dt_getrddoissendsmsandmsg.Rows.Count > 0)
                {
                    if (dt_getrddoissendsmsandmsg.Rows[0]["hy_rdDoIsSendSms"].ToString() == "是")
                        this.f_isSendsms_clr.Checked = true;

                    if (dt_getrddoissendsmsandmsg.Rows[0]["hy_rdDoIsSendMessage"].ToString() == "是")
                        this.f_isSendjstx_clr.Checked = true;

                    if (dt_getrddoissendsmsandmsg.Rows[0]["hy_rdPassIsSendSms"].ToString() == "是")
                        this.f_isSendsms_cyr.Checked = true;

                    if (dt_getrddoissendsmsandmsg.Rows[0]["hy_rdPassIsSendMessage"].ToString() == "是")
                        this.f_isSendjstx_cyr.Checked = true;

                    this.txthy_ifshowcurcomp.Text = dt_getrddoissendsmsandmsg.Rows[0]["hy_ifshowcurcomp"].ToString();
                    this.txthy_ifshowcurdept.Text = dt_getrddoissendsmsandmsg.Rows[0]["hy_ifshowcurdept"].ToString();
                }
            }
            dt.Clear();
            //后序环节处理人部门
            HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
            //先得到后续环节处理人集合
            DataTable dt_nextflowuser = Hyoa_flowtacheuser.Getflowtacheusersbyflowidtacheid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString());
            if (dt_nextflowuser.Rows.Count > 0)
            {
                string ls_temp1 = "";
                for (int i = 0; i < dt_nextflowuser.Rows.Count; i++)
                {
                    ls_temp1 += "," + dt_nextflowuser.Rows[i]["hy_userid"].ToString();
                }
                ls_temp1 += ",";
                string sql = "";
                if (Session["conntype"].ToString() == "SQL")
                {
                    sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' order by a.hy_deptsort,b.hy_sort";
                }
                if (Session["conntype"].ToString() == "ORACLE")
                {
                    sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') order by a.hy_deptsort,b.hy_sort";
                }
                dt = Hyoa_global.GetDataTable_USER(sql);

                if (dt.Rows.Count > 0)
                {
                    this.Hy_deptlist_clr.Items.Insert(0, "--请选择--");
                    ls_temp1 = "";
                    int t = 1;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        if ((ls_temp1 + ",").Contains("," + dt.Rows[i]["hy_deptid"].ToString() + ","))
                        {
                        }
                        else
                        {
                            //解决多级部门后续提交时部门显示的问题  added by xf 20131226
                            string ls_deptname = "";
                            if (dt.Rows[i]["hy_deptid"].ToString().Length == 3)
                            {
                                ls_deptname = dt.Rows[i]["hy_deptname"].ToString();
                            }
                            else
                            {
                                ls_deptname = GetAllDeptNameByDeptId(dt.Rows[i]["hy_deptid"].ToString());
                            }
                            this.Hy_deptlist_clr.Items.Insert(t, new ListItem(ls_deptname, dt.Rows[i]["hy_deptid"].ToString()));
                            t += 1;
                            ls_temp1 += "," + dt.Rows[i]["hy_deptid"].ToString();
                        }
                    }
                    this.Hy_deptlist_clr.SelectedIndex = 0;
                }
            }
            dt.Clear();
            //后序环节传阅人部门
            HyoaClass.Hyoa_dept Hyoa_dept = new HyoaClass.Hyoa_dept();
            dt = Hyoa_dept.Getdepts();
            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    //解决多级部门后续提交时部门显示的问题  added by xf 20131226
                    string ls_deptname = "";
                    if (dt.Rows[i]["hy_deptid"].ToString().Length == 3)
                    {
                        ls_deptname = dt.Rows[i]["hy_deptname"].ToString();
                    }
                    else
                    {
                        ls_deptname = GetAllDeptNameByDeptId(dt.Rows[i]["hy_deptid"].ToString());
                    }
                    this.Hy_deptlist.Items.Insert(i, new ListItem(ls_deptname, dt.Rows[i]["hy_deptid"].ToString()));
                }
                //this.Hy_deptlist.DataSource = dt;
                //this.Hy_deptlist.DataTextField = "hy_deptname";
                //this.Hy_deptlist.DataValueField = "hy_deptid";
                //this.Hy_deptlist.DataBind();
                this.Hy_deptlist.SelectedIndex = 0;
            }
            dt.Clear();
            //后序环节处理人员
            //先得到后续环节处理人集合
            dt_nextflowuser.Clear();
            dt_nextflowuser = Hyoa_flowtacheuser.Getflowtacheusersbyflowidtacheid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString());
            if (dt_nextflowuser.Rows.Count > 0)
            {
                string ls_temp1 = "";
                for (int i = 0; i < dt_nextflowuser.Rows.Count; i++)
                {
                    ls_temp1 += "," + dt_nextflowuser.Rows[i]["hy_userid"].ToString();
                }
                ls_temp1 += ",";
                string sql="";
                if (this.Hy_deptlist_clr.SelectedValue.ToString() == "--请选择--")
                {
                    if (Session["conntype"].ToString() == "SQL")
                    {
                        sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' order by a.hy_deptsort,b.hy_sort";
                    }
                    if (Session["conntype"].ToString() == "ORACLE")
                    {
                        sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') order by a.hy_deptsort,b.hy_sort";
                    }
                }
                else
                {
                    if (Session["conntype"].ToString() == "SQL")
                    {
                        sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                    }
                    if (Session["conntype"].ToString() == "ORACLE")
                    {
                        sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                    }
                }
                dt = Hyoa_global.GetDataTable_USER(sql);
                if (dt.Rows.Count > 0)
                {
                    ls_temp1 = "";
                    int t = 0;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        if ((ls_temp1 + ",").Contains("," + dt.Rows[i]["hy_userid"].ToString() + ","))
                        {
                        }
                        else
                        {
                            this.Hy_hjclr.Items.Insert(t, new ListItem(dt.Rows[i]["hy_username"].ToString(), dt.Rows[i]["hy_userid"].ToString()));
                            t += 1;
                            ls_temp1 += "," + dt.Rows[i]["hy_userid"].ToString();
                        }
                    }
                }
            }
            dt.Clear();
            //后序环节传阅人员
            dt = Hyoa_user.Getusersbydeptid(this.Hy_deptlist.SelectedValue.ToString());
            if (dt.Rows.Count > 0)
            {
                this.Hy_rylist.DataSource = dt;
                this.Hy_rylist.DataTextField = "hy_username";
                this.Hy_rylist.DataValueField = "hy_userid";
                this.Hy_rylist.DataBind();
                //this.Hy_rylist.SelectedIndex = 0;
            }
            dt.Clear();
            //-----非条件流程的情况 end-----
        }

        //----考虑只显示本单位的情况start-----
        if (this.txthy_ifshowcurcomp.Text == "是")
        {
            DataTable tempTable = new DataTable();
            DataColumn col  = new DataColumn("value1", typeof(String)); //定义新的一列
            tempTable.Columns.Add(col);  //追加一列  add
            DataColumn col2 = new DataColumn("value2", typeof(String)); //定义新的一列
            tempTable.Columns.Add(col2);  //追加一列  add

            //更新部门
            for (var j = 0; j < this.Hy_deptlist_clr.Items.Count; j++)
            {
                string ls_dept1 = this.Hy_deptlist_clr.Items[j].Value;
                ls_dept1 = ls_dept1.Substring(0, 3);
                string ls_curdept = Session["hydeptid"].ToString();
                ls_curdept = ls_curdept.Substring(0, 3);

                if (ls_dept1 == ls_curdept)
                {
                    DataRow dr = tempTable.NewRow();
                    dr["value1"] = Hy_deptlist_clr.Items[j].Text;
                    dr["value2"] = Hy_deptlist_clr.Items[j].Value;
                    tempTable.Rows.Add(dr);
                }
            }
            //先清空
            this.Hy_deptlist_clr.Items.Clear();

            this.Hy_deptlist_clr.DataSource = tempTable;
            this.Hy_deptlist_clr.DataTextField = "value1";
            this.Hy_deptlist_clr.DataValueField = "value2";
            this.Hy_deptlist_clr.DataBind();

            this.Hy_hjclr.Items.Clear();

            //在调用这个部门对应的人员
            HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
            DataTable dt_nextflowuser = Hyoa_flowtacheuser.Getflowtacheusersbyflowidtacheid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString());
            if (dt_nextflowuser.Rows.Count > 0)
            {
                string ls_temp1 = "";
                for (int i = 0; i < dt_nextflowuser.Rows.Count; i++)
                {
                    ls_temp1 += "," + dt_nextflowuser.Rows[i]["hy_userid"].ToString();
                }
                ls_temp1 += ",";
                string sql = "";
                if (this.Hy_deptlist_clr.SelectedValue.ToString() == "--请选择--")
                {
                    if (Session["conntype"].ToString() == "SQL")
                    {
                        sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' order by a.hy_deptsort,b.hy_sort";
                    }
                    if (Session["conntype"].ToString() == "ORACLE")
                    {
                        sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') order by a.hy_deptsort,b.hy_sort";
                    }
                }
                else
                {
                    if (Session["conntype"].ToString() == "SQL")
                    {
                        sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                    }
                    if (Session["conntype"].ToString() == "ORACLE")
                    {
                        sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                    }
                }
                DataTable dt = Hyoa_global.GetDataTable_USER(sql);
                if (dt.Rows.Count > 0)
                {
                    ls_temp1 = "";
                    int t = 0;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        if ((ls_temp1 + ",").Contains("," + dt.Rows[i]["hy_userid"].ToString() + ","))
                        {
                        }
                        else
                        {
                            this.Hy_hjclr.Items.Insert(t, new ListItem(dt.Rows[i]["hy_username"].ToString(), dt.Rows[i]["hy_userid"].ToString()));
                            t += 1;
                            ls_temp1 += "," + dt.Rows[i]["hy_userid"].ToString();
                        }
                    }
                }
                dt.Clear();
            }
        }
        //----考虑只显示本单位的情况end-------

        //----考虑只显示和登记人同单位的情况start-----
        if (this.txthy_ifshowcurcomp.Text == "和登记人同单位")
        {
            if (Request.QueryString["docid"] != null)
            {
                //得到登记人的部门ID
                string ls_djrbmid = "";
                string sql = "select * from hyc_" + this.txttableid.Text+" where DOCID='" + Request.QueryString["docid"].ToString()+"'";
                DataTable dt_flowmain = Hyoa_global.GetDataTable(sql);
                if (dt_flowmain.Rows.Count > 0)
                {
                    ls_djrbmid = dt_flowmain.Rows[0]["hy_djrbmid"].ToString();
                    DataTable tempTable = new DataTable();
                    DataColumn col = new DataColumn("value1", typeof(String)); //定义新的一列
                    tempTable.Columns.Add(col);  //追加一列  add
                    DataColumn col2 = new DataColumn("value2", typeof(String)); //定义新的一列
                    tempTable.Columns.Add(col2);  //追加一列  add

                    //更新部门
                    for (var j = 0; j < this.Hy_deptlist_clr.Items.Count; j++)
                    {
                        string ls_dept1 = this.Hy_deptlist_clr.Items[j].Value;
                        if (ls_dept1.Substring(0, 3) == ls_djrbmid.Substring(0, 3))
                        {
                            DataRow dr = tempTable.NewRow();
                            dr["value1"] = Hy_deptlist_clr.Items[j].Text;
                            dr["value2"] = Hy_deptlist_clr.Items[j].Value;
                            tempTable.Rows.Add(dr);
                        }
                    }
                    //先清空
                    this.Hy_deptlist_clr.Items.Clear();

                    this.Hy_deptlist_clr.DataSource = tempTable;
                    this.Hy_deptlist_clr.DataTextField = "value1";
                    this.Hy_deptlist_clr.DataValueField = "value2";
                    this.Hy_deptlist_clr.DataBind();

                    this.Hy_hjclr.Items.Clear();

                    //在调用这个部门对应的人员
                    HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
                    DataTable dt_nextflowuser = Hyoa_flowtacheuser.Getflowtacheusersbyflowidtacheid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString());
                    if (dt_nextflowuser.Rows.Count > 0)
                    {
                        string ls_temp1 = "";
                        for (int i = 0; i < dt_nextflowuser.Rows.Count; i++)
                        {
                            ls_temp1 += "," + dt_nextflowuser.Rows[i]["hy_userid"].ToString();
                        }
                        ls_temp1 += ",";
                        if (this.Hy_deptlist_clr.SelectedValue.ToString() == "--请选择--")
                        {
                            if (Session["conntype"].ToString() == "SQL")
                            {
                                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' order by a.hy_deptsort,b.hy_sort";
                            }
                            if (Session["conntype"].ToString() == "ORACLE")
                            {
                                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') order by a.hy_deptsort,b.hy_sort";
                            }
                        }
                        else
                        {
                            if (Session["conntype"].ToString() == "SQL")
                            {
                                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                            }
                            if (Session["conntype"].ToString() == "ORACLE")
                            {
                                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                            }
                        }
                        DataTable dt = Hyoa_global.GetDataTable_USER(sql);
                        if (dt.Rows.Count > 0)
                        {
                            ls_temp1 = "";
                            int t = 0;
                            for (int i = 0; i < dt.Rows.Count; i++)
                            {
                                if ((ls_temp1 + ",").Contains("," + dt.Rows[i]["hy_userid"].ToString() + ","))
                                {
                                }
                                else
                                {
                                    this.Hy_hjclr.Items.Insert(t, new ListItem(dt.Rows[i]["hy_username"].ToString(), dt.Rows[i]["hy_userid"].ToString()));
                                    t += 1;
                                    ls_temp1 += "," + dt.Rows[i]["hy_userid"].ToString();
                                }
                            }
                        }
                        dt.Clear();
                    }
                }
            }
        }
        //----考虑只显示和登记人同单位的情况end-------

        //----考虑只显示登记人的分管领导的情况start-----
        if (this.txthy_ifshowcurcomp.Text == "登记人的分管领导")
        {
            if (Request.QueryString["docid"] != null)
            {
                //得到登记人的部门ID
                string ls_djrbmid = "";
                string sql = "select * from hyc_" + this.txttableid.Text + " where DOCID='" + Request.QueryString["docid"].ToString() + "'";
                DataTable dt_flowmain = Hyoa_global.GetDataTable(sql);
                if (dt_flowmain.Rows.Count > 0)
                {
                    ls_djrbmid = dt_flowmain.Rows[0]["hy_djrbmid"].ToString();
                    DataTable tempTable = new DataTable();
                    DataColumn col = new DataColumn("value1", typeof(String)); //定义新的一列
                    tempTable.Columns.Add(col);  //追加一列  add
                    DataColumn col2 = new DataColumn("value2", typeof(String)); //定义新的一列
                    tempTable.Columns.Add(col2);  //追加一列  add

                    //更新部门(登记人的分管领导(部门ID前3位不一样后边一样))
                    for (var j = 0; j < this.Hy_deptlist_clr.Items.Count; j++)
                    {
                        string ls_dept1 = this.Hy_deptlist_clr.Items[j].Value;
                        if (ls_dept1.Substring(3) == ls_djrbmid.Substring(3))
                        {
                            DataRow dr = tempTable.NewRow();
                            dr["value1"] = Hy_deptlist_clr.Items[j].Text;
                            dr["value2"] = Hy_deptlist_clr.Items[j].Value;
                            tempTable.Rows.Add(dr);
                        }
                    }
                    //先清空
                    this.Hy_deptlist_clr.Items.Clear();

                    this.Hy_deptlist_clr.DataSource = tempTable;
                    this.Hy_deptlist_clr.DataTextField = "value1";
                    this.Hy_deptlist_clr.DataValueField = "value2";
                    this.Hy_deptlist_clr.DataBind();

                    this.Hy_hjclr.Items.Clear();

                    //在调用这个部门对应的人员
                    HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
                    DataTable dt_nextflowuser = Hyoa_flowtacheuser.Getflowtacheusersbyflowidtacheid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString());
                    if (dt_nextflowuser.Rows.Count > 0)
                    {
                        string ls_temp1 = "";
                        for (int i = 0; i < dt_nextflowuser.Rows.Count; i++)
                        {
                            ls_temp1 += "," + dt_nextflowuser.Rows[i]["hy_userid"].ToString();
                        }
                        ls_temp1 += ",";
                        if (this.Hy_deptlist_clr.SelectedValue.ToString() == "--请选择--")
                        {
                            if (Session["conntype"].ToString() == "SQL")
                            {
                                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' order by a.hy_deptsort,b.hy_sort";
                            }
                            if (Session["conntype"].ToString() == "ORACLE")
                            {
                                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') order by a.hy_deptsort,b.hy_sort";
                            }
                        }
                        else
                        {
                            if (Session["conntype"].ToString() == "SQL")
                            {
                                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                            }
                            if (Session["conntype"].ToString() == "ORACLE")
                            {
                                sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                            }
                        }
                        DataTable dt = Hyoa_global.GetDataTable_USER(sql);
                        if (dt.Rows.Count > 0)
                        {
                            ls_temp1 = "";
                            int t = 0;
                            for (int i = 0; i < dt.Rows.Count; i++)
                            {
                                if ((ls_temp1 + ",").Contains("," + dt.Rows[i]["hy_userid"].ToString() + ","))
                                {
                                }
                                else
                                {
                                    this.Hy_hjclr.Items.Insert(t, new ListItem(dt.Rows[i]["hy_username"].ToString(), dt.Rows[i]["hy_userid"].ToString()));
                                    t += 1;
                                    ls_temp1 += "," + dt.Rows[i]["hy_userid"].ToString();
                                }
                            }
                        }
                        dt.Clear();
                    }
                }
            }
        }
        //----考虑只显示登记人的分管领导的情况end-------

        //----只显示登记人start-----
        if (this.txthy_ifshowcurdept.Text == "只显示登记人")
        {
            if (Request.QueryString["docid"] != null)
            {
                string sql = "select * from hyc_" + this.txttableid.Text + " where DOCID='" + Request.QueryString["docid"].ToString() + "'";
                DataTable dt_flowmain = Hyoa_global.GetDataTable(sql);
                if (dt_flowmain.Rows.Count > 0)
                {
                    //先清空
                    this.Hy_deptlist_clr.Items.Clear();
                    Hy_deptlist_clr.Items.Insert(0, new ListItem(dt_flowmain.Rows[0]["hy_djrbmname"].ToString(), dt_flowmain.Rows[0]["hy_djrbmid"].ToString()));

                    //先清空
                    this.Hy_hjclr.Items.Clear();
                    Hy_hjclr.Items.Insert(0, new ListItem(dt_flowmain.Rows[0]["hy_djrname"].ToString(), dt_flowmain.Rows[0]["hy_djrid"].ToString()));
                }
            }
        }
        //----只显示登记人end-------

        //----只显示当前用户本部门人员start-----
        if (this.txthy_ifshowcurdept.Text == "是")
        {
            if (Request.QueryString["docid"] != null)
            {
                DataTable tempTable = new DataTable();
                DataColumn col = new DataColumn("value1", typeof(String)); //定义新的一列
                tempTable.Columns.Add(col);  //追加一列  add
                DataColumn col2 = new DataColumn("value2", typeof(String)); //定义新的一列
                tempTable.Columns.Add(col2);  //追加一列  add

                //更新部门
                for (var j = 0; j < this.Hy_deptlist_clr.Items.Count; j++)
                {
                    string ls_dept1 = this.Hy_deptlist_clr.Items[j].Value;
                    if (ls_dept1 == Session["hydeptid"].ToString())
                    {
                        DataRow dr = tempTable.NewRow();
                        dr["value1"] = Hy_deptlist_clr.Items[j].Text;
                        dr["value2"] = Hy_deptlist_clr.Items[j].Value;
                        tempTable.Rows.Add(dr);
                    }
                }
                //先清空
                this.Hy_deptlist_clr.Items.Clear();

                this.Hy_deptlist_clr.DataSource = tempTable;
                this.Hy_deptlist_clr.DataTextField = "value1";
                this.Hy_deptlist_clr.DataValueField = "value2";
                this.Hy_deptlist_clr.DataBind();

                this.Hy_hjclr.Items.Clear();

                //在调用这个部门对应的人员
                HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
                DataTable dt_nextflowuser = Hyoa_flowtacheuser.Getflowtacheusersbyflowidtacheid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString());
                if (dt_nextflowuser.Rows.Count > 0)
                {
                    string ls_temp1 = "";
                    for (int i = 0; i < dt_nextflowuser.Rows.Count; i++)
                    {
                        ls_temp1 += "," + dt_nextflowuser.Rows[i]["hy_userid"].ToString();
                    }
                    ls_temp1 += ",";
                    string sql = "";
                    if (this.Hy_deptlist_clr.SelectedValue.ToString() == "--请选择--")
                    {
                        if (Session["conntype"].ToString() == "SQL")
                        {
                            sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' order by a.hy_deptsort,b.hy_sort";
                        }
                        if (Session["conntype"].ToString() == "ORACLE")
                        {
                            sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT(CONCAT('%,',b.hy_userid),',%') order by a.hy_deptsort,b.hy_sort";
                        }
                    }
                    else
                    {
                        if (Session["conntype"].ToString() == "SQL")
                        {
                            sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like '%,'+b.hy_userid+',%' and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                        }
                        if (Session["conntype"].ToString() == "ORACLE")
                        {
                            sql = "select * from hyt_dept a,hyt_user b where a.hy_deptid=b.hy_deptid and '" + ls_temp1 + "' like CONCAT('%,',b.hy_userid),',%') and b.hy_deptid='" + this.Hy_deptlist_clr.SelectedValue.ToString() + "' order by a.hy_deptsort,b.hy_sort";
                        }
                    }
                    DataTable dt = Hyoa_global.GetDataTable_USER(sql);
                    if (dt.Rows.Count > 0)
                    {
                        ls_temp1 = "";
                        int t = 0;
                        for (int i = 0; i < dt.Rows.Count; i++)
                        {
                            if ((ls_temp1 + ",").Contains("," + dt.Rows[i]["hy_userid"].ToString() + ","))
                            {
                            }
                            else
                            {
                                this.Hy_hjclr.Items.Insert(t, new ListItem(dt.Rows[i]["hy_username"].ToString(), dt.Rows[i]["hy_userid"].ToString()));
                                t += 1;
                                ls_temp1 += "," + dt.Rows[i]["hy_userid"].ToString();
                            }
                        }
                    }
                    dt.Clear();
                }
            }
        }
        //----只显示当前用户本部门人员end-------

        //----自动传阅 start------------
        DataTable dt_zdcy = Hyoa_flowwork.Getflowworkbyflowidtacheidnexttacheid(this.txtflowid.Text, this.txtcurtacheid.Text, this.Hy_nexttachename.SelectedValue);
        if (dt_zdcy.Rows.Count > 0)
        {
            if (dt_zdcy.Rows[0]["hy_zdcyuserids"] != null)
            {
                if (dt_zdcy.Rows[0]["hy_zdcyuserids"].ToString() != "")
                {
            int ii=0;
                    //自动加载
                    string[] lv_zdcyuserids = dt_zdcy.Rows[0]["hy_zdcyuserids"].ToString().Split(',');
                    for (int i = 0; i < lv_zdcyuserids.Length; i++)
                    {
                        //根据系统名得到中文名
                        DataTable dt_user = Hyoa_user.Getuserallinfobyloginid(lv_zdcyuserids[i]);
                        if (dt_user.Rows.Count > 0)
                        {
                            this.Hy_selectedcyr.Items.Insert(ii, new ListItem(dt_user.Rows[0]["hy_username"].ToString(), lv_zdcyuserids[i]));
                ii = ii + 1;
                        }
                    }
                }
            }
        }
        //----自动传阅 end------------
    }
示例#30
0
    //得到表单的HTML pi_flag 0:不赋值  1:需赋值    Written by xf 20110515
    //docid:旧文档使用时,文档ID
    //ifhavarole:是否有权限  0:lable输出 1:input输出
    //ifflowdoc:是否流程表单 0:非流程 1:流程
    //curtacheid:当前环节ID,用于判断字段是否在当前环节有权限
    public DataTable GetDataTableFieldHtml(string hy_mudelid, string hy_tableid, string pi_flag, string ifsearch, string docid, string ifhavarole, string ifflowdoc, string curtacheid)
    {
        //加载表单
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        //根据模块ID和表单ID得到对应的配置字段
        DataTable dt_gettablecolumns = Hyoa_flowfield.GetflowfieldsbyMudelidAndTableid(hy_mudelid, hy_tableid);
        string ls_html = "";
        Int32 li_tdnums = 0;    //TDS数(colspan的值相加)

        DataTable tempTable = new DataTable();
        DataColumn col = new DataColumn("displaycol", typeof(String)); //定义新的一列  add
        tempTable.Columns.Add(col);  //追加一列  add

        if (dt_gettablecolumns.Rows.Count > 0)
        {
            //先从配置表中将配置的列数取出,如果配置表中找不到,则默认为4列,并且设置相应的宽度start
            HyoaClass.Hyoa_detail Hyoa_detail = new HyoaClass.Hyoa_detail();
            int li_col = 4;//一行显示几列
            string ls_leftwidth = "15";//左侧列宽
            string ls_rightwidth = "35";//右侧列宽
            DataTable detaildt = Hyoa_detail.Getdetail(hy_tableid);
            if (detaildt.Rows.Count > 0)
            {
                li_col = int.Parse(detaildt.Rows[0]["hy_colnum"].ToString());
                if (detaildt.Rows[0]["hy_colnum"].ToString() == "6")
                {
                    ls_leftwidth = "10";
                    ls_rightwidth = "23";
                }
                else
                {
                    if (detaildt.Rows[0]["hy_colnum"].ToString() == "8")
                    {
                        ls_leftwidth = "5";
                        ls_rightwidth = "7";
                    }
                    else
                    {
                        if (detaildt.Rows[0]["hy_colnum"].ToString() == "10")
                        {
                            ls_leftwidth = "4";
                            ls_rightwidth = "6";
                        }
                    }
                }
            }
            //先从配置表中将配置的列数取出,如果配置表中找不到,则默认为4列,并且设置相应的宽度end

            //开始加载字段信息到DT中,用于前台显示
            for (int i = 0; i < dt_gettablecolumns.Rows.Count; i++)
            {
                if (i == 0)
                {
                    ls_html += "<TR height=\"30\">";
                }
                //输出字段说明列(文字说明除外)
                if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() != "说明文字")
                {
                    //20120724
                    //如果是隐藏字段,则隐藏(增加display)   added by xf 20120217
                    if (dt_gettablecolumns.Rows[i]["hy_ifhiddle"].ToString() != "是")
                        ls_html += "<TD width=\"" + ls_leftwidth + "%\" align=\"center\" class=\"Tdcellleft\">" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "</TD>";
                    else
                        ls_html += "<div style=\"display:none\">" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "</div>";
                    //ls_html += "<TD width=\"" + ls_leftwidth + "%\" align=\"center\" class=\"Tdcellleft\">" + dt_gettablecolumns.Rows[i]["hy_fieldname"].ToString() + "</TD>";
                }
                //得到当前字段的值
                HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
                DataTable dt_flowmain = Hyoa_flowmain.Getflowmain(docid);
                string field_docvalue = "&nbsp;";
                if (dt_flowmain.Rows.Count > 0)
                {
                    if (dt_gettablecolumns.Rows[i]["hy_defaultvalue"].ToString() == "yyyy-mm-dd")
                    {
                        field_docvalue = System.DateTime.Parse(dt_flowmain.Rows[0][dt_gettablecolumns.Rows[i]["hy_sqlfield"].ToString()].ToString()).ToShortDateString() + field_docvalue;
                    }
                    else
                    {
                        //如果SQL为数值的字段部分,则需要截取小数点后边两位
                        if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "数值")
                        {
                            if (dt_flowmain.Rows[0][dt_gettablecolumns.Rows[i]["hy_sqlfield"].ToString()].ToString().Contains(".") == true)
                                field_docvalue = float.Parse(dt_flowmain.Rows[0][dt_gettablecolumns.Rows[i]["hy_sqlfield"].ToString()].ToString()).ToString("F2") + field_docvalue;
                            else
                                field_docvalue = dt_flowmain.Rows[0][dt_gettablecolumns.Rows[i]["hy_sqlfield"].ToString()].ToString() + field_docvalue;
                        }
                        else
                        {
                            field_docvalue = dt_flowmain.Rows[0][dt_gettablecolumns.Rows[i]["hy_sqlfield"].ToString()].ToString() + field_docvalue;
                        }
                    }
                }
                //输出字段列
                //this.Response.Write("<script>alert('" + ifhavarole + "');</script>");
                if (ifhavarole == "0")  //无权限(当前表单来讲)
                {
                    //附件组件的值需要特定读取(附件需要特殊处理) Added by xf 20110607
                    if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "附件组件")
                    {

                        field_docvalue = "";
                        //根据docid得到目前已上传的附件信息
                        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                        HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
                        DataTable dt_fileatt = Hyoa_fileatt.GetfileattByFatherid(docid);
                        if (dt_fileatt.Rows.Count > 0)
                        {
                            for (var ii = 0; ii < dt_fileatt.Rows.Count; ii++)
                            {
                                string ls_name = "";
                                DataTable dt_user = Hyoa_user.Getuser(dt_fileatt.Rows[ii]["hy_userid"].ToString());
                                if (dt_user.Rows.Count > 0)
                                {
                                    ls_name = dt_user.Rows[0]["hy_username"].ToString();
                                }
                                field_docvalue += (ii + 1).ToString() + "、<a href=\"" + dt_fileatt.Rows[ii]["hy_filepath"].ToString() + "\" target=_blank>" + dt_fileatt.Rows[ii]["hy_filename"].ToString() + "&nbsp;&nbsp;&nbsp;&nbsp;" + ls_name + "&nbsp;&nbsp;[" + dt_fileatt.Rows[ii]["hy_djsj"].ToString() + "]" + "</a><br />";
                            }
                        }
                        if (field_docvalue == "")
                            field_docvalue = "&nbsp;";
                    }
                    //痕迹保留组件的值需要读取(需要特殊处理) Added by xf 20110705
                    if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "痕迹保留")
                    {
                        field_docvalue = "";
                        field_docvalue += "<input type=button id=\"btn_zwxg\" value='正  文' class=btn3 onclick=\"window.open('ntko/readoffice.aspx?newofficetype=1&fatherid=" + docid + "&tacheByhj=1&jsxd=1','newwindow','height=768,width=1024,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no, status=no');\" ";
                        if (field_docvalue == "")
                            field_docvalue = "&nbsp;";
                    }
                    //ztmztmztmstart
                    //this.Response.Write("<script>alert('" + field_docvalue + "');</script>");
                    if (field_docvalue.Length > 7)
                    {

                        if (field_docvalue.Substring(0, 8) == "1900-1-1")
                        {
                            field_docvalue = "&nbsp;";
                        }
                    }
                    //ztmztmztmend
                    if (dt_gettablecolumns.Rows[i]["hy_tdnums"].ToString() == "1")
                    {
                        //如果是隐藏字段,则隐藏(增加display)   added by xf 20120217
                        if (dt_gettablecolumns.Rows[i]["hy_ifhiddle"].ToString() != "是")
                            ls_html += "<TD width=\"" + ls_rightwidth + "%\" height=\"30px\" align=" + dt_gettablecolumns.Rows[i]["hy_align"].ToString() + " class=\"Tdcellright\">" + field_docvalue + "</TD>";
                        else
                            ls_html += "<div style=\"display:none\">" + field_docvalue + "</div>";
                        //ls_html += "<TD width=\"" + ls_rightwidth + "%\" height=\"30px\" align=" + dt_gettablecolumns.Rows[i]["hy_align"].ToString() + " class=\"Tdcellright\">" + field_docvalue + "</TD>";
                    }
                    else
                    {
                        //如果是隐藏字段,则隐藏(增加display)   added by xf 20120217
                        if (dt_gettablecolumns.Rows[i]["hy_ifhiddle"].ToString() != "是")
                            ls_html += "<TD width=\"" + ls_rightwidth + "%\" height=\"30px\" align=" + dt_gettablecolumns.Rows[i]["hy_align"].ToString() + " class=\"Tdcellright\" colspan=" + dt_gettablecolumns.Rows[i]["hy_tdnums"].ToString() + ">" + field_docvalue + "</TD>";
                        else
                            ls_html += "<div style=\"display:none\">" + field_docvalue + "</div>";
                        //ls_html += "<TD width=\"" + ls_rightwidth + "%\" height=\"30px\" align=" + dt_gettablecolumns.Rows[i]["hy_align"].ToString() + " class=\"Tdcellright\" colspan=" + dt_gettablecolumns.Rows[i]["hy_tdnums"].ToString() + ">" + field_docvalue + "</TD>";
                    }
                }
                else
                {
                    //有权限(当前表单来讲)时,判断当前流程+当前环节对于这个字段是否有权限操作
                    string ls_ifhavarole = "0";    //默认没有权限(当前字段来讲)---该功能仅对于流程模块起作用
                    //非流程直接就有权限了
                    //this.Response.Write("<script>alert('" + ifflowdoc + "');</script>");
                    if (ifflowdoc == "0")
                    {
                        ls_ifhavarole = "1";
                    }
                    else
                    {
                        //判断当前字段是否有权限
                        HyoaClass.Hyoa_flowtachefield Hyoa_flowtachefield = new HyoaClass.Hyoa_flowtachefield();
                        ls_ifhavarole = Hyoa_flowtachefield.IfHaveRolebyflowidandtacheidandfieldid(dt_gettablecolumns.Rows[i]["hy_flowid"].ToString(), curtacheid, dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString());
                    }

                    if (dt_gettablecolumns.Rows[i]["hy_tdnums"].ToString() == "1")
                    {
                        //如果是隐藏字段,则隐藏(增加display)   added by xf 20120217
                        if (dt_gettablecolumns.Rows[i]["hy_ifhiddle"].ToString() != "是")
                            ls_html += "<TD width=\"" + ls_rightwidth + "%\" align=" + dt_gettablecolumns.Rows[i]["hy_align"].ToString() + " class=\"Tdcellright\">" + GetFieldHtml(hy_mudelid, dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString(), pi_flag, hy_tableid, ifsearch, docid, ls_ifhavarole) + "</TD>";
                        else
                            ls_html += "<div style=\"display:none\">" + GetFieldHtml(hy_mudelid, dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString(), pi_flag, hy_tableid, ifsearch, docid, ls_ifhavarole) + "</div>";
                        //ls_html += "<TD width=\"" + ls_rightwidth + "%\" align=" + dt_gettablecolumns.Rows[i]["hy_align"].ToString() + " class=\"Tdcellright\">" + GetFieldHtml(hy_mudelid, dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString(), pi_flag, hy_tableid, ifsearch, docid, ls_ifhavarole) + "</TD>";
                    }
                    else
                    {
                        //如果是隐藏字段,则隐藏(增加display)   added by xf 20120217
                        if (dt_gettablecolumns.Rows[i]["hy_ifhiddle"].ToString() != "是")
                            ls_html += "<TD width=\"" + ls_rightwidth + "%\" align=" + dt_gettablecolumns.Rows[i]["hy_align"].ToString() + " class=\"Tdcellright\" colspan=" + dt_gettablecolumns.Rows[i]["hy_tdnums"].ToString() + ">" + GetFieldHtml(hy_mudelid, dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString(), pi_flag, hy_tableid, ifsearch, docid, ls_ifhavarole) + "</TD>";
                        else
                            ls_html += "<div style=\"display:none\">" + GetFieldHtml(hy_mudelid, dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString(), pi_flag, hy_tableid, ifsearch, docid, ls_ifhavarole) + "</div>";
                        //ls_html += "<TD width=\"" + ls_rightwidth + "%\" align=" + dt_gettablecolumns.Rows[i]["hy_align"].ToString() + " class=\"Tdcellright\" colspan=" + dt_gettablecolumns.Rows[i]["hy_tdnums"].ToString() + ">" + GetFieldHtml(hy_mudelid, dt_gettablecolumns.Rows[i]["hy_fieldid"].ToString(), pi_flag, hy_tableid, ifsearch, docid, ls_ifhavarole) + "</TD>";

                    }
                }
                //开始colspan值累加,如果是隐藏字段,不计算在内
                if (dt_gettablecolumns.Rows[i]["hy_ifhiddle"].ToString() != "是")
                {
                    if (dt_gettablecolumns.Rows[i]["hy_fieldtype"].ToString() == "说明文字")
                        li_tdnums += System.Int32.Parse(dt_gettablecolumns.Rows[i]["hy_tdnums"].ToString());
                    else
                        li_tdnums += System.Int32.Parse(dt_gettablecolumns.Rows[i]["hy_tdnums"].ToString()) + 1;
                }
                //this.lbtest.Text += "," + li_tdnums;
                if (li_tdnums % li_col == 0 && dt_gettablecolumns.Rows[i]["hy_ifhiddle"].ToString() != "是")
                {
                    ls_html += "</tr>";
                    DataRow dr = tempTable.NewRow();
                    dr["displaycol"] = ls_html;  //将新值赋给相应的列  add
                    tempTable.Rows.Add(dr);
                    ls_html = "";
                    if (i != (dt_gettablecolumns.Rows.Count - 1))
                        ls_html += "<tr>";
                }
                //先从配置表中将配置的列数取出,如果配置表中找不到,则默认为4列end
            }
        }
        return tempTable;
    }