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


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

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


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

示例1: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        string lsyear = "";

        if (this.Request.QueryString["lsyear"] != null)
        {
            lsyear = this.Request.QueryString["lsyear"].ToString();
        }
        HyoaClass.DAO db = new HyoaClass.DAO();
        //本年已年休天数
        string lssql1 = "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_field3='"+lsyear+"'";
        //可年休天数
        string lssql2 = "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() + "' and hy_field3='" + lsyear + "'";
        DataTable dt1 = db.GetDataTable(lssql1);
        DataTable dt2 = db.GetDataTable(lssql2);

        string lsstr1 = "0";
        string lsstr2 = "0";
        if (dt1.Rows.Count > 0)
        {
            lsstr1 = dt1.Rows[0][0].ToString();
        }
        if (dt2.Rows.Count > 0)
        {
            lsstr2 = dt2.Rows[0][0].ToString();
        }

        this.Response.Write(lsstr1 + "#" + lsstr2);

        //return ;
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:31,代码来源:hymainajax_qjgl.aspx.cs

示例2: 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

示例3: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        string lsyear = "";

        if (this.Request.QueryString["lsyear"] != null)
        {
            lsyear = this.Request.QueryString["lsyear"].ToString();
        }
        HyoaClass.DAO db = new HyoaClass.DAO();
        //本年已加班天数
        string lssql1 = "select sum(convert(float,hy_field16)) from hyp_flowmain where hy_mudelid='jbsq' and ";
        lssql1 += " hy_tableid='c980c86b-da0c-4758-b3d8-7236240c77da' and hy_curtacheid='**' and ";
        lssql1 += " hy_djrid='" + this.Session["hyuid"].ToString() + "' and datename(year,hy_field31)='" + lsyear + "'";
        //已调休天数
        string lssql2 = "select sum(convert(float,hy_field2)) from hyp_flowmain where hy_mudelid='qjsq' and ";
        lssql2 += " hy_tableid='d4af25f1-c7c0-4df9-a3b4-2c968ec3f2bc' and hy_curtacheid='**' and hy_field1='调休' and ";
        lssql2 += " hy_djrid='" + this.Session["hyuid"].ToString() + "' and hy_field3='" + lsyear + "'";
        DataTable dt1 = db.GetDataTable(lssql1);
        DataTable dt2 = db.GetDataTable(lssql2);

        string lsstr1 = "0";
        string lsstr2 = "0";
        if (dt1.Rows.Count > 0)
        {
            lsstr1 = dt1.Rows[0][0].ToString();
        }
        if (dt2.Rows.Count > 0)
        {
            lsstr2 = dt2.Rows[0][0].ToString();
        }

        this.Response.Write(lsstr1 + "#" + lsstr2);

        //return ;
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:35,代码来源:hymainajax_qjgldx.aspx.cs

示例4: GetDF

 //部门信息得分
 public string GetDF(string deptname)
 {
     string ls_temp = deptname;
     string lsif = "";
     HyoaClass.DAO db = new HyoaClass.DAO();
     if (this.hy_djsj_start_1.Value != "")
     {
         lsif += "  and CONVERT(varchar(10), hy_field31, 120)>='" + this.hy_djsj_start_1.Value + "' ";
     }
     if (this.hy_djsj_end_1.Value != "")
     {
         lsif += "   and CONVERT(varchar(10), hy_field31, 120)<='" + this.hy_djsj_end_1.Value + "' ";
     }
     string strSelect = "select * from hyt_user d left join  hyp_flowmain m on d.hy_username=m.hy_field6 left  join hyt_dept n on n.hy_deptid=d.hy_deptid  where m.hy_mudelid='xxgl' and m.hy_tableid='f1265875-5494-465f-ac33-6fa43d208c8f'  " + lsif + " and n.hy_deptname='" + ls_temp + "' order by d.hy_deptid,d.hy_sort";
     double tt = 0;
     DataTable dt = db.GetDataTable(strSelect);
     if (dt.Rows.Count != 0)
     {
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             tt += double.Parse(dt.Rows[i]["hy_field9"].ToString());
         }
     }
     return tt.ToString();
 }
开发者ID:wjszxli,项目名称:Webapp,代码行数:26,代码来源:xxgl_grtj.aspx.cs

示例5: btnscsj_Click_gzjcb

    protected void btnscsj_Click_gzjcb(object sender, EventArgs e)
    {
        //工作检查表
        HyoaClass.DAO db = new HyoaClass.DAO();
        string sql = "select * from hyp_flowmain where hy_mudelid='djgz' and hy_tableid='0e5efe98-49a5-4ccd-9532-8cac74ab328d' ";
        if (this.hy_field9_1.Value != "")
            sql += " and hy_field9 like '%" + this.hy_field9_1.Value + "%' ";

        if (this.hy_djsj_start_1.Value != "")
            sql += " and  CONVERT(varchar(10),hy_field31,120) >= '" + this.hy_djsj_start_1.Value + "' ";

        if (this.hy_djsj_end_1.Value != "")
            sql += " and  CONVERT(varchar(10),hy_field31,120) <= '" + this.hy_djsj_end_1.Value + "' ";

        sql += "  and (hy_field8='委员会' or hy_field8='党员大会' or hy_field8='党课' or hy_field8='其它组织生活') order by hy_field31 asc ";

        //this.Response.Write(sql);
        DataTable dt = db.GetDataTable(sql);
        string lsstr = "";
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            lsstr += (i + 1).ToString() + "~" + System.DateTime.Parse(dt.Rows[i]["hy_field31"].ToString()).ToShortDateString() + "~" + dt.Rows[i]["hy_field7"].ToString();
            lsstr += "~" + dt.Rows[i]["hy_field37"].ToString() + "~" + dt.Rows[i]["hy_field38"].ToString() + "~" + dt.Rows[i]["hy_field8"].ToString() + ":" + dt.Rows[i]["hy_bt"].ToString();
            lsstr += "#*";
        }
        this.hy_count.Text = dt.Rows.Count.ToString();
        this.hy_scsj.Text = lsstr;
        this.Response.Write("<script>alert('生成完成,请点击导出按钮!');</script>");
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:29,代码来源:list_ml.aspx.cs

示例6: 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 hy_field3 from hyp_flowmain where hy_mudelid='" + ls_mudelid + "' and hy_tableid='" + ls_tableid + "' and hy_field2='" + ls_value + "'";
        DataTable dt = db.GetDataTable(lssql);

        this.Response.Write(dt.Rows[0]["hy_field3"].ToString());

        //return ;
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:27,代码来源:hymainajax_getfs.aspx.cs

示例7: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        string ls_value1 = "";
        string ls_value2 = "";

        if (this.Request.QueryString["lsvalue1"] != null)
        {
            ls_value1 = this.Request.QueryString["lsvalue1"].ToString();  //类别
        }
        if (this.Request.QueryString["lsvalue2"] != null)
        {
            ls_value2 = this.Request.QueryString["lsvalue2"].ToString();  //年份
        }
        //Response.Write(ls_value2);
        HyoaClass.DAO db = new HyoaClass.DAO();
        string lssql = "select hy_field37 from hyp_flowmain where hy_mudelid='Mudellsh' and hy_field1='" + ls_value1 + "' and hy_field2='" + ls_value2 + "' order by hy_field36";
        //Response.Write(lssql);
        DataTable dt = db.GetDataTable(lssql);
        if (dt.Rows.Count > 0)
        {
            this.Response.Write(dt.Rows[0][0].ToString());
        }
        else
        {
            this.Response.Write("1");
        }
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:27,代码来源:hymainajax_lsh.aspx.cs

示例8: 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

示例9: 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

示例10: 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

示例11: DataPlay

    private void DataPlay(int PageNo)
    {
        //得到当前页号
        HyoaClass.DAO db = new HyoaClass.DAO();
        string sql = "";
        sql = "select * from hyp_flowmain where hy_mudelid='clgl' and hy_tableid='a7c3875f-d6c8-4c9d-819b-e5e84a6bd79f'  ";

        sql += " order by hy_field1 ";

        DataTable dt = db.GetDataTable(sql);
        DataTable tempTable = dt.Clone();

        DataColumn col1 = new DataColumn("lcs", typeof(String));
        tempTable.Columns.Add(col1);

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            DataRow dr = tempTable.NewRow();
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
            }
            //根据车牌号去查找这辆车的里程数的记录
            string lsdateend;
            string ls_sqllc = "select sum(hy_field36) from hyp_flowmain where hy_mudelid='clgl' and hy_tableid='8b10b316-98d6-4a50-bc15-52745bb119bb' and hy_field5='" + dt.Rows[i]["hy_field1"].ToString()+"' ";
            if (this.hy_djsj_start_1.Value!="")
            {
                ls_sqllc = ls_sqllc + " and hy_djsj>='" + this.hy_djsj_start_1.Value + "' ";
            }
            if (this.hy_djsj_end_1.Value != "")
            {
                lsdateend = this.hy_djsj_end_1.Value;
                DateTime dts = Convert.ToDateTime(lsdateend);
                DateTime date_effect = dts.AddDays(1);//加一天
                ls_sqllc = ls_sqllc + " and hy_djsj<='" + date_effect.ToString("yyyy-MM-dd").ToString() + "' ";
            }

            DataTable dt_gettoday = db.GetDataTable(ls_sqllc);
            if (dt_gettoday.Rows.Count > 0)
            {
                dr["lcs"] = dt_gettoday.Rows[0][0];
            }
            tempTable.Rows.Add(dr);
        }

        DataView dv = new DataView();
        dv.Table = tempTable;

        int TotalRecord = dt.Rows.Count;
        this.sumts.Text = TotalRecord.ToString();
        this.sumts2.Text = TotalRecord.ToString();
        this.rptlist.DataSource = dv;
        this.rptlist.DataBind();
        dt.Clear();
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:55,代码来源:list_sumLC.aspx.cs

示例12: Page_Load

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

        if (!IsPostBack)
        {
            if (this.Request.QueryString["mid"] != null)
            {
                this.txtmudelid.Value = Request.QueryString["mid"].ToString();
            }
            else
            {
                this.Response.Write("<script>alert('模块ID没有传入,请联系管理员!');</script>");
                return;
            }

            if (this.Request.QueryString["tableid"] != null)
            {
                this.txttableid.Value = Request.QueryString["tableid"].ToString();
            }
            else
            {
                this.Response.Write("<script>alert('表单ID没有传入,请联系管理员!');</script>");
                return;
            }

            //加车牌号下拉信息
            HyoaClass.DAO clgldb = new HyoaClass.DAO();
            string lsclglsql = "select hy_field1 from hyp_flowmain where hy_mudelid='clgl' and hy_tableid='a7c3875f-d6c8-4c9d-819b-e5e84a6bd79f'";
            DataTable dtclgl = clgldb.GetDataTable(lsclglsql);

            if (dtclgl.Rows.Count > 0)
            {
                this.hy_field1_1.DataSource = dtclgl;
                this.hy_field1_1.DataTextField = "hy_field1";
                this.hy_field1_1.DataValueField = "hy_field1";
                this.hy_field1_1.DataBind();
                this.hy_field1_1.Items.Insert(0, new ListItem("", ""));
                this.hy_field1_1.SelectedIndex = 0;
                //this.ddlmudelid.Items.Insert(0, new ListItem(lsmudel, lsmudelid));
            }
            //经费类别下拉信息
            this.hy_field3_1.Items.Insert(0, "");
            this.hy_field3_1.Items.Insert(1, "保养经费");
            this.hy_field3_1.Items.Insert(2, "维护经费");
            this.hy_field3_1.Items.Insert(3, "汽油经费");

            this.txturl.Text = this.Request.RawUrl;
            DataPlay(1);
        }
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:52,代码来源:list_jftj.aspx.cs

示例13: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     string ls_temp = "";
     if (this.Request.QueryString["ls_txtdocid"] != null)
     {
         ls_temp = this.Request.QueryString["ls_txtdocid"].ToString();
     }
     HyoaClass.DAO db = new HyoaClass.DAO();
     string sql = "select * from hyp_flowmain where hy_mudelid='rsgl' and hy_tableid='6047076e-6a95-4fb8-aec8-5551d3900590' and docid='" + ls_temp + "'";
     DataTable dt = db.GetDataTable(sql);
     if (dt.Rows.Count > 0)
     {
         this.Response.Write(dt.Rows[0]["hy_field11"].ToString());
     }
 }
开发者ID:wjszxli,项目名称:Webapp,代码行数:15,代码来源:hymainajax_jcsy.aspx.cs

示例14: pdsftpg

 //判断是否已经投票过
 public string pdsftpg(string pis_id)
 {
     string rValue = "<font color='red'>我要投票</font>";
     HyoaClass.DAO db = new HyoaClass.DAO();
     string sql1 = "select * from hyk_whzx_tpgl_tpmx where hy_tpztid='" + pis_id + "' and  hy_tprid='" + this.Session["hyuid"].ToString() + "'  ";
     DataTable dt = db.GetDataTable(sql1);
     if (dt.Rows.Count > 0)
     {
         rValue = "已投票";
     }
     string sql2 = "select * from hyk_whzx_tpgl where id='" + pis_id + "'";
     DataTable dt2 = db.GetDataTable(sql2);
     if (dt2.Rows.Count > 0)
     {
         if (dt2.Rows[0]["hy_gjzt"].ToString() == "结束投票")
         {
             rValue = "<font color='bule'>结束投票</font>";
         }
     }
     dt.Clear();
     dt2.Clear();
     db.Close();
     return rValue;
 }
开发者ID:wjszxli,项目名称:Webapp,代码行数:25,代码来源:list_tpgl_wytp.aspx.cs

示例15: DataPlay

    private void DataPlay()
    {
        HyoaClass.DAO db = new HyoaClass.DAO();
        string ls_html = "";
        float ls_sum = 0;
        String[] v_ids = this.txtids.Value.Split(',');
        for (var i = 0; i < v_ids.Length; i++)
        {
            //根据ID得到信息
            string ls_sql = "select * from hyp_flowmain where DOCID='" + v_ids[i] + "'";
            DataTable dt = db.GetDataTable(ls_sql);

            if (dt.Rows.Count > 0)
            {
                string ls_spyj = dt.Rows[0]["hy_content2"].ToString();
                ls_spyj = ls_spyj.Replace("<br>","");
                ls_spyj = ls_spyj.Replace("&nbsp;", " ");
                //ls_spyj = ls_spyj.Replace("&#160;", "");
                ls_spyj = ls_spyj.Replace(")", ")<br>");
                string ls_spyj2 = dt.Rows[0]["hy_content3"].ToString();
                ls_spyj2 = ls_spyj2.Replace("<br>", "");
                ls_spyj2 = ls_spyj2.Replace("&nbsp;", " ");
                //ls_spyj = ls_spyj.Replace("&#160;", "");
                ls_spyj2 = ls_spyj2.Replace(")", ")<br>");

                ls_html += "<tr onMouseOver=\"this.className='tr-over'\" onmouseout=\"this.className='TrList_ciq'\" class=\"TrList_ciq\">";
                ls_html += "<td width=\"5%\" height=\"28\" align=\"center\">" + (i + 1) + "</td>";
                ls_html += "<td width=\"8%\" align=\"center\">" + dt.Rows[0]["hy_djrname"].ToString() + "</td>";
                ls_html += "<td width=\"8%\" align=\"center\">" + dt.Rows[0]["hy_djrbmname"].ToString() + "</td>";
                ls_html += "<td width=\"8%\" align=\"center\">" + DateTime.Parse(dt.Rows[0]["hy_djsj"].ToString()).ToString("yyyy-MM-dd") + "</td>";
                ls_html += "<td width=\"8%\" align=\"center\">" + dt.Rows[0]["hy_field16"].ToString() + "</td>";
                ls_html += "<td width=\"8%\" align=\"center\">" + dt.Rows[0]["hy_bt"].ToString() + "</td>";
                ls_html += "<td width=\"8%\" align=\"center\">" + dt.Rows[0]["hy_field1"].ToString() + "</td>";
                ls_html += "<td width=\"8%\" align=\"center\">" + dt.Rows[0]["hy_field99"].ToString() + "</td>";
                ls_html += "<td width=\"12%\" align=\"center\">" + dt.Rows[0]["hy_content1"].ToString() + "</td>";
                ls_html += "<td width=\"27%\" align=\"left\">" + ls_spyj + ls_spyj2 + "</td>";
                ls_html += "</tr>";
                ls_sum += float.Parse(dt.Rows[0]["hy_field99"].ToString());
            }
        }

        this.lblsum.Text = "合计总额:" + ls_sum.ToString("f2");
        this.lblhtml.Text = ls_html;
    }
开发者ID:wjszxli,项目名称:Webapp,代码行数:44,代码来源:list_dcdywxgl.aspx.cs


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