コード例 #1
0
ファイル: list_tpgl.aspx.cs プロジェクト: wjszxli/Webapp
    protected void btndelinfo_Click(object sender, EventArgs e)
    {
        HyoaClass.DAO db = new HyoaClass.DAO();
        string sql = "";

        String[] v_uids = this.txtuids.Value.Split(',');
        for (int i = 0; i < v_uids.Length; i++)
        {
            if (v_uids[i] != "")
            {
                //删除当前记录
                sql = "delete from hyk_whzx_tpgl where id='" + v_uids[i] + "'";
                db.Execute(sql);
                //删除投票选项表记录
                sql = "delete from hyk_whzx_tpgl_tpxx where hy_tpztid='" + v_uids[i] + "'";
                db.Execute(sql);
                //删除投票明细记录
                sql = "delete from hyk_whzx_tpgl_tpmx where hy_tpztid='" + v_uids[i] + "'";
                db.Execute(sql);
            }
        }
        this.txtuids.Value = "";
        //DataPlay(1);
        db.Close();
        DataPlay(System.Int32.Parse(this.curpage.Text));
    }
コード例 #2
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("/login.aspx");

        string ls_tip = "保存成功!";

        //新文档时
        string lscolunid = "", sql = "";
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.DAO db = new HyoaClass.DAO();

        if (this.txtselcolid.Value =="")
        {
            Response.Write("<script>alert('请选择查询的字段!');window.location.href = window.location.href;</script>");
            return;
        }

        if (this.txtop.Value == "add")
        {
            //判断是否重复
            string sql1 = "select * from hyt_searchconfig where hy_mudelid='" + this.ddlmudelid.SelectedValue + "' and hy_tableid='" + this.ddltableid.SelectedValue + "'";
            DataTable dt = db.GetDataTable(sql1);
            if (dt.Rows.Count > 0)
            {
                Response.Write("<script>alert('该模块已添加,请修改!');window.location.href = window.location.href;</script>");
                return;
            }

            lscolunid = Hyoa_global.GetRandom();
            sql = "insert into hyt_searchconfig (ID,hy_mudelid,hy_tableid,hy_sort,hy_columnshowid,hy_columnshow,hy_ifsearch,hy_xszdid,hy_xszd,hy_kckry,hy_kckryid) values (";
            sql += "'" + lscolunid + "','" + this.ddlmudelid.SelectedValue + "','" + this.ddltableid.SelectedValue + "'," + float.Parse(this.txtsort.Text) + "";
            sql += ",'" + this.txtselcolid.Value + "','" + this.txtselcol.Value + "','" + this.ddlifsearch.SelectedValue + "'";
            sql += ",'" + this.txtselsearchid.Value + "','" + this.txtselsearch.Value + "','" + this.hy_field41_1.Value + "','" + this.hy_field43_1.Value + "')";
            db.Execute(sql);
        }
        else
        {
            sql = "update hyt_searchconfig  set hy_mudelid='" + this.ddlmudelid.SelectedValue + "', hy_tableid='" + this.ddltableid.SelectedValue + "',";
            sql += "hy_sort=" + float.Parse(this.txtsort.Text) + ",hy_columnshowid='" + this.txtselcolid.Value + "',hy_columnshow='" + this.txtselcol.Value + "',";
            sql += " hy_ifsearch='" + this.ddlifsearch.SelectedValue + "',hy_xszdid='" + this.txtselsearchid.Value + "',hy_xszd='" + this.txtselsearch.Value + "', ";
            sql += " hy_kckry='" + this.hy_field41_1.Value + "',hy_kckryid='" + this.hy_field43_1.Value + "' where ID='" + this.txtdocid.Value + "'";
            db.Execute(sql);
        }
        db.Close();
        //处理完成后的提示及跳转
        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>");
        }
    }
コード例 #3
0
ファイル: test_sqb.aspx.cs プロジェクト: wjszxli/Webapp
 protected void Page_Load(object sender, EventArgs e)
 {
     HyoaClass.DAO db = new HyoaClass.DAO();
     String lssql = "";
     for (int i = 0; i < 8000000; i++)
     {
         lssql = "insert into hyq_tb1_main (docid,hy_maindocid,hy_xm,hy_ytbrgx,hy_ytbrgx_bz) values ('" + i.ToString() + "','" + i.ToString() + "','" + i.ToString() + "','" + i.ToString() + "','" + i.ToString() +"')";
         db.Execute(lssql);
     }
     this.Response.Write("插入完成!");
 }
コード例 #4
0
    protected void btndelinfo_Click(object sender, EventArgs e)
    {
        HyoaClass.DAO db = new HyoaClass.DAO();

        String[] v_uids = this.txtuids.Value.Split(',');
        for (var i = 0; i < v_uids.Length; i++)
        {
            if (v_uids[i] != "")
            {
                string sql = "delete from hyt_searchconfig where ID='" + v_uids[i] + "'";
                db.Execute(sql);
            }
        }
        db.Close();
        this.txtuids.Value = "";
        //DataPlay(1);
        DataPlay(System.Int32.Parse(this.curpage.Text));
    }
コード例 #5
0
ファイル: hy_test1.aspx.cs プロジェクト: wjszxli/Webapp
    protected void Page_Load(object sender, EventArgs e)
    {
        //生成省侨办的用户及密码

            HyoaClass.DAO db = new HyoaClass.DAO();
            String lssql = "select * from hyt_user where 1=1 order by hy_userid";
            DataTable dt = db.GetDataTable(lssql);
            this.Response.Write("<table border='1'>");
            Random Random1 = new Random();
            int i1;
            String lspassword = "";
            String lssqlupdate = "";
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                this.Response.Write("<tr>");
                this.Response.Write("<td>");
                this.Response.Write("登录名");
                this.Response.Write("</td>");
                this.Response.Write("<td>");
                this.Response.Write(dt.Rows[i]["hy_userid"].ToString());
                this.Response.Write("</td>");
                this.Response.Write("<td>");
                this.Response.Write("中文名");
                this.Response.Write("</td>");
                this.Response.Write("<td>");
                this.Response.Write(dt.Rows[i]["hy_username"].ToString());
                this.Response.Write("</td>");
                this.Response.Write("<td>");
                this.Response.Write("密码");
                this.Response.Write("</td>");
                this.Response.Write("<td>");
                i1 = Random1.Next(100000, 999999);
                this.Response.Write(i1.ToString());
                this.Response.Write("</td>");
                this.Response.Write("</tr>");

                lspassword = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(i1.ToString(), "MD5");
                lssqlupdate = "update hyt_user set hy_pwd='" + lspassword + "' where hy_userid='" + dt.Rows[i]["hy_userid"].ToString() + "'";
                db.Execute(lssqlupdate);

            }
            this.Response.Write("</table>");
    }
コード例 #6
0
ファイル: main_tpgl.aspx.cs プロジェクト: wjszxli/Webapp
    //驳回
    protected void btn_bh1_Click(object sender, EventArgs e)
    {
        //更新投票表
        HyoaClass.DAO db = new HyoaClass.DAO();
        string ls_sql = "update hyk_whzx_tpgl set hy_bhsj=getdate(),hy_gjzt='驳回投票' where id='" + this.txtdocid.Value + "'";
        db.Execute(ls_sql);
        db.Close();

        //处理完成后的提示及跳转
        string ls_tip = "投票驳回成功!";
        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>");
        }
    }
コード例 #7
0
ファイル: list_qjzl.aspx.cs プロジェクト: wjszxli/Webapp
 protected void btndelinfo_Click(object sender, EventArgs e)
 {
     //HyoaClass.Hyoa_iplimit Hyoa_iplimit = new HyoaClass.Hyoa_iplimit();
     HyoaClass.DAO db = new HyoaClass.DAO();
     String[] v_uids = this.txtuids.Value.Split(',');
     for (var i = 0; i < v_uids.Length; i++)
     {
         if (v_uids[i] != "")
         {
             //Hyoa_iplimit.ID = v_uids[i];
             //Hyoa_iplimit.Delete();
             string lssql = "delete from hyp_flowmain where  hy_mudelid ='moduleqjzl' and hy_tableid='ac5e8ddd-d74c-4c9d-b0bf-5c23fc77b589' and DOCID='" + v_uids[i] + "'";
             db.Execute(lssql);
         }
     }
     this.txtuids.Value = "";
     //DataPlay(1);
     DataPlay(System.Int32.Parse(this.curpage.Text));
     db.Close();
 }
コード例 #8
0
ファイル: main_tpgl.aspx.cs プロジェクト: wjszxli/Webapp
    //添加候选项
    protected void btn_add1_Click(object sender, EventArgs e)
    {
        HyoaClass.DAO db = new HyoaClass.DAO();
        string ls_sql = "";
        int ls_sort = 1;
        //通过问卷题目ID得到最大排序号
        ls_sql = "select max(hy_sort) as hy_sort,count(*) as num from hyk_whzx_tpgl_tpxx where hy_tpztid='" + this.txtdocid.Value + "' order by hy_sort desc ";
        DataTable dt = db.GetDataTable(ls_sql);
        if (dt.Rows[0]["num"].ToString() != "0")
        {
            ls_sort = System.Int32.Parse(dt.Rows[0]["hy_sort"].ToString()) + 1;
        }
        dt.Clear();
        ls_sql = "insert into hyk_whzx_tpgl_tpxx (id,hy_tpztid,hy_tpxxmc,hy_sort) values (";
        ls_sql += "'" + System.Guid.NewGuid().ToString() + "','" + this.txtdocid.Value + "','" + this.hy_hxx.Value + "'," + ls_sort + "";
        ls_sql += ")";
        db.Execute(ls_sql);

        savetj("准备投票");

        //处理完成后的提示及跳转(增加刷新候选项功能)
        Response.Write("<script>window.location='main_tpgl.aspx?op=modify&id=" + this.txtdocid.Value + "&url=" + this.txturl.Value + "'</script>");
    }
コード例 #9
0
ファイル: wstp.aspx.cs プロジェクト: wjszxli/Webapp
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("/login.aspx");

        string[] lvrow;
        string[] lvcol;
        lvrow = this.txtsubmit.Text.Split('*');
        HyoaClass.DAO db = new HyoaClass.DAO();
        DataTable dt;
        string lssql = "";
        string lssqlupdata = "";
        string lssqlupdatapeo = "";
        int lsvalue = 0;
        for (int i = 0; i < lvrow.Length; i++)
        {
            lvcol = lvrow[i].Split('+');
            lssql = "select * from hyp_flowmain where hy_mudelid='moduletpgl' and hy_tableid='bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd' and DOCID='" + lvcol[0] + "'";
            dt = db.GetDataTable(lssql);
            //this.Response.Write("<script>alert('" + lvcol[1] + "');</script>");
            if (dt.Rows[0]["hy_field1"].ToString() == lvcol[1])
            {
                if (dt.Rows[0]["hy_field11"].ToString() == "")
                {
                    lsvalue = 1;
                }
                else
                {
                    lsvalue = System.Int32.Parse(dt.Rows[0]["hy_field11"].ToString()) + 1;
                }
                //票数+1
                lssqlupdata = "update hyp_flowmain set hy_field11=" + lsvalue.ToString() + " where hy_mudelid='moduletpgl' and hy_tableid='bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd' and DOCID='" + lvcol[0] + "'";
                db.Execute(lssqlupdata);
                //记录投票人信息记录
                lssqlupdatapeo = "update hyp_flowmain set hy_field7=hy_field7+'+" + this.Session["hyuname"].ToString() + "' where hy_mudelid='moduletpgl' and hy_tableid='bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd' and DOCID='" + lvcol[0] + "'";
                db.Execute(lssqlupdatapeo);
            }
            if (dt.Rows[0]["hy_field2"].ToString() == lvcol[1])
            {
                if (dt.Rows[0]["hy_field12"].ToString() == "")
                {
                    lsvalue = 1;
                }
                else
                {
                    lsvalue = System.Int32.Parse(dt.Rows[0]["hy_field12"].ToString()) + 1;
                }
                lssqlupdata = "update hyp_flowmain set hy_field12=" + lsvalue.ToString() + " where hy_mudelid='moduletpgl' and hy_tableid='bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd' and DOCID='" + lvcol[0] + "'";
                db.Execute(lssqlupdata);
                //记录投票人信息记录
                lssqlupdatapeo = "update hyp_flowmain set hy_field8=hy_field8+'+" + this.Session["hyuname"].ToString() + "' where hy_mudelid='moduletpgl' and hy_tableid='bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd' and DOCID='" + lvcol[0] + "'";
                db.Execute(lssqlupdatapeo);
            }
            if (dt.Rows[0]["hy_field3"].ToString() == lvcol[1])
            {
                if (dt.Rows[0]["hy_field13"].ToString() == "")
                {
                    lsvalue = 1;
                }
                else
                {
                    lsvalue = System.Int32.Parse(dt.Rows[0]["hy_field13"].ToString()) + 1;
                }
                lssqlupdata = "update hyp_flowmain set hy_field13=" + lsvalue.ToString() + " where hy_mudelid='moduletpgl' and hy_tableid='bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd' and DOCID='" + lvcol[0] + "'";
                db.Execute(lssqlupdata);
                //记录投票人信息记录
                lssqlupdatapeo = "update hyp_flowmain set hy_field9=hy_field9+'+" + this.Session["hyuname"].ToString() + "' where hy_mudelid='moduletpgl' and hy_tableid='bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd' and DOCID='" + lvcol[0] + "'";
                db.Execute(lssqlupdatapeo);
            }
            if (dt.Rows[0]["hy_field4"].ToString() == lvcol[1])
            {
                if (dt.Rows[0]["hy_field14"].ToString() == "")
                {
                    lsvalue = 1;
                }
                else
                {
                    lsvalue = System.Int32.Parse(dt.Rows[0]["hy_field14"].ToString()) + 1;
                }
                lssqlupdata = "update hyp_flowmain set hy_field14=" + lsvalue.ToString() + " where hy_mudelid='moduletpgl' and hy_tableid='bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd' and DOCID='" + lvcol[0] + "'";
                db.Execute(lssqlupdata);
                //记录投票人信息记录
                lssqlupdatapeo = "update hyp_flowmain set hy_field17=hy_field17+'+" + this.Session["hyuname"].ToString() + "' where hy_mudelid='moduletpgl' and hy_tableid='bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd' and DOCID='" + lvcol[0] + "'";
                db.Execute(lssqlupdatapeo);
            }
            if (dt.Rows[0]["hy_field5"].ToString() == lvcol[1])
            {
                if (dt.Rows[0]["hy_field15"].ToString() == "")
                {
                    lsvalue = 1;
                }
                else
                {
                    lsvalue = System.Int32.Parse(dt.Rows[0]["hy_field15"].ToString()) + 1;
                }
                lssqlupdata = "update hyp_flowmain set hy_field15=" + lsvalue.ToString() + " where hy_mudelid='moduletpgl' and hy_tableid='bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd' and DOCID='" + lvcol[0] + "'";
                db.Execute(lssqlupdata);
                //记录投票人信息记录
                lssqlupdatapeo = "update hyp_flowmain set hy_field18=hy_field18+'+" + this.Session["hyuname"].ToString() + "' where hy_mudelid='moduletpgl' and hy_tableid='bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd' and DOCID='" + lvcol[0] + "'";
                db.Execute(lssqlupdatapeo);
            }
            if (dt.Rows[0]["hy_field6"].ToString() == lvcol[1])
            {
                if (dt.Rows[0]["hy_field16"].ToString() == "")
                {
                    lsvalue = 1;
                }
                else
                {
                    lsvalue = System.Int32.Parse(dt.Rows[0]["hy_field16"].ToString()) + 1;
                }
                lssqlupdata = "update hyp_flowmain set hy_field16=" + lsvalue.ToString() + " where hy_mudelid='moduletpgl' and hy_tableid='bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd' and DOCID='" + lvcol[0] + "'";
                db.Execute(lssqlupdata);
                //记录投票人信息记录
                lssqlupdatapeo = "update hyp_flowmain set hy_field19=hy_field19+'+" + this.Session["hyuname"].ToString() + "' where hy_mudelid='moduletpgl' and hy_tableid='bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd' and DOCID='" + lvcol[0] + "'";
                db.Execute(lssqlupdatapeo);
            }

            string lsupmain = "update hyp_flowmain set hy_field42=hy_field42+'+"+this.Session["hyuname"].ToString()+"' where hy_mudelid='moduletpgl' and hy_tableid='bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd' and DOCID='" + lvcol[0] + "'";
            //this.txttest.Text = lsupmain;
            db.Execute(lsupmain);

        }
        db.Close();
        this.Response.Write("<script>alert('投票成功!');window.close();</script>");
    }
コード例 #10
0
ファイル: list_lcjsdc.aspx.cs プロジェクト: wjszxli/Webapp
    protected void btndcinfo_Click(object sender, EventArgs e)
    {
        HyoaClass.DAO db = new HyoaClass.DAO();
        String[] v_uids = this.txtuids.Value.Split(',');
        for (var i = 0; i < v_uids.Length; i++)
        {
            if (v_uids[i] != "")
            {
                string ls_sql = "update hyp_flowmain set hy_field59='已导出' where DOCID = '" + v_uids[i] + "'  ";
                db.Execute(ls_sql);
            }
        }
        this.txtuids.Value = "";
        //DataPlay(1);

        db.Close();

        DataPlay(System.Int32.Parse(this.curpage.Text));
    }
コード例 #11
0
ファイル: main_tpgl.aspx.cs プロジェクト: wjszxli/Webapp
    //打开文档显示
    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();
            HyoaClass.DAO db = new HyoaClass.DAO();

            string sql = "";

            //新文档
            if (this.Request.QueryString["op"] == "add")
            {
                this.txtdocid.Value = System.Guid.NewGuid().ToString();
                this.txtdjr.Value = Session["hyuname"].ToString();
                this.txtdjrid.Value = Session["hyuid"].ToString();
                this.txtdjsj.Value = System.DateTime.Now.ToString("yyyy-MM-dd");

                this.hy_tpjssj.Value = System.DateTime.Now.AddDays(7).ToString("yyyy-MM-dd");
                //是投票管理员,提交按钮显示
                this.btn_submit.Visible = true; //提交
                this.btn_tj.Visible = true; //提交
            }
            //旧文档
            if (this.Request.QueryString["op"] == "modify")
            {
                if (this.Request.QueryString["id"] != null)
                {
                    //根据id得到信息
                    this.txtdocid.Value = this.Request.QueryString["id"].ToString();
                    sql = "select * from hyk_whzx_tpgl where id='" + this.txtdocid.Value + "'";
                    DataTable dt = db.GetDataTable(sql);
                    if (dt.Rows.Count > 0)
                    {
                        #region 根据id得到信息
                        this.txtdjr.Value = dt.Rows[0]["hy_djr"].ToString();
                        this.txtdjrid.Value = dt.Rows[0]["hy_djrid"].ToString();
                        this.txtdjsj.Value = System.DateTime.Parse(dt.Rows[0]["hy_djsj"].ToString()).ToString("yyyy-MM-dd");

                        this.hy_bt.Text = dt.Rows[0]["hy_bt"].ToString();
                        this.hy_btR.Text = dt.Rows[0]["hy_bt"].ToString();
                        this.hy_tpjssj.Value = System.DateTime.Parse(dt.Rows[0]["hy_tpjssj"].ToString()).ToString("yyyy-MM-dd");
                        this.hy_tpjssjR.Text = System.DateTime.Parse(dt.Rows[0]["hy_tpjssj"].ToString()).ToString("yyyy-MM-dd");

                        //this.ddlType.SelectedValue = dt.Rows[0]["hy_tplbid"].ToString();

                        foreach (ListItem lt in this.ddlType.Items)
                        {
                            if (lt.Value == dt.Rows[0]["hy_tplbid"].ToString())
                            {
                                lt.Selected = true;
                                break;
                            }
                        }
                        this.hy_tplbR.Text = dt.Rows[0]["hy_tplb"].ToString();

                        this.hy_xxsm.Text = dt.Rows[0]["hy_xxsm"].ToString();
                        this.hy_xxsmR.Text = dt.Rows[0]["hy_xxsm"].ToString();

                        StringBuilder str = new StringBuilder();
                        string lssql = "select * from hyk_whzx_tpgl_tpxx where hy_tpztid='" + this.txtdocid.Value + "'";
                        DataTable dt2 = db.GetDataTable(lssql);
                        if (dt2.Rows.Count > 0)
                        {
                            for (int i = 0; i < dt2.Rows.Count; i++)
                            {
                                string ls_xxid = dt2.Rows[i]["id"].ToString();
                                //根据选项ID去统计该选项有多少选票
                                string xxsql = "select * from hyk_whzx_tpgl_tpmx where hy_tpxxid='" + ls_xxid + "'";
                                DataTable dt3 = db.GetDataTable(xxsql);
                                string ls_ytps = dt3.Rows.Count.ToString();
                                str.Append("<div style=\"height:25px\">");
                                str.Append(i+1+"、"+dt2.Rows[i]["hy_tpxxmc"].ToString());
                                str.Append("&nbsp;&nbsp;(已投" + ls_ytps + "票)");
                                str.Append("</div>");
                                dt3.Clear();
                            }

                        }
                        dt2.Clear();
                        this.hy_hxxR.Text = str.ToString();

                        if (dt.Rows[0]["hy_ktxx"].ToString() == "单选")
                        {
                            hy_rdi1.Checked = true;
                        }
                        else
                        {
                            hy_rdi2.Checked = true;
                        }
                        this.hy_ktxxR.Text = dt.Rows[0]["hy_ktxx"].ToString();

                        this.hy_kydz.Text = dt.Rows[0]["hy_ktpz"].ToString();
                        this.hy_kydzid.Value = dt.Rows[0]["hy_ktpzid"].ToString();
                        this.hy_kydzR.Text = dt.Rows[0]["hy_ktpz"].ToString();
                        this.hy_kcktpjg.Text = dt.Rows[0]["hy_kcktpjg"].ToString();
                        this.hy_kcktpjgid.Value = dt.Rows[0]["hy_kcktpjgid"].ToString();
                        this.hy_kcktpjgR.Text = dt.Rows[0]["hy_kcktpjg"].ToString();
                        //投票状态
                        this.txthy_gjzt.Value = dt.Rows[0]["hy_gjzt"].ToString();

                        //判断该投票是否已经过期==============
                        if (System.DateTime.Parse(dt.Rows[0]["hy_tpjssj"].ToString()).ToString("yyyy-MM-dd") != "1900-01-01" && Convert.ToDateTime(System.DateTime.Now.ToString("yyyy-MM-dd")) > Convert.ToDateTime(System.DateTime.Parse(dt.Rows[0]["hy_tpjssj"].ToString()).ToString("yyyy-MM-dd")))
                        {
                            //将该文档设为“结束投票”
                            string ls_sql = "update hyk_whzx_tpgl set hy_jssj=getdate(),hy_gjzt='结束投票' where id='" + this.txtdocid.Value + "'";
                            db.Execute(ls_sql);

                            //发送待办事宜给审阅人员
                            string ls_dburl = "/ekp/whzx/list_tpgl_tpjg.aspx?fid=" + this.txtdocid.Value + "&mid=" + this.txtmudelid.Value + "&pop=1";
                            string ls_body = "[" + this.hy_bt.Text + "]的投票已结束,请查看";
                            //部分可查看结果人员
                            string[] lv_kydzid = this.hy_kcktpjgid.Value.Split('+');
                            string[] lv_kydzname = this.hy_kcktpjgR.Text.Split('+');

                            for (int ii = 0; ii < lv_kydzid.Length; ii++)
                            {
                                Hyoa_global.Senddbsy_global(this.txtdocid.Value, lv_kydzid[ii], lv_kydzname[ii], this.txtdjrid.Value,
                                    this.txtdjr.Value, ls_dburl, "待阅", this.txtmudelid.Value, "待办箱", "一般", ls_body, "请阅读", 0, "", "");
                            }

                        }

                        #endregion
                    }
                    dt.Clear();

                    //-----隐藏控制 s-------

                    //结果可以查看人员的权限
                    //Response.Write(this.hy_kcktpjgid.Value);
                    if (this.hy_kcktpjgid.Value.IndexOf(this.Session["hyuid"].ToString()) > 0)
                    {
                        this.btn_jg.Visible = true;
                    }

                    if (this.txtdjrid.Value == Session["hyuid"].ToString())
                    {
                        #region 如果当前用户是登记人员
                        if (this.txthy_gjzt.Value == "准备投票" || this.txthy_gjzt.Value == "驳回投票" || this.txthy_gjzt.Value == "撤销投票")
                        {
                            //未提交审核,则显示保存按钮和提交按钮
                            this.btn_submit.Visible = true;
                            this.btn_tj.Visible = true;
                        }
                        else if (this.txthy_gjzt.Value == "投票中")
                        {
                            //已提交投票就不能修改字段了
                            NoEdit();
                            this.btn_js.Visible = true;
                        }
                        else if (this.txthy_gjzt.Value == "待审投票")
                        {

                        }
                        else
                        {
                            NoEdit();
                        }

                        //else
                        //{
                        //    //已提交投票就不能修改字段了
                        //    NoEdit();
                        //}
                        #endregion
                    }
                    if (Hyoa_global.isHaveRole("Role_ekp004", this.Session["hyuid"].ToString()))
                    {
                        #region 如果当前用户是审核人员
                        //待审时,则显示发布、驳回按钮
                        if (this.txthy_gjzt.Value == "待审投票")
                        {
                            this.btn_fb.Visible = true;
                            this.btn_bh.Visible = true;
                        }
                        //发布时,则显示撤稿按钮
                        if (this.txthy_gjzt.Value == "投票中")
                        {
                            this.btn_cg.Visible = true;
                        }
                        //撤稿时,则显示发布按钮
                        if (this.txthy_gjzt.Value == "撤销投票")
                        {
                            this.btn_fb.Visible = true;
                        }
                        #endregion
                    }
                    if (this.txthy_gjzt.Value == "结束投票")
                    {
                        #region 如果稿件状态是结束投票

                        NoEdit();

                        #endregion
                    }
                    //-----隐藏控制 e-------
                }
            }
            db.Close();
        }
    }
コード例 #12
0
ファイル: main_tpgl_wytp.aspx.cs プロジェクト: wjszxli/Webapp
    //打开文档显示
    private void DataPlay()
    {
        if (this.Request.QueryString["op"] != null)
        {
            HyoaClass.DAO db = new HyoaClass.DAO();
            this.txtop.Value = this.Request.QueryString["op"].ToString();           //我要投票还是查看投票
            this.txtdocid.Value = this.Request.QueryString["id"].ToString();        //文档ID

            //我要投票
            if (this.Request.QueryString["op"] == "add")
            {
                //判断是否已经投票过
                string issql = "select * from hyk_whzx_tpgl_tpmx where hy_tpztid='" + this.txtdocid.Value + "' and hy_tprid ='" + Session["hyuid"].ToString() + "'";
                DataTable isdt = db.GetDataTable(issql);
                if (isdt.Rows.Count > 0)
                {
                    Response.Write("<script>alert('您已经投票了!');window.location='list_tpgl_wytp.aspx'</script>");
                }
                //显示我要投票
                this.btn_submit.Visible = true;
            }

            //根据id得到信息
            string sql = "select * from hyk_whzx_tpgl where id='" + this.txtdocid.Value + "'";
            DataTable dt = db.GetDataTable(sql);
            if (dt.Rows.Count > 0)
            {
                #region 根据id得到信息
                this.txtdjr.Value = dt.Rows[0]["hy_djr"].ToString();
                this.txtdjrid.Value = dt.Rows[0]["hy_djrid"].ToString();
                this.hy_lbl1.Text = System.DateTime.Parse(dt.Rows[0]["hy_djsj"].ToString()).ToString("yyyy-MM-dd");
                this.hy_lbl2.Text = dt.Rows[0]["hy_tplb"].ToString();
                this.hy_lbl3.Text = System.DateTime.Parse(dt.Rows[0]["hy_tpkssj"].ToString()).ToString("yyyy-MM-dd");
                this.hy_lbl4.Text = System.DateTime.Parse(dt.Rows[0]["hy_tpjssj"].ToString()).ToString("yyyy-MM-dd");
                this.hy_lbl5.Text = dt.Rows[0]["hy_xxsm"].ToString();
                this.hy_lbl6.Text = dt.Rows[0]["hy_bt"].ToString();

                //判断该投票是否已经过期
                if (Convert.ToDateTime(System.DateTime.Now.ToString("yyyy-MM-dd")) > Convert.ToDateTime(this.hy_lbl4.Text))
                {
                    //将该文档设为“结束投票”
                    string ls_sql = "update hyk_whzx_tpgl set hy_jssj=getdate(),hy_gjzt='结束投票' where id='" + this.txtdocid.Value + "'";
                    db.Execute(ls_sql);

                    Response.Write("<script>alert('对不起,该投票已经结束!');window.location='list_tpgl_wytp.aspx'</script>");
                    return;
                }

                //根据单选或多选得到选项
                this.hy_tpfs.Value = dt.Rows[0]["hy_ktxx"].ToString();     //单选还是多选
                string lssql = "select * from hyk_whzx_tpgl_tpxx where hy_tpztid='" + this.txtdocid.Value + "'";
                DataTable dt2 = db.GetDataTable(lssql);
                if (this.hy_tpfs.Value == "多选")
                {
                    this.GridView1.Visible = false;
                    GridView2.DataSource = dt2;
                    GridView2.DataBind();
                }
                else
                {
                    this.GridView2.Visible = false;
                    GridView1.DataSource = dt2;
                    GridView1.DataBind();
                }
                dt2.Clear();
                #endregion
            }
            dt.Clear();
            db.Close();
        }
    }
コード例 #13
0
ファイル: main.aspx.cs プロジェクト: wjszxli/Webapp
 //删除
 protected void Button_Del_Click(object sender, EventArgs e)
 {
     HyoaClass.DAO db = new HyoaClass.DAO();
     string lssql = "delete from hyp_flowmain where DOCID='" + this.txtdocid.Value + "'";
     db.Execute(lssql);
     string lssqldbsy = "delete from hyt_dbsy where DOCID='" + this.txtdocid.Value + "'";
     db.Execute(lssqldbsy);
     db.Close();
     //处理完成后的提示及跳转(增加刷新附件功能)
     string ls_tip = "删除成功!";
     if (this.txtifpop.Value == "")
     {
         Response.Write("<script>window.location='" + this.txturl.Value + "'</script>");
     }
     else
     {
         Response.Write("<script>window.opener.location.reload();window.opener=null;window.open('','_self');window.close();</script>");
     }
     //效能办公日志记录
     hyXnxtSaveLogs("", "删除一条记录", "删除");
 }
コード例 #14
0
ファイル: main_tpgl.aspx.cs プロジェクト: wjszxli/Webapp
    private void dg1_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
    {
        string ls_ids = e.Item.Cells[0].Text;
        string ls_sort = ((TextBox)e.Item.Cells[1].Controls[0]).Text;
        string ls_hxx = ((TextBox)e.Item.Cells[2].Controls[0]).Text;
        HyoaClass.DAO db = new HyoaClass.DAO();
        string ls_sqlgx = "update hyk_whzx_tpgl_tpxx set hy_sort="+System.Int32.Parse(ls_sort)+", hy_tpxxmc='" + ls_hxx + "' where id ='" + ls_ids + "'";

        db.Execute(ls_sqlgx);

        dg1.EditItemIndex = -1;

        this.DataBindHxx(); //重新协调绑定
    }
コード例 #15
0
ファイル: main.aspx.cs プロジェクト: wjszxli/Webapp
    //发布投票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>");
    }
コード例 #16
0
ファイル: main_tplb.aspx.cs プロジェクト: wjszxli/Webapp
    //保存
    protected void btn_save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("../../login.aspx");

        string ls_tip = "保存成功!";

        HyoaClass.DAO db = new HyoaClass.DAO();
        string sql = "";

        if (this.hy_field2.Value == "")
        {
            this.hy_field2.Value = "1";
        }

        //新文档时
        if (this.txtop.Value == "add")
        {

            sql += "insert into hyk_whzx_tpgl_tplb (id,hy_tplbmc,hy_sort) values (";
            sql += "'" + System.Guid.NewGuid().ToString() + "','" + this.hy_field1.Value + "'," + int.Parse(this.hy_field2.Value) + ")";
            db.Execute(sql);
        }
        else
        {
            sql += "update hyk_whzx_tpgl_tplb set hy_tplbmc='" + this.hy_field1.Value + "',hy_sort=" + int.Parse(this.hy_field2.Value) + " where id='" + this.hy_id.Value + "'";
            db.Execute(sql);
        }

        //处理完成后的提示及跳转
        if (this.txtifpop.Value == "")
        {
            Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Text + "'</script>");
        }
        else
        {
            Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
        }
        db.Close();
    }
コード例 #17
0
ファイル: main_flowfield.aspx.cs プロジェクト: wjszxli/Webapp
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("/login.aspx");

        string ls_tip = "保存成功!";

        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        //新文档时
        if (this.txtop.Value == "add")
        {
            Hyoa_flowfield.ID = Hyoa_global.GetRandom();
            Hyoa_flowfield.hy_tableid = this.txttableid.Text;
            Hyoa_flowfield.hy_mudelid = this.txtmudelid.Text;
            Hyoa_flowfield.hy_flowid = this.txtflowid.Text;
            Hyoa_flowfield.hy_fieldid = this.txtfieldid.Text;
            Hyoa_flowfield.hy_fieldname = this.txtfieldname.Text;
            Hyoa_flowfield.hy_fieldtype = this.ddlfieldtype.SelectedValue;
            Hyoa_flowfield.hy_ifreadonly = this.ddlifreadonly.SelectedValue;
            Hyoa_flowfield.hy_defaultvaluetype = System.Int32.Parse(this.ddldefaultvaluetype.SelectedValue);
            Hyoa_flowfield.hy_defaultvalue = this.txtdefaultvalue.Text;
            Hyoa_flowfield.hy_optiontype = System.Int32.Parse(this.ddloptiontype.SelectedValue);

            if (ddloptiontype.SelectedValue == "1" && ddlwhichtable.SelectedIndex != 0)
            {
                if(this.ddlwhichtable.SelectedIndex==0)
                    Hyoa_flowfield.hy_options = this.txtoptions.Text;
                else
                    Hyoa_flowfield.hy_options = this.txtoptions.Text + " from hyp_flowmain where hy_tableid='" + ddlwhichtable.SelectedValue + "' order by " + this.txtsortby.Text + " " + this.ddlsorttype.SelectedValue;
            }
            else
            {
                Hyoa_flowfield.hy_options = this.txtoptions.Text;
            }

            Hyoa_flowfield.hy_onclick = this.txtonclick.Text;
            Hyoa_flowfield.hy_ondblclick = this.txtondblclick.Text;
            Hyoa_flowfield.hy_onchange = this.txtonchange.Text;
            Hyoa_flowfield.hy_onkeydown = this.txtonkeydown.Text;
            Hyoa_flowfield.hy_onkeyup = this.txtonkeyup.Text;
            Hyoa_flowfield.hy_sqlfield = this.ddlsqlfield.SelectedValue;
            Hyoa_flowfield.hy_class = this.txtclass.Text;
            Hyoa_flowfield.hy_width = this.txtwidth.Text;
            Hyoa_flowfield.hy_height = this.txtheight.Text;
            Hyoa_flowfield.hy_tdnums = System.Int32.Parse(this.ddltdnums.SelectedValue);
            Hyoa_flowfield.hy_config = "";
            Hyoa_flowfield.hy_sort = float.Parse(this.txtsort.Text);
            Hyoa_flowfield.hy_wordlimit = System.Int32.Parse(this.txtwordlimit.Text);
            Hyoa_flowfield.hy_required = this.ddlrequired.SelectedValue;
            Hyoa_flowfield.hy_align = this.ddlalign.SelectedValue;
            Hyoa_flowfield.hy_ifhiddle = this.ddlifhiddle.SelectedValue;

            Hyoa_flowfield.Insert();
        }
        else
        {
            Hyoa_flowfield.ID = this.txtdocid.Value;
            Hyoa_flowfield.hy_tableid = this.txttableid.Text;
            Hyoa_flowfield.hy_mudelid = this.txtmudelid.Text;
            Hyoa_flowfield.hy_flowid = this.txtflowid.Text;
            Hyoa_flowfield.hy_fieldid = this.txtfieldid.Text;
            Hyoa_flowfield.hy_fieldname = this.txtfieldname.Text;
            Hyoa_flowfield.hy_fieldtype = this.ddlfieldtype.SelectedValue;
            Hyoa_flowfield.hy_ifreadonly = this.ddlifreadonly.SelectedValue;
            Hyoa_flowfield.hy_defaultvaluetype = System.Int32.Parse(this.ddldefaultvaluetype.SelectedValue);
            Hyoa_flowfield.hy_defaultvalue = this.txtdefaultvalue.Text;
            Hyoa_flowfield.hy_optiontype = System.Int32.Parse(this.ddloptiontype.SelectedValue);

            if (ddloptiontype.SelectedValue == "1" && ddlwhichtable.SelectedIndex != 0)
                Hyoa_flowfield.hy_options = this.txtoptions.Text + " from hyp_flowmain where hy_tableid='" + ddlwhichtable.SelectedValue + "' order by " + this.txtsortby.Text + " " + this.ddlsorttype.SelectedValue;
            else
                Hyoa_flowfield.hy_options = this.txtoptions.Text;

            Hyoa_flowfield.hy_onclick = this.txtonclick.Text;
            Hyoa_flowfield.hy_ondblclick = this.txtondblclick.Text;
            Hyoa_flowfield.hy_onchange = this.txtonchange.Text;
            Hyoa_flowfield.hy_onkeydown = this.txtonkeydown.Text;
            Hyoa_flowfield.hy_onkeyup = this.txtonkeyup.Text;
            Hyoa_flowfield.hy_sqlfield = this.ddlsqlfield.SelectedValue;
            Hyoa_flowfield.hy_class = this.txtclass.Text;
            Hyoa_flowfield.hy_width = this.txtwidth.Text;
            Hyoa_flowfield.hy_height = this.txtheight.Text;
            Hyoa_flowfield.hy_tdnums = System.Int32.Parse(this.ddltdnums.SelectedValue);
            Hyoa_flowfield.hy_config = "";
            Hyoa_flowfield.hy_sort = float.Parse(this.txtsort.Text);
            Hyoa_flowfield.hy_wordlimit = System.Int32.Parse(this.txtwordlimit.Text);
            Hyoa_flowfield.hy_required = this.ddlrequired.SelectedValue;
            Hyoa_flowfield.hy_align = this.ddlalign.SelectedValue;
            Hyoa_flowfield.hy_ifhiddle = this.ddlifhiddle.SelectedValue;

            Hyoa_flowfield.Update();

            string lsupdate = "update hyt_flowfield set hy_flowid = '" + this.txtflowid.Text + "' where ID='" + this.txtdocid.Value + "'";
            HyoaClass.DAO dbupdate = new HyoaClass.DAO();
            dbupdate.Execute(lsupdate);
            dbupdate.Close();

        }
        //处理完成后的提示及跳转
        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>");
        }
    }
コード例 #18
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_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
        string lstableid="";
        HyoaClass.Hyoa_detail Hyoa_detail = new HyoaClass.Hyoa_detail();//主表单显示的列数

        if (this.txtop.Value == "add")
        {
            ////先判断这个模块编号是否已经存在
            //DataTable dt = Hyoa_tableconfig.GetTablesbymudelid(this.ddlmudelid.SelectedValue);
            //if (dt.Rows.Count > 0)
            //{
            //    Response.Write("<script>alert('该模块的表单配置已存在,请重新填写!');history.back();</script>");
            //    return;
            //}
            //else
            //{
            lstableid = Hyoa_global.GetRandom();
            Hyoa_tableconfig.ID = lstableid;
            Hyoa_tableconfig.hy_mudelid = this.ddlmudelid.SelectedValue.ToString();
            Hyoa_tableconfig.hy_name = this.txtname.Value;
            Hyoa_tableconfig.hy_onload = this.txthy_onload.Value;
            Hyoa_tableconfig.hy_sort = float.Parse(this.txtsort.Value);
            Hyoa_tableconfig.hy_ifflowdoc = this.ddlifflowdoc.SelectedValue;
            Hyoa_tableconfig.hy_ifdisplayall = this.ddlifdisplayall.SelectedValue;
            Hyoa_tableconfig.hy_ispuballByflowYB = this.ddlispuballByflowYB.SelectedValue;
            Hyoa_tableconfig.hy_tablerole = this.ddltablerole.SelectedValue;
            Hyoa_tableconfig.Insert();

            //新文档时增加主表显示列数
            Hyoa_detail.hy_fatherid = lstableid;
            Hyoa_detail.hy_colnum = int.Parse(this.ddldisplaycol.SelectedValue);
            Hyoa_detail.hy_field1 = "";
            Hyoa_detail.hy_field2 = "";
            Hyoa_detail.hy_field3 = "";
            Hyoa_detail.hy_field4 = "";
            Hyoa_detail.hy_field5 = "";
            Hyoa_detail.Insert();

            //}
        }
        else
        {
            Hyoa_tableconfig.ID = this.txtdocid.Value;
            Hyoa_tableconfig.hy_mudelid = this.ddlmudelid.SelectedValue;
            Hyoa_tableconfig.hy_name = this.txtname.Value;
            Hyoa_tableconfig.hy_onload = this.txthy_onload.Value;
            Hyoa_tableconfig.hy_sort = float.Parse(this.txtsort.Value);
            Hyoa_tableconfig.hy_ifflowdoc = this.ddlifflowdoc.SelectedValue;
            Hyoa_tableconfig.hy_ifdisplayall = this.ddlifdisplayall.SelectedValue;
            Hyoa_tableconfig.hy_ispuballByflowYB = this.ddlispuballByflowYB.SelectedValue;
            Hyoa_tableconfig.hy_tablerole = this.ddltablerole.SelectedValue;
            Hyoa_tableconfig.Update();

            //更新文档时更新主表显示列数
            Hyoa_detail.hy_fatherid = this.txtdocid.Value;
            Hyoa_detail.hy_colnum = int.Parse(this.ddldisplaycol.SelectedValue);
            Hyoa_detail.hy_field1 = "";
            Hyoa_detail.hy_field2 = "";
            Hyoa_detail.hy_field3 = "";
            Hyoa_detail.hy_field4 = "";
            Hyoa_detail.hy_field5 = "";
            DataTable dt2 = Hyoa_detail.Getdetail(this.txtdocid.Value);
            if (dt2.Rows.Count > 0)
            {
                Hyoa_detail.Update();
            }
            else
            {
                Hyoa_detail.Insert();
            }

            //修改时,保存完成后同时更新对应的字段中FLOWID值(如果非流程则置为空,如果是流程则置为值)
            HyoaClass.DAO db = new HyoaClass.DAO();
            string sql_field = "";
            if (this.ddlifflowdoc.SelectedValue == "是")
            {
                HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
                DataTable dt_flow = Hyoa_flowinfor.Getflowinforbymudelid(this.ddlmudelid.SelectedValue);
                if (dt_flow.Rows.Count > 0)
                {
                    sql_field = "update hyt_flowfield set hy_flowid='" + dt_flow.Rows[0]["hy_flowid"].ToString() + "' where hy_tableid='" + this.txtdocid.Value + "'";
                }

            }
            else
            {
                sql_field = "update hyt_flowfield set hy_flowid='' where hy_tableid='" + this.txtdocid.Value + "'";
            }
            db.Execute(sql_field);
            db.Close();

        }

        //处理完成后的提示及跳转
        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>");
        }
    }
コード例 #19
0
ファイル: main.aspx.cs プロジェクト: wjszxli/Webapp
    //保存时的特殊处理
    private void hylcbctscl(HyoaClass.Hyoa_flowmain Hyoa_flowmain)
    {
        ////新建投票时发送邮件给参与投票人
        //if (this.hy_mudelid.Text == "moduletpgl" && this.txtop.Value == "add")
        //{
        //    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_yqms = "";
        //    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_yqm = "";  //获得6位数字的随机数
        //                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() + "','收件',@hy_foldername,@hy_fsrid,@hy_fsrname,@hy_jsrid,@hy_wbjsrid,@hy_jsrname,@hy_title,'" + ls_body + "',@hy_datetime,@hy_ifsavetofjx,@hy_yxj,@hy_yjbg,@hy_zycd,@hy_hz,@hy_wbjszh) ";
        //                db.Execute(ls_sql);

        //                //将邀请码
        //                if (ls_yqms == "")
        //                {
        //                    ls_yqms = ls_yqm;
        //                }
        //                else
        //                {
        //                    ls_yqms = ls_yqms + "+" + 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_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, "", "");
        //                //给参与的人发送邮件
        //                //Hyoa_mail.ID = Hyoa_global.GetRandom();
        //                //Hyoa_mail.DOCID = this.txtdocid.Value;
        //                //Hyoa_mail.hy_type = "收件";
        //                //Hyoa_mail.hy_foldername = "收件箱";
        //                //Hyoa_mail.hy_fsrid = this.lblhy_fsrid.Text;
        //                //Hyoa_mail.hy_fsrname = this.lblhy_fsrname.Text;
        //                //Hyoa_mail.hy_jsrid = lv_jsrid[i].ToString();
        //                //Hyoa_mail.hy_wbjsrid = "";
        //                //Hyoa_mail.hy_jsrname = lv_jsrname[i].ToString();
        //                //Hyoa_mail.hy_title = this.txthy_title.Text;
        //                //Hyoa_mail.hy_body = this.hy_content1.Value;
        //                //Hyoa_mail.hy_datetime = System.DateTime.Now.ToString();
        //                //Hyoa_mail.hy_ifsavetofjx = "";
        //                //Hyoa_mail.hy_yxj = "";
        //                //Hyoa_mail.hy_yjbg = "";
        //                //Hyoa_mail.hy_zycd = "";
        //                //Hyoa_mail.hy_hz = "";
        //                //Hyoa_mail.hy_wbjszh = "";
        //                string ls_yqm = "";  //获得6位数字的随机数
        //                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() + "','收件',@hy_foldername,@hy_fsrid,@hy_fsrname,@hy_jsrid,@hy_wbjsrid,@hy_jsrname,@hy_title,'" + ls_body + "',@hy_datetime,@hy_ifsavetofjx,@hy_yxj,@hy_yjbg,@hy_zycd,@hy_hz,@hy_wbjszh) ";

        //                db.Execute(ls_sql);

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

        //    //更新表
        //    Hyoa_flowmain.hy_field30 = ls_yqms;
        //}

        //个人日程安排保存后重置hy_field60为空 start
        if (this.hy_mudelid.Text == "grrcap" && this.hy_tableid.Text == "7eb2998d-1c69-4cea-896c-76e641a0511e")
        {
            Hyoa_flowmain.hy_field60 = "";
        }
        //接待管理总费用
        if (this.hy_mudelid.Text == "jdgl" && this.hy_tableid.Text == "30cecb42-bdec-4ed8-9392-b7c682e16b3f")
        {
            double ldsum = 0.0; ;
            if (this.hy_field13.Text != "")
                ldsum += System.Convert.ToDouble(this.hy_field13.Text);
            if (this.hy_field22.Text != "")
                ldsum += System.Convert.ToDouble(this.hy_field22.Text);
            if (this.hy_field24.Text != "" && this.hy_field25.Text != "")
                ldsum += System.Convert.ToDouble(this.hy_field24.Text) * System.Convert.ToDouble(this.hy_field25.Text);

            Hyoa_flowmain.hy_field26 = ldsum.ToString("0.00");
        }
        //个人日程安排保存后重置hy_field60为空 end
        //物品维护保存后重置hy_field60为空 start
        if (this.hy_mudelid.Text == "bgyply" && this.hy_tableid.Text == "11c63ede-707c-4804-a2fb-49c51a415c46")
        {
            Hyoa_flowmain.hy_field60 = "";
        }
        //物品维护保存后重置hy_field60为空 end

        //提交时更新流水号
        if (this.txtop.Value == "add")
        {
            HyoaClass.DAO db = new HyoaClass.DAO();
            string lssql = "";
            //物品采购自动读取流水号 格式:CG2014000001
            if (this.hy_mudelid.Text == "bgypcg" && this.hy_tableid.Text == "26e9b719-3ded-4fd2-a43b-6a45e30ccd1e" && this.hy_curtacheid.Text == "tache0001")
            {
                lssql = "update hyp_flowmain set hy_field37=hy_field37+1 where hy_mudelid='Mudellsh' and hy_field1='物品采购' and hy_field4='启用'  ";
                db.Execute(lssql);
            }

            //维修管理自动读取流水号 格式:WX2014000001
            if (this.hy_mudelid.Text == "modulewxgl" && this.hy_tableid.Text == "b6938f55-5042-4c22-bd26-78fcded8cfbf" && this.hy_curtacheid.Text == "tache0001")
            {
                lssql = "update hyp_flowmain set hy_field37=hy_field37+1 where hy_mudelid='Mudellsh' and hy_field1='维修管理' and hy_field4='启用'  ";
                db.Execute(lssql);
            }
        }
    }
コード例 #20
0
ファイル: main.aspx.cs プロジェクト: wjszxli/Webapp
    //旧文档OPEN时的特殊处理
    private void hywebopen_olddoc()
    {
        //办公系统效能分析添加   add by wjs at 20150604
        hyXnxtSaveLogs("", "阅读一篇文章", "阅读");
        // hyXnxtFlowLogs("从" + this.hy_curtachename.Text + "环节提交到环节" + this.txtnexttachename.Value + "", "提交");
        //如果是车辆管理,显示打印按钮
        if (this.hy_mudelid.Text == "clgl")
        {
            this.td_print_clsq.Visible = true;
        }
        if (this.hy_mudelid.Text == "clgl" && this.hy_tableid.Text == "8b10b316-98d6-4a50-bc15-52745bb119bb" && this.hy_curtacheid.Text == "tache0006")
        {
            string lssqlclgl = " select * from hyp_flowmain  where not(docid='" + this.txtdocid.Value + "') and hy_mudelid = 'clgl' and hy_tableid='8b10b316-98d6-4a50-bc15-52745bb119bb' and hy_field5='" + this.hy_field5.Text + "'  and hy_curtacheid='**' order by hy_field31,hy_field33 desc";
            HyoaClass.DAO dbclgl = new HyoaClass.DAO();
            DataTable dtclgl = dbclgl.GetDataTable(lssqlclgl);
            if (dtclgl.Rows.Count > 0)
            {
                this.hy_field11.Text = dtclgl.Rows[0]["hy_field12"].ToString();
            }
            else
            {
                this.hy_field11.Text = "0";
            }
        }

        //发布投票
        //if (this.hy_mudelid.Text == "moduletpgl" && this.hy_tableid.Text == "bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd")
        //{
        //    HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        //    if (Hyoa_global.isHaveRole("Rolefbtp", Session["hyuid"].ToString()))
        //    {
        //        //未核对时显示发布投票按钮
        //        if (this.hy_field100.Text == "0")
        //        {
        //            this.td_pub.Visible = true; //发布投票
        //        }
        //    }
        //    else
        //    {
        //        this.td_pub.Visible = false; //发布投票
        //    }
        //}

        ////////群教评论s  只要是旧文档且是群教评论填写评论
        if (this.hy_mudelid.Text == "moduleqjpl" && this.hy_tableid.Text == "7e41913d-c365-4edb-bb42-b0a8a50738cb")
        {
            this.tb_qjpltitle.Visible = true;
            this.tb_qjplbody.Visible = true;
            this.tr_qjpl.Visible = true;

            //得到已经评论内容
            HyoaClass.Hyoa_bcyj Hyoa_qjpl = new HyoaClass.Hyoa_bcyj();
            DataTable dt_qjpl = Hyoa_qjpl.GetdocsByfatherid(this.txtdocid.Value);
            if (dt_qjpl.Rows.Count > 0)
            {
                //输出评论记录
                this.lblbody_qjpl.Text = "";
                for (var i = 0; i < dt_qjpl.Rows.Count; i++)
                {
                    this.lblbody_qjpl.Text += dt_qjpl.Rows[i]["hy_bcbody"].ToString() + "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                    this.lblbody_qjpl.Text += "(评论人:" + dt_qjpl.Rows[i]["hy_bcusername"].ToString() + "&nbsp;&nbsp;&nbsp;所在部门:" + dt_qjpl.Rows[i]["hy_bcdeptname"].ToString();
                    this.lblbody_qjpl.Text += "&nbsp;&nbsp;&nbsp;评论时间:" + dt_qjpl.Rows[i]["hy_bctime"].ToString();
                    //+ "&nbsp;&nbsp;&nbsp;IP:" + dt_bcyj.Rows[i]["hy_bcip"].ToString();
                    this.lblbody_qjpl.Text += ")<br><hr height=1 color=#DEEEFE></hr>";
                }
            }
        }
        ////////群教评论e

        //如果是信息管理,显示转邮件按钮
        if (this.hy_mudelid.Text == "xxgl" && this.hy_tableid.Text == "1a564b74-3d94-4cef-bb94-f0c0342ae8dd")
            this.td_returnmail.Visible = true;

        //如果是公告批示,显示转邮件按钮
        if (this.hy_mudelid.Text == "moduleggps" && this.hy_tableid.Text == "bb523c42-d9ae-40cd-9bba-c3a99c2e1d54")
            this.td_returnmail_ggps.Visible = true;

        //如果是群教专栏,显示转邮件按钮
        if (this.hy_mudelid.Text == "moduleqjzl" && this.hy_tableid.Text == "ac5e8ddd-d74c-4c9d-b0bf-5c23fc77b589")
            this.td_returnmail_qjzl.Visible = true;

        //如果是重要材料上报,显示转邮件按钮
        if (this.hy_mudelid.Text == "gzyhbsh" && this.hy_tableid.Text == "7d03c313-186d-4859-9efa-acde27f4eff2")
            this.td_returnmail_zyclsb.Visible = true;

        //如果是iso900,显示转邮件按钮
        if (this.hy_mudelid.Text == "moduleiso" && this.hy_tableid.Text == "c8246158-511f-4ce9-b7b9-3b7edf136a87")
            this.td_returnmail_iso.Visible = true;

        //知识管理,打开增加点击数
        if (this.hy_mudelid.Text == "zsgl" && this.hy_tableid.Text == "3b5a9b5a-d1a3-4f85-b560-ef8c38a031cf")
        {
            HyoaClass.DAO db_djs = new HyoaClass.DAO();
            db_djs.Execute("update hyp_flowmain set hy_field36=hy_field36+1 where DOCID='" + this.txtdocid.Value + "'");
            db_djs.Close();
        }

        //工作月汇报,输出WORD按钮隐藏/显示
        if (this.hy_mudelid.Text == "gzyhb" && this.hy_tableid.Text == "b04d9f4a-e5af-4813-888b-c46f58cc3ad3")
        {
            this.td_inputword.Visible = true;
        }
        //工作月汇报,输出WORD按钮隐藏/显示
        if (this.hy_mudelid.Text == "djgz" && this.hy_tableid.Text == "0e5efe98-49a5-4ccd-9532-8cac74ab328d")
        {
            this.td_inputword_dj.Visible = true;
        }
    }
コード例 #21
0
ファイル: main.aspx.cs プロジェクト: wjszxli/Webapp
 //取消
 protected void Button_Qx_Click(object sender, EventArgs e)
 {
     HyoaClass.DAO db = new HyoaClass.DAO();
     string lssql = "delete from hyp_flowmain where DOCID='" + this.txtdocid.Value + "'";
     db.Execute(lssql);
     string lssqldbsy = "delete from hyt_dbsy where DOCID='" + this.txtdocid.Value + "'";
     db.Execute(lssqldbsy);
     db.Close();
     //处理完成后的提示及跳转(增加刷新附件功能)
     string ls_tip = "取消成功!";
     if (this.txtifpop.Value == "")
     {
         Response.Write("<script>window.location='" + this.txturl.Value + "'</script>");
     }
     else
     {
         Response.Write("<script>window.opener.location.reload();self.close();</script>");
     }
 }
コード例 #22
0
ファイル: main_tpgl.aspx.cs プロジェクト: wjszxli/Webapp
    private void dg1_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
    {
        string ls_id = e.Item.Cells[0].Text;
        HyoaClass.DAO db = new HyoaClass.DAO();
        string ls_sql = "";
        ls_sql = "delete from hyk_whzx_tpgl_tpxx where id ='" + ls_id + "'";
        db.Execute(ls_sql);

        this.DataBindHxx(); //重新协调绑定
    }
コード例 #23
0
ファイル: main.aspx.cs プロジェクト: wjszxli/Webapp
    //流程提交时的特殊处理
    private void hylctjtscl(HyoaClass.Hyoa_flowmain Hyoa_flowmain)
    {
        //办公效率智能分析增加  add by wjs  at 20150603
        hyXnxtFlowLogs("从" + this.hy_curtachename.Text + "环节提交到环节" + this.txtnexttachename.Value + "", "提交");
        //办公效率智能分析系统增加  add by wjs at 20150604
        if (this.hy_curtacheid.Text == "tache0001" && this.hy_tableid.Text == "1a564b74-3d94-4cef-bb94-f0c0342ae8dd" && this.txtop.Value == "add")
        {
            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);
        }
        if (this.txtifpop.Value == "1")
        {
            this.Response.Write("<script>window.opener.location.reload();</script>");
        }
        //提交时更新流水号
        HyoaClass.DAO db = new HyoaClass.DAO();
        DataTable dt;
        string lssql = "";
        //物品采购自动读取流水号 格式:CG2014000001
        if (this.hy_mudelid.Text == "bgypcg" && this.hy_tableid.Text == "26e9b719-3ded-4fd2-a43b-6a45e30ccd1e" && this.hy_curtacheid.Text == "tache0001")
        {
            lssql = "update hyp_flowmain set hy_field37=hy_field37+1 where hy_mudelid='Mudellsh' and hy_field1='物品采购' and hy_field4='启用'  ";
            db.Execute(lssql);
        }

        //维修管理自动读取流水号 格式:WX2014000001
        if (this.hy_mudelid.Text == "modulewxgl" && this.hy_tableid.Text == "b6938f55-5042-4c22-bd26-78fcded8cfbf" && this.hy_curtacheid.Text == "tache0001")
        {
            lssql = "update hyp_flowmain set hy_field37=hy_field37+1 where hy_mudelid='Mudellsh' and hy_field1='维修管理' and hy_field4='启用'  ";
            db.Execute(lssql);
        }
    }
コード例 #24
0
ファイル: main_read.aspx.cs プロジェクト: wjszxli/Webapp
    private void DataPlay()
    {
        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.txtfsrid.Text = dt.Rows[0]["hy_fsrid"].ToString();
            this.lblhy_fsrname.Text = dt.Rows[0]["hy_fsrname"].ToString();
            this.txtfrsname.Text = dt.Rows[0]["hy_fsrname"].ToString();
            this.lblhy_datetime.Text = dt.Rows[0]["hy_datetime"].ToString();
            this.txthy_jsrid.Text = dt.Rows[0]["hy_jsrid"].ToString();
            this.lblhy_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.lblhy_content1.Text = dt.Rows[0]["hy_body"].ToString();
        }

        //20120210 start
        string sccksj = System.DateTime.Now.ToString();
        string sql = "";
        if (dt.Rows[0]["hy_type"].ToString() == "收件" & dt.Rows[0]["hy_sccksj"].ToString() == "")
        {
            HyoaClass.DAO db = new HyoaClass.DAO();
            sql = "update hyt_mail set hy_sccksj = '" + sccksj + "' where ID='" + this.txtid.Value + "' ";
            db.Execute(sql);

        }
        //20120210 end
    }
コード例 #25
0
ファイル: main.aspx.cs プロジェクト: wjszxli/Webapp
    private void hywply(string ls_docid)
    {
        ////ls_docid物品领用的主表ID
        ////物品领用后,相应的物品数量要减少 //办公用品领用:hy_field36   物品维护:hy_field38
        //HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
        //DataTable dtwply = Hyoa_flowmain.Getflowmain(ls_docid);
        //string ls_dl;
        //string ls_xl;
        //ls_dl = dtwply.Rows[0]["hy_field1"].ToString(); //物品类别
        //ls_xl = dtwply.Rows[0]["hy_field4"].ToString();//物品名称
        //Int32 li_sl;
        //li_sl = System.Convert.ToInt32(dtwply.Rows[0]["hy_field36"].ToString()); //得到领用物品的数量
        ////类别表单的数量改变
        //HyoaClass.DAO dbwply = new HyoaClass.DAO();
        //string lssqlwply;
        //lssqlwply = "update hyp_flowmain set hy_field38=hy_field38-" + li_sl + " where hy_field3='" + ls_dl + "' and hy_field1='" + ls_xl + "' and hy_mudelid='bgyply' and hy_tableid='11c63ede-707c-4804-a2fb-49c51a415c46'";
        ////this.Response.Write("<script>alert('" + ls_dl + "');</script>");
        ////this.Response.Write("<script>alert('" + ls_xl + "');</script>");
        //dbwply.Execute(lssqlwply);
        //dbwply.Close();

        //物品领用后,相应的数量减少
        string lssqlwply;
        HyoaClass.DAO dbwply = new HyoaClass.DAO();
        //物品一
        lssqlwply = "update hyp_flowmain set hy_field38=hy_field38-" + System.Int32.Parse(this.hy_field36.Text) + " where hy_field3='" + this.hy_field1.Text + "' and hy_field1='" + this.hy_field4.Text + "' and hy_mudelid='bgyply' and hy_tableid='11c63ede-707c-4804-a2fb-49c51a415c46'";
        dbwply.Execute(lssqlwply);
        //物品二
        lssqlwply = "update hyp_flowmain set hy_field38=hy_field38-" + System.Int32.Parse(this.hy_field38.Text) + " where hy_field3='" + this.hy_field11.Text + "' and hy_field1='" + this.hy_field12.Text + "' and hy_mudelid='bgyply' and hy_tableid='11c63ede-707c-4804-a2fb-49c51a415c46'";
        dbwply.Execute(lssqlwply);
        //物品三
        lssqlwply = "update hyp_flowmain set hy_field38=hy_field38-" + System.Int32.Parse(this.hy_field39.Text) + " where hy_field3='" + this.hy_field21.Text + "' and hy_field1='" + this.hy_field22.Text + "' and hy_mudelid='bgyply' and hy_tableid='11c63ede-707c-4804-a2fb-49c51a415c46'";
        dbwply.Execute(lssqlwply);
        //物品四
        lssqlwply = "update hyp_flowmain set hy_field38=hy_field38-" + System.Int32.Parse(this.hy_field76.Text) + " where hy_field3='" + this.hy_field17.Text + "' and hy_field1='" + this.hy_field24.Text + "' and hy_mudelid='bgyply' and hy_tableid='11c63ede-707c-4804-a2fb-49c51a415c46'";
        dbwply.Execute(lssqlwply);
        //物品五
        lssqlwply = "update hyp_flowmain set hy_field38=hy_field38-" + System.Int32.Parse(this.hy_field77.Text) + " where hy_field3='" + this.hy_field18.Text + "' and hy_field1='" + this.hy_field25.Text + "' and hy_mudelid='bgyply' and hy_tableid='11c63ede-707c-4804-a2fb-49c51a415c46'";
        dbwply.Execute(lssqlwply);
        //物品六
        lssqlwply = "update hyp_flowmain set hy_field38=hy_field38-" + System.Int32.Parse(this.hy_field78.Text) + " where hy_field3='" + this.hy_field19.Text + "' and hy_field1='" + this.hy_field26.Text + "' and hy_mudelid='bgyply' and hy_tableid='11c63ede-707c-4804-a2fb-49c51a415c46'";
        dbwply.Execute(lssqlwply);
        //物品七
        lssqlwply = "update hyp_flowmain set hy_field38=hy_field38-" + System.Int32.Parse(this.hy_field79.Text) + " where hy_field3='" + this.hy_field20.Text + "' and hy_field1='" + this.hy_field27.Text + "' and hy_mudelid='bgyply' and hy_tableid='11c63ede-707c-4804-a2fb-49c51a415c46'";
        dbwply.Execute(lssqlwply);
        //物品八
        lssqlwply = "update hyp_flowmain set hy_field38=hy_field38-" + System.Int32.Parse(this.hy_field80.Text) + " where hy_field3='" + this.hy_field23.Text + "' and hy_field1='" + this.hy_field28.Text + "' and hy_mudelid='bgyply' and hy_tableid='11c63ede-707c-4804-a2fb-49c51a415c46'";
        dbwply.Execute(lssqlwply);
    }
コード例 #26
0
ファイル: main_flowinfor.aspx.cs プロジェクト: wjszxli/Webapp
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("/login.aspx");

        string ls_tip = "保存成功!";

        //新文档时
        HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
        if (this.txtop.Value == "add")
        {
            //先判断是否已经存在
            DataTable dt = Hyoa_flowinfor.Getflowinfor(this.txtid.Text);
            if (dt.Rows.Count > 0)
            {
                Response.Write("<script>alert('该流程已存在,请重新填写!');history.back();</script>");
                return;
            }
            else
            {
                Hyoa_flowinfor.hy_flowid = this.txtid.Text;
                Hyoa_flowinfor.hy_flowname = this.txtname.Value;
                Hyoa_flowinfor.hy_sort = System.Int32.Parse(this.txtsort.Value);
                Hyoa_flowinfor.hy_mudelid = this.ddlmudelid.SelectedValue;
                Hyoa_flowinfor.Insert();
            }
        }
        else
        {
            Hyoa_flowinfor.hy_flowid = this.txtid.Text;
            Hyoa_flowinfor.hy_flowname = this.txtname.Value;
            Hyoa_flowinfor.hy_sort = System.Int32.Parse(this.txtsort.Value);
            Hyoa_flowinfor.hy_mudelid = this.ddlmudelid.SelectedValue;
            Hyoa_flowinfor.Update();
        }

        //保存时更新选中的模块对应的流程字段(hy_flowid)
        HyoaClass.DAO db = new HyoaClass.DAO();
        string sql;
        sql = "select a.id from hyt_flowfield a,hyt_tableconfig b where a.hy_tableid=b.ID  and b.hy_ifflowdoc='是' and a.hy_mudelid='"+this.ddlmudelid.SelectedValue+"'";
        DataTable dt_update = db.GetDataTable(sql);
        if (dt_update.Rows.Count > 0)
        {
            for (var i = 0; i < dt_update.Rows.Count; i++)
            {
                sql = "update hyt_flowfield set hy_flowid='" + this.txtid.Text + "' where id='" + dt_update.Rows[i]["id"].ToString()+"'";
                db.Execute(sql);
            }
        }
        db.Close();

        //处理完成后的提示及跳转
        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>");
        }
    }
コード例 #27
0
ファイル: importKQ.aspx.cs プロジェクト: wjszxli/Webapp
    protected void btntbbz_Click(object sender, EventArgs e)
    {
        HyoaClass.DAO db = new HyoaClass.DAO();
        string lssql = "update hyp_flowmain set hy_field3='已备注'  where hy_mudelid = 'kqgl' and hy_tableid = '74e7e280-4fc5-4ccb-be3d-0f995ac2c934' and hy_field4!='' and hy_field3='是'";
        db.Execute(lssql);
        db.Close();
        this.lblReturnInformation.Text = "同步成功!";

    }
コード例 #28
0
ファイル: mainwstp.aspx.cs プロジェクト: wjszxli/Webapp
    //旧文档OPEN时的特殊处理
    private void hywebopen_olddoc()
    {
        //如果是车辆管理,显示打印按钮
        if (this.hy_mudelid.Text == "clgl")
        {
            this.td_print_clsq.Visible = true;
        }
        if (this.hy_mudelid.Text == "clgl" && this.hy_tableid.Text == "8b10b316-98d6-4a50-bc15-52745bb119bb" && this.hy_curtacheid.Text == "tache0006")
        {
            string lssqlclgl = " select * from hyp_flowmain  where not(docid='" + this.txtdocid.Value + "') and hy_mudelid = 'clgl' and hy_tableid='8b10b316-98d6-4a50-bc15-52745bb119bb' and hy_field5='" + this.hy_field5.Text + "'  and hy_curtacheid='**' order by hy_field31,hy_field33 desc";
            HyoaClass.DAO dbclgl = new HyoaClass.DAO();
            DataTable dtclgl = dbclgl.GetDataTable(lssqlclgl);
            if (dtclgl.Rows.Count > 0)
            {
                this.hy_field11.Text = dtclgl.Rows[0]["hy_field12"].ToString();
            }
            else
            {
                this.hy_field11.Text = "0";
            }
        }

        //如果是信息管理,显示转邮件按钮
        if (this.hy_mudelid.Text == "xxgl" && this.hy_tableid.Text=="1a564b74-3d94-4cef-bb94-f0c0342ae8dd")
            this.td_returnmail.Visible = true;

        //知识管理,打开增加点击数
        if (this.hy_mudelid.Text == "zsgl" && this.hy_tableid.Text == "3b5a9b5a-d1a3-4f85-b560-ef8c38a031cf")
        {
            HyoaClass.DAO db_djs = new HyoaClass.DAO();
            db_djs.Execute("update hyp_flowmain set hy_field36=hy_field36+1 where DOCID='" + this.txtdocid.Value + "'");
            db_djs.Close();
        }

        //工作月汇报,输出WORD按钮隐藏/显示
        if (this.hy_mudelid.Text == "gzyhb" && this.hy_tableid.Text == "b04d9f4a-e5af-4813-888b-c46f58cc3ad3")
        {
            this.td_inputword.Visible = true;
        }
    }
コード例 #29
0
ファイル: main_tpgl_wytp.aspx.cs プロジェクト: wjszxli/Webapp
    //保存
    protected void btn_save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("../../login.aspx");

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

        string ls_ids = this.hy_xztpxx.Value;
        //Response.Write("<script language=javascript>alert('选项ID:" + ls_ids + "');</script>");
        //生成投票日志,便于统计投票结果
        if (this.txtop.Value == "add")
        {
            if (this.hy_tpfs.Value == "多选")
            {
                string[] lv_id = ls_ids.Split('+');
                for (int i = 0; i < lv_id.Length; i++)
                {
                    string ls_sql = "insert into hyk_whzx_tpgl_tpmx (id,hy_tpztid,hy_tpxxid,hy_tpr,hy_tprid,hy_tpip,hy_tpsj) values (";
                    ls_sql += "'" + System.Guid.NewGuid().ToString() + "','" + this.txtdocid.Value + "','" + lv_id[i] + "'";
                    ls_sql += ",'" + Session["hyuname"].ToString() + "','" + Session["hyuid"].ToString() + "','" + IPAddress() + "',getdate()";
                    ls_sql += ")";
                    db.Execute(ls_sql);
                }
            }
            else
            {
                string sql = "insert into hyk_whzx_tpgl_tpmx (id,hy_tpztid,hy_tpxxid,hy_tpr,hy_tprid,hy_tpip,hy_tpsj) values (";
                sql += "'" + System.Guid.NewGuid().ToString() + "','" + this.txtdocid.Value + "','" + ls_ids + "'";
                sql += ",'" + Session["hyuname"].ToString() + "','" + Session["hyuid"].ToString() + "','" + IPAddress() + "',getdate()";
                sql += ")";
                db.Execute(sql);
            }
        }

        ////参与投票积分日志
        //InsertScoresLogs(this.txtmudelid.Value, this.txtdocid.Value, Session["hyuname"].ToString(), Session["hyuid"].ToString(),
        //       Session["hydeptname"].ToString(), Session["hydeptid"].ToString(), "投票积分", System.Int32.Parse(this.hy_cssz2.Value), "参与投票", "0");

        //将待办事宜置为已办事宜
        string ls_sqlAA = "update hyt_dbsy set hy_ifyb='1' where hy_mudelid ='" + this.txtmudelid.Value + "' and docid='" + this.txtdocid.Value + "' and hy_dbrid='" + Session["hyuid"].ToString() + "'";
        db.Execute(ls_sqlAA);

        db.Close();

        //处理完成后的提示及跳转
        string ls_tip = "投票成功!";
        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>");
        }
    }
コード例 #30
0
ファイル: list_tpgl.aspx.cs プロジェクト: wjszxli/Webapp
    //发布
    protected void btnpubinfo_Click(object sender, EventArgs e)
    {
        //判断选中的投票项目是否一致
        HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
        HyoaClass.DAO db = new HyoaClass.DAO();
        string ls_tplb = "", ls_cyr = "";
        String[] v_uids = this.txtuids.Value.Split(',');

        //通过ID得到信息
        DataTable dt = Hyoa_flowmain.Getflowmain(v_uids[0]);
        if (dt.Rows.Count > 0)
        {
            ls_tplb = dt.Rows[0]["hy_field20"].ToString();
            ls_cyr = dt.Rows[0]["hy_field41"].ToString();
            if (ls_cyr != "" && ls_cyr.IndexOf('+') < 0)
            {
                Response.Write("<script>alert('多个可投票人员需要用加号分割,发布投票失败!');window.location = '/list_tpgl.aspx?mid=moduletpgl&tableid=bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd';</script>");
                return;
            }
        }

        //判断该投票类别是否已经发布过
        string ls_sql22 = "select * from hyp_flowmain where hy_field20='" + ls_tplb + "' and hy_field100=1 ";
        DataTable dtlb = db.GetDataTable(ls_sql22);
        if (dtlb.Rows.Count > 0)
        {
            Response.Write("<script>alert('该投票类别已发布,发布投票失败!');window.location = '/list_tpgl.aspx?mid=moduletpgl&tableid=bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd';</script>");
            return;
        }
        //for (var i = 0; i < v_uids.Length; i++)
        //{
        //    //通过ID得到信息
        //    DataTable dt1 = Hyoa_flowmain.Getflowmain(v_uids[i]);
        //    if (dt1.Rows.Count > 0)
        //    {
        //        if (ls_tpxm != dt1.Rows[0]["hy_field10"].ToString())
        //        {
        //            Response.Write("<script>alert('选择的投票项目不一致,发布投票失败!');window.location = '/list_tpgl.aspx?mid=moduletpgl&tableid=bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd';</script>");
        //            return;
        //        }
        //        if (dt.Rows[0]["hy_field100"].ToString() == "1")
        //        {
        //            Response.Write("<script>alert('选择的投票项目已发布,发布投票失败!');window.location = '/list_tpgl.aspx?mid=moduletpgl&tableid=bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd';</script>");
        //            return;
        //        }
        //    }
        //}
        //Response.Write("<script>alert('" + ls_tpxm + "');</script>");
        //return;
        //发布投票时发送邮件给参与投票人

        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 (ls_cyr == "")
        {
            //从人员库中读取人员
            string sql2 = "select * from hyt_user order by hy_sort";
            DataTable dt2 = db.GetDataTable(sql2);
            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt2.Rows.Count; i++)
                {
                    string ls_jsrid = dt2.Rows[i]["hy_userid"].ToString();
                    string ls_jsrname = dt2.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_title = "[投票管理]-请参与" + ls_tplb + "的投票";
                    string ls_body = "您投票的邀请码为:" + 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() + "','收件','收件箱','admin','管理员','" + ls_jsrid + "','','" + ls_jsrname + "','" + ls_title + "','" + 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_jsrname = ls_cyr;
            string[] lv_jsrname = ls_jsrname.Split('+');
            for (var i = 0; i < lv_jsrname.Length; i++)
            {
                if (lv_jsrname[i] != "")
                {
                    string ls_jsrid = "";
                    string sqluser = "******" + lv_jsrname[i] + "'";
                    DataTable dtuser = db.GetDataTable(sqluser);
                    if (dtuser.Rows.Count > 0)
                    {
                        ls_jsrid = dtuser.Rows[0]["hy_userid"].ToString();
                    }

                    string ls_yqm = "";
                    string ls_yqms = GetRandom3();
                    if (lv_jsrname[i] == "管理员")
                    {
                        ls_yqm = "000" + ls_yqms;
                    }
                    else
                    {
                        //Response.Write("<script>alert('" + ls_jsrid + "')</script>");
                        //return;
                        if (ls_jsrid != "" && ls_jsrid.Length - 3 > 0)
                        {
                            ls_yqm = ls_jsrid.Substring(ls_jsrid.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_title = "[投票管理]-请参与" + ls_tplb + "的投票";
                    string ls_body = "您投票的邀请码为:" + 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() + "','收件','收件箱','admin','管理员','" + ls_jsrid + "','','" + lv_jsrname[i].ToString() + "','" + ls_title + "','" + 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 hy_field20='" + ls_tplb + "'";
        db.Execute(sql);
        db.Close();
        db.Dispose();

        this.txtuids.Value = "";
        //DataPlay(System.Int32.Parse(this.curpage.Text));
        Response.Write("<script>alert('发布投票成功!');window.location = '/list_tpgl.aspx?mid=moduletpgl&tableid=bb4c4ac0-53b4-4c7f-89a6-4bde425c24fd';</script>");
    }