//保存
    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();
            }
        }
    }
Beispiel #3
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;
    }
Beispiel #5
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;
        }
    }
Beispiel #6
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;
        }
    }
Beispiel #7
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;
            }
    }
Beispiel #8
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();
 }
Beispiel #9
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;
                }
            }
        }
    }
    //输出群组
    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>");
            }
        }
    }
Beispiel #11
0
    private void DataPlay()
    {
        this.btn_submit.Visible = true; //保存

                if (this.Session["hyuid"].ToString() != "")
                {
                    this.ddlifleader.Items.Insert(0, "否");
                    this.ddlifleader.Items.Insert(1, "是");

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

                    //根据用户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();
                        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;

                    }
                    dtuser.Clear();
                    this.txtuserid.Enabled = false;
                    this.hy_deptname.Enabled = false;
                    this.txtusername.Enabled = false;
                }
    }
    protected void WebPageOpen()
    {
        string ls_uid = "";
        string ls_uname = "";
        string ls_deptid = "";
        string ls_deptname = "";
        string ls_key = "";
        string ls_url = "";
        string ls_docid = "";
        string ls_post = "";

        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();

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

        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();
            ls_post = dt_user.Rows[0]["hy_post"].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;
        Session["hypost"] = ls_post;

        //得到风格
        //HyoaClass.Hyoa_mystyle Hyoa_mystyle = new HyoaClass.Hyoa_mystyle();
        //DataTable dt_mystyle = Hyoa_mystyle.Getstylebyuserid(ls_uid);
        //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/";

        ////根据文档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>");
        //}
    }
Beispiel #13
0
    private void DataPlay()
    {
        this.btn_submit.Visible = true; //保存

        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();
                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();
            }
            dtuser.Clear();
            this.txtuserid.Enabled = false;
            this.txtusername.Enabled = false;
        }
    }
    private void DataPlay()
    {
        if (this.Request.QueryString["id"] != null)
        {
            this.txtid.Value = this.Request.QueryString["id"].ToString();
        }
        HyoaClass.Hyoa_wjcd Hyoa_wjcd = new HyoaClass.Hyoa_wjcd();
        DataTable dt = Hyoa_wjcd.Getdoc(this.txtid.Value);
        if (dt.Rows.Count > 0)
        {
            this.txtdocid.Value = dt.Rows[0]["DOCID"].ToString();
            this.txtid.Value = dt.Rows[0]["ID"].ToString();

            this.lblhy_fsrid.Text = dt.Rows[0]["hy_fsrid"].ToString();
            this.lblhy_fsrname.Text = dt.Rows[0]["hy_fsrname"].ToString();
            this.lblhy_datetime.Text = dt.Rows[0]["hy_datetime"].ToString();
            this.txthy_jsrname.Text = dt.Rows[0]["hy_jsrname"].ToString();
            this.txthy_jsrid.Text = dt.Rows[0]["hy_jsrid"].ToString();
            this.txthy_title.Text = dt.Rows[0]["hy_title"].ToString();
            this.ddlhy_foldername.Text = dt.Rows[0]["hy_foldername"].ToString();
            if (dt.Rows[0]["hy_jzsj"] == System.DBNull.Value)
            {
                this.jzsj.Text = "";
            }
            else
            {
                if (System.DateTime.Parse(dt.Rows[0]["hy_jzsj"].ToString()).ToShortDateString() == "1900-1-1")
                {
                    this.jzsj.Text = "";
                }
                else
                {
                    this.jzsj.Text = System.DateTime.Parse(dt.Rows[0]["hy_jzsj"].ToString()).ToShortDateString();
                }
            }
            if (dt.Rows[0]["hy_txfs"] == System.DBNull.Value)
            {
                this.txfs.Text = "";
            }
            else
            {
                this.txfs.Text = dt.Rows[0]["hy_txfs"].ToString();
            }
            //附件
            HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
            DataTable dt_fileatt = Hyoa_fileatt.GetfileattByFatherid(this.txtdocid.Value);
            if (dt_fileatt.Rows.Count > 0)
            {
                string ls_temp = "";
                for (var i = 0; i < dt_fileatt.Rows.Count; i++)
                {
                    string ls_path = dt_fileatt.Rows[i]["hy_filepath"].ToString();
                    ls_path = ls_path.Replace("+","%2B");
                    ls_temp += (i + 1).ToString() + "、<a href='/" + ls_path + "' target='_blank'>" + dt_fileatt.Rows[i]["hy_filename"].ToString() + "</a><br />";
                }
                this.lblhy_field2.Text = ls_temp;
            }

            this.hy_content1.Text = dt.Rows[0]["hy_body"].ToString();

            //显示回复列表
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            //string ls_hfsql = "select * from hyp_gzlxdhf where hy_fsrdocid='" + this.txtdocid.Value + "' ";
            string ls_jsrsql = "select * from hyp_wjcd where hy_type='收件' and DOCID='" + this.txtdocid.Value + "' order by  hy_jsrid asc";
            DataTable dt_jsr = Hyoa_global.GetDataTable(ls_jsrsql);
            if (dt_jsr.Rows.Count > 0)
            {
                //输出回复记录
                this.lblhf.Text = "";
                this.lblhf.Text = "<table width=\"95%\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" class=\"tb1-main\">";
                this.lblhf.Text += "<tr><td colspan='7' class='Tdcellright'>回复情况:共" + dt_jsr.Rows.Count + "人</td></tr>";
                this.lblhf.Text += "<tr>";
                this.lblhf.Text += "<td width='10%' class='Tdcellleft' align='center'>序号</td>";
                this.lblhf.Text += "<td width='15%' class='Tdcellleft' align='center'>部门名称</td>";
                this.lblhf.Text += "<td width='10%' class='Tdcellleft' align='center'>回复人</td>";
                this.lblhf.Text += "<td width='15%' class='Tdcellleft' align='center'>回复时间</td>";
                this.lblhf.Text += "<td class='Tdcellleft' align='center'>回复内容</td>";
                this.lblhf.Text += "<td width='15%' class='Tdcellleft' align='center'>附件</td>";
                this.lblhf.Text += "<td width='10%' class='Tdcellleft' align='center'>上报情况</td>";
                this.lblhf.Text += "</tr>";
                for (var i = 0; i < dt_jsr.Rows.Count; i++)
                {
                    string ls_bmmc = "";
                    string ls_hfr = "";
                    string ls_hfsj = "";
                    string ls_hfnr = "";
                    string ls_fj = "";
                    string ls_sbqk = "";

                    if (dt_jsr.Rows[i]["hy_ifyhf"].ToString() == "1")
                    {
                        string ls_hfsql = "select * from hyp_gzlxdhf where hy_fsrdocid='" + this.txtdocid.Value + "' and hy_jsrdocid='" + dt_jsr.Rows[i]["ID"].ToString() + "' ";
                        DataTable dt_hf = Hyoa_global.GetDataTable(ls_hfsql);
                        if (dt_hf.Rows.Count > 0)
                        {
                            ls_bmmc = dt_hf.Rows[0]["hy_deptname"].ToString();
                            ls_hfr = dt_hf.Rows[0]["hy_username"].ToString();
                            ls_hfsj = dt_hf.Rows[0]["hy_time"].ToString();
                            ls_hfnr = dt_hf.Rows[0]["hy_body"].ToString();
                            //附件
                            DataTable dt_fileatt2 = Hyoa_fileatt.GetfileattByFatherid(dt_hf.Rows[0]["hy_jsrdocid"].ToString());
                            if (dt_fileatt2.Rows.Count > 0)
                            {
                                for (var j = 0; j < dt_fileatt2.Rows.Count; j++)
                                {
                                    if (ls_fj != "")
                                    {
                                        ls_fj += "<br />";
                                    }
                                    ls_fj += (j + 1).ToString() + "、<a href='/" + dt_fileatt2.Rows[j]["hy_filepath"].ToString() + "' target='_blank'>" + dt_fileatt2.Rows[j]["hy_filename"].ToString() + "</a>";
                                }
                            }
                            //上报情况
                            System.TimeSpan ts = System.DateTime.Parse(dt_hf.Rows[0]["hy_time"].ToString()) - System.DateTime.Parse(dt_jsr.Rows[0]["hy_jzsj"].ToString());
                            int days = ts.Days;
                            if (days > 0)
                            {
                                ls_sbqk = "逾期上报";
                            }
                            else
                            {
                                ls_sbqk = "按期上报";
                            }
                        }
                    }
                    else
                    {
                        HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                        DataTable dt_user = Hyoa_user.Getuserallinfo(dt_jsr.Rows[i]["hy_jsrid"].ToString());
                        if (dt_user.Rows.Count > 0)
                        {
                            HyoaClass.Hyoa_dept Hyoa_dept = new HyoaClass.Hyoa_dept();
                            DataTable dt_dept = Hyoa_dept.Getdept(dt_user.Rows[0]["hy_deptid"].ToString());
                            if (dt_dept.Rows.Count > 0)
                            {
                                ls_bmmc = dt_dept.Rows[0]["hy_deptname"].ToString();
                            }
                        }
                        ls_hfr = dt_jsr.Rows[i]["hy_jsrname"].ToString();
                        //附件
                        DataTable dt_fileatt2 = Hyoa_fileatt.GetfileattByFatherid(dt_jsr.Rows[i]["ID"].ToString());
                        if (dt_fileatt.Rows.Count > 0)
                        {
                            for (var j = 0; j < dt_fileatt2.Rows.Count; j++)
                            {
                                ls_fj += (j + 1).ToString() + "、<a href='/" + dt_fileatt2.Rows[j]["hy_filepath"].ToString() + "' target='_blank'>" + dt_fileatt2.Rows[j]["hy_filename"].ToString() + "</a><br />";
                            }
                        }
                        //上报情况
                        ls_sbqk = "未上报";
                    }

                    this.lblhf.Text += "<tr>";
                    this.lblhf.Text += "<td width='10%' class='Tdcellright' align='center'>" + (i + 1).ToString() + "</td>";
                    this.lblhf.Text += "<td width='15%' class='Tdcellright' align='center'>" + ls_bmmc + "</td>";
                    this.lblhf.Text += "<td width='10%' class='Tdcellright' align='center'>" + ls_hfr + "</td>";
                    this.lblhf.Text += "<td width='15%' class='Tdcellright' align='center'>" + ls_hfsj + "&nbsp;</td>";
                    this.lblhf.Text += "<td class='Tdcellright' align='center'>" + ls_hfnr + "&nbsp;</td>";
                    this.lblhf.Text += "<td width='20%' class='Tdcellright' align='center'>" + ls_fj + "&nbsp;</td>";
                    this.lblhf.Text += "<td width='10%' class='Tdcellright' align='center'>" + ls_sbqk + "</td>";
                    this.lblhf.Text += "</tr>";
                }
                this.lblhf.Text += "</table>";
            }
        }
    }
Beispiel #15
0
    protected void btnsqlogin_Click(object sender, EventArgs e)
    {
        HyoaClass.Hyoa_user Users = new HyoaClass.Hyoa_user();
        DataTable dt = Users.Getuserallinfo(this.txtloginuid_sqyh.Text);
        if (dt.Rows.Count > 0)
        {
            Session["hyuid"] = this.txtloginuid_sqyh.Text;
            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();

            //得到兼职
            DataTable dt_jz = Users.Getjzinfobyuserid(this.txtloginuid_sqyh.Text);
            if (dt_jz.Rows.Count > 0)
            {
                Session["hydeptids_jz"] = "";
                Session["hydeptnames_jz"] = "";
                for (int i = 0; i < dt_jz.Rows.Count; i++)
                {
                    if (Session["hydeptids_jz"] == "")
                    {
                        Session["hydeptids_jz"] = dt_jz.Rows[i]["hy_deptid"].ToString();
                        Session["hydeptnames_jz"] = dt_jz.Rows[i]["hy_deptname"].ToString();
                    }
                    else
                    {
                        Session["hydeptids_jz"] += "," + dt_jz.Rows[i]["hy_deptid"].ToString();
                        Session["hydeptnames_jz"] += "," + dt_jz.Rows[i]["hy_deptname"].ToString();
                    }

                }
            }
            //得到风格
            HyoaClass.Hyoa_mystyle Hyoa_mystyle = new HyoaClass.Hyoa_mystyle();
            DataTable dt_mystyle = Hyoa_mystyle.Getstylebyuserid(this.txtloginuid_sqyh.Text);
            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/";

            //////为用户创建一个票证,并将其放入cookie或者url中(具体看你怎么设置票证的保存方式)
            ////FormsAuthentication.SetAuthCookie(this.txt_username.Value, true);

            this.Response.Redirect(this.lblurl.Text);
        }
        dt.Clear();
    }
Beispiel #16
0
    private void DataPlay()
    {
        HyoaClass.Hyoa_mail_config Hyoa_mail_config = new HyoaClass.Hyoa_mail_config ();
        DataTable dtmailcon = Hyoa_mail_config.Getmailconfigbyuserid(Session["hyuid"].ToString());
        for(int ii=0;ii<dtmailcon.Rows.Count;ii++)
        {
             this.ddlmailset.Items.Insert(ii,dtmailcon.Rows[ii]["hy_mailid"].ToString());
        }

        //新文档
        if (this.txtop.Value == "add")
        {
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
            this.txtdocid.Value = Hyoa_global.GetRandom();
            this.lblhy_fsrid.Text = Session["hyuid"].ToString();
            this.lblhy_fsrname.Text = Session["hyuname"].ToString();
            this.lblhy_datetime.Text = System.DateTime.Now.ToString();
            //如果是回复
            if (this.Request.QueryString["fhid"] != null)
            {
                HyoaClass.Hyoa_mail Hyoa_mail = new HyoaClass.Hyoa_mail();
                DataTable dt = Hyoa_mail.Getmail(this.Request.QueryString["fhid"].ToString());
                if (dt.Rows.Count > 0)
                {
                    if (dt.Rows[0]["hy_wbjsrid"].ToString() != "")
                    {
                        //this.txthy_jsrid.Text = dt.Rows[0]["hy_fsrid"].ToString();
                        this.txthy_wbjsrid.Text = dt.Rows[0]["hy_fsrid"].ToString();
                        //this.txthy_jsrid.Text = dt.Rows[0]["txthy_wbjsrid"].ToString();
                        //this.txthy_jsrname.Value = dt.Rows[0]["hy_fsrname"].ToString();
                        this.txthy_title.Text = "回复:" + dt.Rows[0]["hy_title"].ToString();
                    }
                    else
                    {
                        this.txthy_jsrid.Text = dt.Rows[0]["hy_fsrid"].ToString();
                        //this.txthy_wbjsrid.Text = dt.Rows[0]["hy_fsrid"].ToString();
                        this.txthy_jsrname.Value = dt.Rows[0]["hy_fsrname"].ToString();
                        this.txthy_title.Text = "回复:" + dt.Rows[0]["hy_title"].ToString();
                    }
                }
            }
             //如果是从在线人员中过来的
            if (this.Request.QueryString["recuserid"] != null)
            {
                HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
                DataTable dtuser = Hyoa_user.Getuserallinfo(this.Request.QueryString["recuserid"].ToString());
                if (dtuser.Rows.Count > 0)
                {
                    this.txthy_jsrid.Text = this.Request.QueryString["recuserid"].ToString();
                    this.txthy_jsrname.Value = dtuser.Rows[0]["hy_username"].ToString();
                }
            }
            //如果是转发
            if (this.Request.QueryString["zfid"] != null)
            {
                HyoaClass.Hyoa_mail Hyoa_mail = new HyoaClass.Hyoa_mail();
                DataTable dt = Hyoa_mail.Getmail(this.Request.QueryString["zfid"].ToString());
                if (dt.Rows.Count > 0)
                {
                    this.txthy_title.Text = "转发:" + dt.Rows[0]["hy_title"].ToString();
                    this.hy_content1.Value = dt.Rows[0]["hy_body"].ToString();
                    this.txtdocid.Value = dt.Rows[0]["docid"].ToString();

                    //附件
                    HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
                    DataTable dt_fileatt = Hyoa_fileatt.GetfileattByFatherid(dt.Rows[0]["DOCID"].ToString());
                    if (dt_fileatt.Rows.Count > 0)
                    {
                        string ls_temp = "";
                        for (var i = 0; i < dt_fileatt.Rows.Count; i++)
                        {
                            ls_temp += (i + 1).ToString() + "、<a href='/" + dt_fileatt.Rows[i]["hy_filepath"].ToString() + "' target='_blank'>" + dt_fileatt.Rows[i]["hy_filename"].ToString() + "</a><br />";
                        }
                        this.lblhy_field2.Text = ls_temp;

                    }
                }
                this.uploadhy_field2.Visible = false;
            }
        }
        else
        {
            if (this.Request.QueryString["id"] != null)
            {
                this.txtid.Value = this.Request.QueryString["id"].ToString();
            }
            HyoaClass.Hyoa_mail Hyoa_mail = new HyoaClass.Hyoa_mail();
            DataTable dt = Hyoa_mail.Getmail(this.txtid.Value);
            if (dt.Rows.Count > 0)
            {
                this.txtdocid.Value = dt.Rows[0]["DOCID"].ToString();
                this.txtid.Value = dt.Rows[0]["ID"].ToString();

                this.lblhy_fsrid.Text = dt.Rows[0]["hy_fsrid"].ToString();
                this.lblhy_fsrname.Text = dt.Rows[0]["hy_fsrname"].ToString();
                this.lblhy_datetime.Text = dt.Rows[0]["hy_datetime"].ToString();
                this.txthy_jsrname.Value = dt.Rows[0]["hy_jsrname"].ToString();
                this.txthy_jsrid.Text = dt.Rows[0]["hy_jsrid"].ToString();
                this.txthy_wbjsrid.Text = dt.Rows[0]["hy_wbjsrid"].ToString();
                this.txthy_title.Text = dt.Rows[0]["hy_title"].ToString();

                //附件
                HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
                DataTable dt_fileatt = Hyoa_fileatt.GetfileattByFatherid(this.txtdocid.Value);
                if (dt_fileatt.Rows.Count > 0)
                {
                    string ls_temp = "";
                    for (var i = 0; i < dt_fileatt.Rows.Count; i++)
                    {
                        ls_temp += (i + 1).ToString() + "、<a href='/" + dt_fileatt.Rows[i]["hy_filepath"].ToString() + "' target='_blank'>" + dt_fileatt.Rows[i]["hy_filename"].ToString() + "</a><br />";
                    }
                    this.lblhy_field2.Text = ls_temp;
                }

                this.hy_content1.Value = dt.Rows[0]["hy_body"].ToString();
                this.ddlifsavetofjx.SelectedValue = dt.Rows[0]["hy_ifsavetofjx"].ToString();

            }

            //20120210 start
            if (dt.Rows[0]["hy_type"].ToString() == "发件" & dt.Rows[0]["hy_foldername"].ToString() == "发件箱")
            {

                string text = "<TR height='30'><TD width='20%' align='center' class='Tdcellleft'>序号</TD><TD width='40%' align='center' class='Tdcellleft'>姓名</TD><TD width='40%' align='center' class='Tdcellleft'>回执时间</TD></TR>";
                HyoaClass.DAO db = new HyoaClass.DAO();
                string sql = "";
                sql = "select * from hyt_mail where DOCID='" + this.txtdocid.Value + "' and hy_type ='收件' and hy_sccksj <> '' order by hy_sccksj asc";
                DataTable dt2 = db.GetDataTable(sql);
                if (dt2.Rows.Count > 0)
                {
                    for (var i = 0; i < dt2.Rows.Count; i++)
                    {
                        text = text + "<TR height='30'><TD width='20%' align='center' class='Tdcellright'>" + (i+1).ToString() + "</TD>";
                        text = text + "<TD width='40%' align='center' class='Tdcellright'>" + dt2.Rows[i]["hy_jsrname"].ToString() + "</TD>";
                        text = text + "<TD width='40%' align='center' class='Tdcellright'>" + dt2.Rows[i]["hy_sccksj"].ToString() + "</TD></TR>";
                    }
                }
                this.hzlb.Text = text;
            }
            //20120210 end
         }
    }