Esempio n. 1
0
    protected void Hy_nexttachename_SelectedIndexChanged(object sender, EventArgs e)
    {
        //后序环节处理人部门
        HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
        DataTable dt2 = Hyoa_flowtacheuser.GetDeptInfobyflowidtacheid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString());
        if (dt2.Rows.Count > 0)
        {
            this.Hy_deptlist_clr.DataSource = dt2;
            this.Hy_deptlist_clr.DataTextField = "hy_deptname";
            this.Hy_deptlist_clr.DataValueField = "hy_deptid";
            this.Hy_deptlist_clr.DataBind();
            this.Hy_deptlist_clr.Items.Insert(0, "--请选择--");
            this.Hy_deptlist_clr.SelectedIndex = 0;
        }
        dt2.Clear();
        //后序环节传阅人员
        HyoaClass.Hyoa_dept Hyoa_dept = new HyoaClass.Hyoa_dept();
        dt2 = Hyoa_dept.Getdepts();
        if (dt2.Rows.Count > 0)
        {
            this.Hy_deptlist.DataSource = dt2;
            this.Hy_deptlist.DataTextField = "hy_deptname";
            this.Hy_deptlist.DataValueField = "hy_deptid";
            this.Hy_deptlist.DataBind();
            this.Hy_deptlist.SelectedIndex = 0;
        }
        dt2.Clear();

        //后序环节处理人员
        dt2 = Hyoa_flowtacheuser.Getcuruserinfobyflowidtacheiddeptid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString(), this.Hy_deptlist_clr.SelectedValue.ToString());
        if (dt2.Rows.Count > 0)
        {
            this.Hy_hjclr.DataSource = dt2;
            this.Hy_hjclr.DataTextField = "hy_username";
            this.Hy_hjclr.DataValueField = "hy_userid";
            this.Hy_hjclr.DataBind();
            this.Hy_hjclr.SelectedIndex = 0;
        }
        dt2.Clear();

        //后序环节传阅人员
        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
        dt2 = Hyoa_user.Getusersbydeptid(this.Hy_deptlist.SelectedValue.ToString());
        if (dt2.Rows.Count > 0)
        {
            this.Hy_rylist.DataSource = dt2;
            this.Hy_rylist.DataTextField = "hy_username";
            this.Hy_rylist.DataValueField = "hy_userid";
            this.Hy_rylist.DataBind();
            this.Hy_rylist.SelectedIndex = 0;
        }
        dt2.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_ifshowcurdept.Text == "是")
        {
            HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
            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_hjclr.Items.Clear();
                if (tempTable.Rows.Count > 0)
                {
                    this.Hy_deptlist_clr.DataSource = tempTable;
                    this.Hy_deptlist_clr.DataTextField = "value1";
                    this.Hy_deptlist_clr.DataValueField = "value2";
                    this.Hy_deptlist_clr.DataBind();
                    //在调用这个部门对应的人员
                    DataTable dt = Hyoa_flowtacheuser.Getcuruserinfobyflowidtacheiddeptid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString(), this.Hy_deptlist_clr.SelectedValue.ToString());
                    if (dt.Rows.Count > 0)
                    {
                        this.Hy_hjclr.DataSource = dt;
                        this.Hy_hjclr.DataTextField = "hy_username";
                        this.Hy_hjclr.DataValueField = "hy_userid";
                        this.Hy_hjclr.DataBind();
                    }
                }

            }
        }
        //----只显示当前用户本部门人员end-------
    }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string ls_flowid;
        string ls_nexttacheid;
        string ls_deptid;
        string ls_username;
        string ls_userid;
        string ls_opt;
        ls_flowid = "";
        ls_nexttacheid = "";
        ls_deptid = "";
        ls_username = "";
        ls_userid = "";
        ls_opt = "";

        if (this.Request.QueryString["flowid"] != null)
        {
            ls_flowid = this.Request.QueryString["flowid"].ToString();
        }
        if (this.Request.QueryString["nexttacheid"] != null)
        {
            ls_nexttacheid = this.Request.QueryString["nexttacheid"].ToString();
        }
        if (this.Request.QueryString["deptid"] != null)
        {
            ls_deptid = this.Request.QueryString["deptid"].ToString();
        }
        if (this.Request.QueryString["opt"] != null)
        {
            ls_opt = this.Request.QueryString["opt"].ToString();
        }
        //如果opt等于clr,则表示处理人的域,如果opt等于cyr,则表示传阅人的域
        if (ls_opt == "clr")
        {
            //后序环节处理人员
            HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
            DataTable dt4 = Hyoa_flowtacheuser.Getcuruserinfobyflowidtacheiddeptid(ls_flowid, ls_nexttacheid, ls_deptid);
            if (dt4.Rows.Count > 0)
            {
                for (int i = 0; i < dt4.Rows.Count; i++)
                {
                    if (ls_username == "")
                    {
                        ls_username = dt4.Rows[i]["hy_username"].ToString();
                        ls_userid = dt4.Rows[i]["hy_userid"].ToString();

                    }
                    else
                    {
                        ls_username = ls_username + "+" + dt4.Rows[i]["hy_username"].ToString();
                        ls_userid = ls_userid + "+" + dt4.Rows[i]["hy_userid"].ToString();
                    }
                }
            }

            dt4.Clear();
            this.Response.Write(ls_username + "*" + ls_userid);
            return ;
        }

        if (ls_opt == "cyr")
        {

            //后序环节传阅人员
            HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
            DataTable dt3 = Hyoa_user.Getusersbydeptid(ls_deptid);
            if (dt3.Rows.Count > 0)
            {
                for (int i = 0; i < dt3.Rows.Count; i++)
                {
                    if (ls_username == "")
                    {
                        ls_username = dt3.Rows[i]["hy_username"].ToString();
                        ls_userid = dt3.Rows[i]["hy_userid"].ToString();
                    }
                    else
                    {
                        ls_username = ls_username + "+" + dt3.Rows[i]["hy_username"].ToString();
                        ls_userid = ls_userid + "+" + dt3.Rows[i]["hy_userid"].ToString();
                    }
                }
            }
            dt3.Clear();
            this.Response.Write(ls_username + "*" + ls_userid);
            return;
        }

        ////if (Request.QueryString["productid"] != null)
        ////{

        //    DataTable dt;
        //    TPortalClass.JpSupply JpSupply = new TPortalClass.JpSupply();
        //    if (HttpContext.Current.Request.Url.ToString().IndexOf("productname") > 0)
        //    {
        //        JpSupply.productname = Request.QueryString["productname"].ToString();
        //        dt = JpSupply.Getproductname();
        //    }
        //    else
        //    {
        //        dt = JpSupply.GetAllproductname();

        //    }
        //    string ls_name = "";
        //    //this.Response.Write("<div id=sampleLayer style=\"position:absolute; top:80px; left:285px; width:200px; height:100px; background:#EEEEEE; border: 1px solid #919191; font-family:Verdana; font-size:8pt\">");
        //    this.Response.Write("<div align=left id=sampleLayer style=\"position:absolute; top:80px; left:285px; width:300px; height:100px; background:#EEEEEE; overflow:scroll; border: 1px solid #919191; font-family:Verdana; font-size:8pt\">");
        //    //this.Response.Write("<div id=sampleLayer style=\"font: 0px/0px sans-serif;clear: both;display: block\">");
        //    for (int i = 0; i < dt.Rows.Count; i++)
        //    {
        //        ls_name = ls_name + dt.Rows[i]["productname"].ToString();
        //        this.Response.Write("<li><a href=\"#\" onclick=document.forms[0].textfield.value='" + dt.Rows[i]["productname"].ToString() + "';>" + dt.Rows[i]["productname"].ToString() + "</a></li>");
        //    }
        //    //this.Response.Write(ls_name);
        //    this.Response.Write("</div>");
        //    //this.Response.Write("<div id=sampleLayer style=\"position:absolute; top:80px; left:285px; width:200px; height:100px; background:#EEEEEE; border: 1px solid #919191; font-family:Verdana; font-size:8pt\"><li><a href=\"#\" onclick=selectlist()>这是个简单</a></li><li>aaaa</li></divpt>");
        //    return;
        ////}
    }
Esempio n. 3
0
    private void DataPlay()
    {
        //文档ID
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        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();
        }
        //根据模块ID得到流程信息
        HyoaClass.Hyoa_flowwork Hyoa_flowwork = new HyoaClass.Hyoa_flowwork();
        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_ifshowcurdept.Text = dt_getrddoissendsmsandmsg.Rows[0]["hy_ifshowcurdept"].ToString();
            }
        }
        dt.Clear();
        //后序环节处理人部门
        HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
        dt = Hyoa_flowtacheuser.GetDeptInfobyflowidtacheid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString());
        if (dt.Rows.Count > 0)
        {
            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();
            this.Hy_deptlist_clr.Items.Insert(0, "--请选择--");
            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)
        {
            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 = Hyoa_flowtacheuser.Getcuruserinfobyflowidtacheiddeptid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString(), this.Hy_deptlist_clr.SelectedValue.ToString ());
        if (dt.Rows.Count > 0)
        {
            this.Hy_hjclr.DataSource = dt;
            this.Hy_hjclr.DataTextField = "hy_username";
            this.Hy_hjclr.DataValueField = "hy_userid";
            this.Hy_hjclr.DataBind();
            //this.Hy_hjclr.SelectedIndex = 0;
        }
        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();
            //this.Hy_rylist.SelectedIndex = 0;
        }
        dt.Clear();

        //----只显示当前用户本部门人员start-----
        //this.Response.Write("<script>alert('" + this.txthy_ifshowcurdept.Text + "');</script>");
        if (this.txthy_ifshowcurdept.Text == "是")
        {
            HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
            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_hjclr.Items.Clear();
                if (tempTable.Rows.Count > 0)
                {
                    this.Hy_deptlist_clr.DataSource = tempTable;
                    this.Hy_deptlist_clr.DataTextField = "value1";
                    this.Hy_deptlist_clr.DataValueField = "value2";
                    this.Hy_deptlist_clr.DataBind();

                    //在调用这个部门对应的人员
                    //HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
                    dt = Hyoa_flowtacheuser.Getcuruserinfobyflowidtacheiddeptid(this.txtflowid.Text, this.Hy_nexttachename.SelectedValue.ToString(), this.Hy_deptlist_clr.SelectedValue.ToString());
                    if (dt.Rows.Count > 0)
                    {
                        this.Hy_hjclr.DataSource = dt;
                        this.Hy_hjclr.DataTextField = "hy_username";
                        this.Hy_hjclr.DataValueField = "hy_userid";
                        this.Hy_hjclr.DataBind();
                    }
                }
            }
        }
        //----只显示当前用户本部门人员end-------
    }