当前位置: 首页>>代码示例>>C#>>正文


C# HyoaClass.DAO.Close方法代码示例

本文整理汇总了C#中HyoaClass.DAO.Close方法的典型用法代码示例。如果您正苦于以下问题:C# HyoaClass.DAO.Close方法的具体用法?C# HyoaClass.DAO.Close怎么用?C# HyoaClass.DAO.Close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HyoaClass.DAO的用法示例。


在下文中一共展示了HyoaClass.DAO.Close方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetItemproportion

    //获取投票数量的比例
    public string GetItemproportion(string pis_xxid, Boolean bl)
    {
        string rValue;
        HyoaClass.DAO db = new HyoaClass.DAO();

        //总参与投票数
        double ls_tpall;
        string ls_sql1 = " Select * from hyk_whzx_tpgl_tpmx where hy_tpztid ='" + this.txtdocid.Value + "' ";
        DataTable dt1 = db.GetDataTable(ls_sql1);
        ls_tpall = dt1.Rows.Count;

        //得到某一个选项投票数
        double ls_tpxx;
        string ls_sql2 = " Select * from hyk_whzx_tpgl_tpmx where hy_tpztid ='" + this.txtdocid.Value + "' and hy_tpxxid ='" + pis_xxid + "' ";
        DataTable dt2 = db.GetDataTable(ls_sql2);
        ls_tpxx = dt2.Rows.Count;

        double ls_num = 0.0;
        if (ls_tpxx != 0)
        {
            ls_num = (ls_tpxx / ls_tpall) * 100;
        }
        if (bl)
        {
            rValue = ls_num.ToString("#0.#0") + "%";
        }
        else
        {
            rValue = ls_num.ToString("#0.#0");
        }
        dt1.Clear();
        dt2.Clear();
        db.Close();
        return rValue;
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:36,代码来源:main_tpgl_wytp.aspx.cs

示例2: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() =="")
            this.Response.Redirect("/login.aspx");

        if (!IsPostBack)
        {

            string lstr = "";
            HyoaClass.DAO db = new HyoaClass.DAO();
            string lssql = "select * from hyp_flowmain where hy_mudelid = 'clgl' and hy_tableid='0b5c53fe-114b-4fa3-8b59-4163b3053504'";
            if (this.Request.QueryString["startdate"] != null)
            {
                if (this.Request.QueryString["startdate"].ToString() != "")
                {
                    lssql += " and hy_field31>='" + this.Request.QueryString["startdate"].ToString() + "'";
                }
            }
            if (this.Request.QueryString["enddate"] != null)
            {
                if (this.Request.QueryString["enddate"].ToString() != "")
                {
                    lssql += " and hy_field31<='" + this.Request.QueryString["enddate"].ToString() + "'";
                }
            }
            if (this.Request.QueryString["hy_field1"] != null)
            {
                if (this.Request.QueryString["hy_field1"].ToString() != "")
                {
                    lssql += " and hy_field1 like '%" + this.Request.QueryString["hy_field1"].ToString() + "%'";
                }
            }
            lssql += " order by hy_field31 desc";
            DataTable dt = db.GetDataTable(lssql);

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                lstr += "<TR >";
                lstr += "<td >" + dt.Rows[i]["hy_field1"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field2"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field3"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field4"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field5"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field6"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field7"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field8"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field9"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field10"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field11"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field12"].ToString() + "</td>";
                lstr += "</tr>";
            }

            this.lbltr.Text = lstr;
            db.Close();
        }
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:57,代码来源:inputexcel_clgl.aspx.cs

示例3: Button_Save_Click

    //保存
    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>");
        }
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:56,代码来源:main_listconfig.aspx.cs

示例4: btndelinfo_Click

    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));
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:18,代码来源:list_listconfig.aspx.cs

示例5: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        string ls_mudelid="";
        string ls_tableid = "";
        string ls_value = "";

        if (this.Request.QueryString["mudelid"] != null)
        {
            ls_mudelid = this.Request.QueryString["mudelid"].ToString();
        }
        if (this.Request.QueryString["tableid"] != null)
        {
            ls_tableid = this.Request.QueryString["tableid"].ToString();
        }
        if (this.Request.QueryString["lsvalue"] != null)
        {
            ls_value = this.Request.QueryString["lsvalue"].ToString();  //物品名称
        }

        HyoaClass.DAO db = new HyoaClass.DAO();
        //string lssql = "select b.hy_deptname,a.hy_officetel,a.hy_mobile,a.hy_virtualnumber,a.hy_userid,a.hy_post,a.hy_hometel  from hyt_user as a ,hyt_dept as b where a.hy_username='" + ls_value + "' and a.hy_deptid=b.hy_deptid";
        string lssql = "select * from hyt_user as a ,hyt_dept as b where a.hy_username='" + ls_value + "' and a.hy_deptid=b.hy_deptid";
        DataTable dt = db.GetDataTable(lssql);
        if (dt.Rows.Count > 0)
        {
            string lssql2 = "select * from hyt_user_detail where hy_userid='" + dt.Rows[0]["hy_userid"].ToString() + "'";
            DataTable dt2 = db.GetDataTable(lssql2);
            if (dt2.Rows.Count > 0)
            {
                this.Response.Write(dt.Rows[0]["hy_deptname"].ToString() + "#" + dt.Rows[0]["hy_officetel"].ToString() + "#" + dt.Rows[0]["hy_mobile"].ToString() + "#" + dt.Rows[0]["hy_virtualnumber"].ToString() + "#" + dt.Rows[0]["hy_userid"].ToString() + "#" + dt.Rows[0]["hy_post"].ToString() + "#" + dt.Rows[0]["hy_hometel"].ToString() + "#" + dt2.Rows[0]["hy_xb"].ToString() + "#" + dt2.Rows[0]["hy_zzmm"].ToString() + "#" + dt2.Rows[0]["hy_xl"].ToString());
            }
            else
            {
                this.Response.Write(dt.Rows[0]["hy_deptname"].ToString() + "#" + dt.Rows[0]["hy_officetel"].ToString() + "#" + dt.Rows[0]["hy_mobile"].ToString() + "#" + dt.Rows[0]["hy_virtualnumber"].ToString() + "#" + dt.Rows[0]["hy_userid"].ToString() + "#" + dt.Rows[0]["hy_post"].ToString() + "#" + dt.Rows[0]["hy_hometel"].ToString() + "###");
            }
        }
        else
        {
            this.Response.Write("");
        }
        db.Close();
        //return ;
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:43,代码来源:hymainajax_getdeptByusername.aspx.cs

示例6: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        string ls_value = "";
        if (this.Request.QueryString["lsvalue"] != null)
        {
            ls_value = this.Request.QueryString["lsvalue"].ToString();
        }

        HyoaClass.DAO db = new HyoaClass.DAO();
        string lssql = "select * from hyt_user as a ,hyt_dept as b where a.hy_username='" + ls_value + "' and a.hy_deptid=b.hy_deptid";
        DataTable dt = db.GetDataTable(lssql);
        string ls_str = "";
        if (dt.Rows.Count > 0)
        {
            ls_str = dt.Rows[0]["hy_deptname"].ToString() + "," + dt.Rows[0]["hy_deptid"].ToString();
        }
        this.Response.Write(ls_str);
        db.Close();
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:19,代码来源:hymainajax_getdeptByname1.aspx.cs

示例7: btndelinfo_Click

 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();
 }
开发者ID:wjszxli,项目名称:Webapp,代码行数:20,代码来源:list_qjzl.aspx.cs

示例8: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if(Request.QueryString["key"]!=null)
        {
            string ls_key = "";
            ls_key = Request.QueryString["key"].ToString();
            DataTable dt;
            string sql = "select * from hyt_user where hy_userid like '%" + ls_key + "%'";
            HyoaClass.DAO db = new HyoaClass.DAO();
            dt = db.GetDataTable(sql);

            string ls_name = "";
            this.Response.Write("<div align=left id=sampleLayer style=\"position:absolute; top:130px; left:240px; width:250px; height:100px; background:#EEEEEE; overflow:scroll; border: 1px solid #919191; font-family:Verdana; font-size:8pt\">");
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                ls_name = ls_name + dt.Rows[i]["hy_userid"].ToString();
                this.Response.Write("<li><a href=\"#\" onclick=\"if(document.forms[0].txthy_jsrname.value==''){document.forms[0].txthy_jsrname.value='" + dt.Rows[i]["hy_username"].ToString() + "';document.forms[0].txthy_jsrid.value='" + dt.Rows[i]["hy_userid"].ToString() + "';}else{document.forms[0].txthy_jsrname.value=document.forms[0].txthy_jsrname.value+'+" + dt.Rows[i]["hy_username"].ToString() + "';document.forms[0].txthy_jsrid.value=document.forms[0].txthy_jsrid.value+'+" + dt.Rows[i]["hy_userid"].ToString() + "';} document.all('sampleLayer').style.visibility='hidden'; \">" + dt.Rows[i]["hy_username"].ToString() + "</a></li>");
            }
            this.Response.Write("</div>");
            db.Close();
            return;
        }
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:23,代码来源:GetReceiveMailList.aspx.cs

示例9: GetFieldHtml


//.........这里部分代码省略.........
                                    if (field_value == dtoptions.Rows[ii][0].ToString())
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                    else
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                }
                                else
                                {
                                    if (field_docvalue == dtoptions.Rows[ii][0].ToString())
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                    else
                                        lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=radio id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1_" + ii.ToString() + "\" " + field_functionhy_onclick + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                                }
                            }
                        }
                    }
                }
                //口令
                if (field_type == "口令")
                {
                    if (pi_flag == "0")
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=password id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + field_wordlimit + " value=\"" + field_value + "\">";
                    else
                        lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=password id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + field_wordlimit + " value=\"" + field_docvalue + "\">";
                }
                //附件组件
                if (field_type == "附件组件")
                {
                    lsField = "";
                    //根据docid得到目前已上传的附件信息
                    HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
                    DataTable dt_fileatt = Hyoa_fileatt.GetfileattByFatherid(docid);
                    HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();

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

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

                        }
                    }

                }
            }

            db.Close();
        }
        return lsField;
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:101,代码来源:main.aspx.cs

示例10: hywebopen_olddoc

    //旧文档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")
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:Webapp,代码行数:101,代码来源:main.aspx.cs

示例11: hywebopen_newdoc

    //新文档OPEN时的特殊处理
    private void hywebopen_newdoc()
    {
        HyoaClass.DAO db = new HyoaClass.DAO();
        DataTable dt;
        string lsyear = System.DateTime.Now.Year.ToString();
        string lssql = "";

        //物品采购自动读取流水号 格式:CG2014000001
        if (this.hy_mudelid.Text == "bgypcg" && this.hy_tableid.Text == "26e9b719-3ded-4fd2-a43b-6a45e30ccd1e")
        {
            int ls_lsh = 1;
            string ls_year = "", ls_lb = "";
            //读取流水号表中的流水号
            lssql = "select * from hyp_flowmain where hy_mudelid='Mudellsh' and hy_field1='物品采购' and hy_field4='启用'  ";
            dt = db.GetDataTable(lssql);
            if (dt.Rows.Count > 0)
            {
                ls_lsh = int.Parse(dt.Rows[0]["hy_field37"].ToString());
                ls_lb = dt.Rows[0]["hy_field2"].ToString();
                ls_year = dt.Rows[0]["hy_field3"].ToString();
                this.hy_field16.Text = ls_lb + ls_year + bzero(ls_lsh);    //打开时显示
            }
        }

        //维修管理自动读取流水号 格式:WX2014000001
        if (this.hy_mudelid.Text == "modulewxgl" && this.hy_tableid.Text == "b6938f55-5042-4c22-bd26-78fcded8cfbf")
        {
            int ls_lsh = 1;
            string ls_year = "", ls_lb = "";
            //读取流水号表中的流水号
            lssql = "select * from hyp_flowmain where hy_mudelid='Mudellsh' and hy_field1='维修管理' and hy_field4='启用'  ";
            dt = db.GetDataTable(lssql);
            if (dt.Rows.Count > 0)
            {
                ls_lsh = int.Parse(dt.Rows[0]["hy_field37"].ToString());
                ls_lb = dt.Rows[0]["hy_field2"].ToString();
                ls_year = dt.Rows[0]["hy_field3"].ToString();
                this.hy_field16.Text = ls_lb + ls_year + bzero(ls_lsh);    //打开时显示
            }
        }

        ////请假管理中用到
        //if (this.hy_mudelid.Text == "qjsq" && this.hy_tableid.Text == "d4af25f1-c7c0-4df9-a3b4-2c968ec3f2bc")
        //{
        //    if (this.hy_curtacheid.Text == "tache0001")
        //    {
        //        //得到180天内加班天数
        //        string lsdate = System.DateTime.Now.ToString();//今天日期
        //        DateTime today = DateTime.Today;
        //        DateTime newDate = today.AddDays(-2001);
        //        string lsdatefor60day = newDate.ToShortDateString(); //180天前

        //        lssql = "select sum(convert(float,hy_field16) ) from hyp_flowmain where hy_mudelid='jbsq' and hy_tableid='c980c86b-da0c-4758-b3d8-7236240c77da' and hy_curtacheid='**' and hy_djrid='" + this.Session["hyuid"].ToString() + "' and hy_field31>'" + lsdatefor60day + "' and hy_field31<'" + lsdate + "'";
        //        dt = db.GetDataTable(lssql);
        //        this.hy_field11.Text = dt.Rows[0][0].ToString();

        //        //得到180天内调休天数
        //        dt.Clear();
        //        lssql = "select sum(convert(float,hy_field2) ) from hyp_flowmain where hy_mudelid='qjsq' and hy_tableid='d4af25f1-c7c0-4df9-a3b4-2c968ec3f2bc' and hy_curtacheid='**' and hy_field1='调休' and hy_djrid='" + this.Session["hyuid"].ToString() + "' and hy_field31>'" + lsdatefor60day + "'";
        //        dt = db.GetDataTable(lssql);
        //        this.hy_field12.Text = dt.Rows[0][0].ToString();
        //        //得到今年年休假天数
        //        //dt.Clear();
        //        //lssql = "select sum(convert(float,hy_field2) ) from hyp_flowmain where hy_mudelid='qjsq' and hy_tableid='d4af25f1-c7c0-4df9-a3b4-2c968ec3f2bc' and hy_curtacheid='**' and hy_field1='年休假' and hy_djrid='" + this.Session["hyuid"].ToString() + "' and hy_field31>'" + lsyear + "-1-1" + "' and hy_field31<'" + lsyear + "-12-31" + "'";
        //        //dt = db.GetDataTable(lssql);
        //        //this.hy_field13.Text = dt.Rows[0][0].ToString();
        //        //得到年休天数
        //        //lssql = "select hy_field36 from hyp_flowmain where hy_mudelid='modulenxjwh' and hy_tableid='ed3f3e1b-1c2c-49b4-91de-5bcc35b83ffa' and hy_field1='" + this.Session["hyuid"].ToString() + "'";
        //        //dt = db.GetDataTable(lssql);
        //        //if(dt.Rows.Count>0)
        //        //    this.hy_field14.Text = dt.Rows[0][0].ToString();
        //    }
        //}
        db.Close();
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:76,代码来源:main.aspx.cs

示例12: btn_save_Click

    //保存
    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>");
        }
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:56,代码来源:main_tpgl_wytp.aspx.cs

示例13: DataPlay

    //打开文档显示
    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();
        }
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:72,代码来源:main_tpgl_wytp.aspx.cs

示例14: btntbbz_Click

    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 = "同步成功!";

    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:9,代码来源:importKQ.aspx.cs

示例15: DataPlay

    private void DataPlay(int PageNo)
    {
        //判断当前用户是否有新建删除权限
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()) || Hyoa_global.isHaveRole("Roleqjzl", this.Session["hyuid"].ToString()))
        {
            this.isrole.Value = "1";
            this.tdnewdoc.Visible = true; //新建
            this.tddeldoc.Visible = true; //删除

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

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

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

        string lssql = "select * from hyp_flowmain where hy_mudelid ='moduleqjzl' and hy_tableid='ac5e8ddd-d74c-4c9d-b0bf-5c23fc77b589'";
        //dt = Hyoa_iplimit.Getiplimits();
        if (this.Request.QueryString["keyword"] != null)
        {
            lssql += " and hy_field1='" + this.Request.QueryString["keyword"].ToString() + "'";
        }
        lssql += " order by hy_field32 desc ";
        dt = db.GetDataTable(lssql);

        DataTable tempTable = dt.Clone();
        for (int i = (PageNo - 1) * System.Int32.Parse(PageSize.Text); i < PageNo * System.Int32.Parse(PageSize.Text); i++)
        {
            if (i > dt.Rows.Count - 1)
                break;

            DataRow dr = tempTable.NewRow();
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
            }
            tempTable.Rows.Add(dr);
        }

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

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

            }
        }
        this.ShowTotalPage.Text = TotalPage.ToString();
        this.rptlist.DataSource = tempTable;
        this.rptlist.DataBind();
        dt.Clear();
        db.Close();

        ///只有管理员岗位能删除(大榭特有)
        //HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
        {
        }
        else
        {
            this.tddeldoc.Visible = false;
            //this.delcontrol_my.Visible = false;
        }
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:88,代码来源:list_qjzl.aspx.cs


注:本文中的HyoaClass.DAO.Close方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。