/// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string QT_NO, string PRD_NO)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select count(1)  as gets from   OP_QT_ITM_TempOrderBy  ");
            strSql.Append(" where QT_NO=@QT_NO and PRD_NO=@PRD_NO ");

            SqlParameter[] parameters = {
                    new SqlParameter("@QT_NO", SqlDbType.VarChar,50),
                    new SqlParameter("@PRD_NO", SqlDbType.VarChar,50)};
            parameters[0].Value = QT_NO;
            parameters[1].Value = PRD_NO;

            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);



            if (ds.Tables[0].Rows.Count > 0)
            {

                if (int.Parse(ds.Tables[0].Rows[0]["gets"].ToString()) > 0)
                {
                    return true;
                }

                else
                {

                    return false;
                }
                
                
            }
            else
            {
                return false;

            }
        }


附上原来的代码,晕死了!这个应该不会错才是

  /// <summary>
    /// 是否存在该记录
    /// </summary>
    public bool Exists(string QT_NO,string PRD_NO)
    {
      StringBuilder strSql=new StringBuilder();
      strSql.Append("select count(1) from OP_QT_ITM_TempOrderBy");
      strSql.Append(" where QT_NO=@QT_NO and PRD_NO=@PRD_NO ");

      SqlParameter[] parameters = {
          new SqlParameter("@QT_NO", SqlDbType.VarChar,50),
          new SqlParameter("@PRD_NO", SqlDbType.VarChar,50)};
      parameters[0].Value = QT_NO;
      parameters[1].Value = PRD_NO;

      return DbHelperSQL.Exists(strSql.ToString(),parameters);
    }
Tags:
从去年开始测试,终于出来了!有返回值
  public DataSet GetPrice(string prdno, DateTime datetime, string shwotop1)
        {


            SqlParameter[] parameter ={
                new SqlParameter("@PrdtNO",SqlDbType.VarChar,7),
                new SqlParameter("@DATETIME",SqlDbType.DateTime,10),
                new SqlParameter("@TOP1",SqlDbType.VarChar,1)
            };
            parameter[0].Value = prdno;
            parameter[1].Value = datetime;
            parameter[2].Value = shwotop1;

            return DbHelperSQL.RunProcedure("sp_OP_Prdt_Alert查產品報價提示", parameter,"sp_alert");
        }



  QST qst = new QST();
    protected void Page_Load(object sender, EventArgs e)
    {
        DateTime dtte = Convert.ToDateTime("2003-04-01");
        this.GridView1.DataSource = qst.GetPrice("2020044", dtte, "");
        this.GridView1.DataBind();
    }
function checkallbox(the_form,inp, do_check) {
    var elts = (typeof(document.forms[the_form].elements[inp]) != 'undefined')
                  ? document.forms[the_form].elements[inp]
                  : (typeof(document.forms[the_form].elements[inp]) != 'undefined')
          ? document.forms[the_form].elements[inp]
          : document.forms[the_form].elements[inp];  

    if (elts) {
    var elts_cnt  = (typeof(elts.length) != 'undefined')
                  ? elts.length
                  : 0;
    if (elts_cnt) {
      for (var i = 0; i < elts_cnt; i++) {
        elts[i].checked = do_check;
      }
    } else {
      elts.checked  = do_check;
    }
  }

  //return true;
}


<a href="javascript:checkallbox('delform','delid','checked')">全选</a> | <a href="javascript:checkallbox('delform','delid','');">取消全选</a>

DbHelperSQL.cs 不指定

Else , 2008/11/18 14:22 , 代码片段,演示也有 , Comments(0) , Reads(1817) , Via Original
把李天平老师的代码拿过来学习
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Data.Common;
using System.Collections.Generic;
namespace Maticsoft.DBUtility
{
    ///
    /// 数据访问抽象基础类
    /// Copyright (C) 2004-2008 By LiTianPing
    ///

    public abstract class DbHelperSQL
    {
        //数据库连接字符串(web.config来配置),可以动态更改connectionString支持多数据库.  
        public static string connectionString = PubConstant.ConnectionString;      
        public DbHelperSQL()
        {            
        }
[hcode]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
//Font size control
function doZoom(size) {
  document.getElementById('zoomtext').style.fontSize=size+'px';
}
</script>
</head>

<body>
<div>设置字体大小:<a href="javascript:doZoom(16);">大</a> <a href="javascript:doZoom(14);">中</a> <a href="javascript:doZoom(12);">小</a></div>
<div id="zoomtext">这个是要显示的字体大小</div>
</body>
</html>
[/hcode]
其中weborder是表
SELECT
INFORMATION_SCHEMA.COLUMNS.*,
COL_LENGTH('weborder', INFORMATION_SCHEMA.COLUMNS.COLUMN_NAME) AS COLUMN_LENGTH,
COLUMNPROPERTY(OBJECT_ID('weborder'), INFORMATION_SCHEMA.COLUMNS.COLUMN_NAME, 'IsComputed') AS IsComputed,
COLUMNPROPERTY(OBJECT_ID('weborder'), INFORMATION_SCHEMA.COLUMNS.COLUMN_NAME, 'IsIdentity') AS IsIdentity,
COLUMNPROPERTY(OBJECT_ID('weborder'), INFORMATION_SCHEMA.COLUMNS.COLUMN_NAME, 'IsRowGuidCol') AS IsRowGuidCol,
ExtendedProperties.Value AS ProgrammaticAlias
FROM
INFORMATION_SCHEMA.COLUMNS
LEFT JOIN ::fn_listextendedproperty('ProgrammaticAlias', 'user', 'dbo', 'table', 'weborder', 'column', default) AS ExtendedProperties

ON INFORMATION_SCHEMA.COLUMNS.COLUMN_NAME = ExtendedProperties.objName COLLATE Chinese_PRC_CI_AS
WHERE
INFORMATION_SCHEMA.COLUMNS.TABLE_NAME = 'weborder'
function showmore(getid)
{
  var dshow=document.getElementById(getid);  
  var showid=dshow.getElementsByTagName("dl");
  if(showid.length<1) return false;
  for(var i=0;i    //初始化,让第一个类为over
    if(showid[i].className.indexOf("over")==-1){
      showid[0].className="over";
    }
    //遍历循环,模拟:hover伪类
    showid[i].onmouseover=function(){
      for(var j=0;j        showid[j].className="";
      }
      this.className="over";
    }
  }
  
}
window.onload=function(){
  showmore("wrapper");
  showmore("wrapper1");
  showmore("wrapper2");
  showmore("wrapper3");
}

window.onload=function(){
var w1=document.getElementById("wrapper");
var w2=document.getElementById("wrapper1");
var w3=document.getElementById("wrapper2");
var w4=document.getElementById("wrapper3");

  
  
  var dl_1=w1.getElementsByTagName("dl");
  //alert(dl_1.length);
  if(dl_1.length<1) return false;
  for(var i=0;i<dl_1.length;i++){
    //初始化,让第一个类为over
    if(dl_1[i].className.indexOf("over")==-1){
      dl_1[0].className="over";
      
    }
    //遍历循环,模拟:hover伪类
    dl_1[i].onmouseover=function(){
      for(var j=0;j<dl_1.length;j++){
        dl_1[j].className="";
      }
      this.className="over";
    }
  }

HTML Tags
<!-->
<!DOCTYPE>
<a>
<abbr>
<acronym>
<address>
<applet>
<area>
<b>
<base>
<basefont>
<bdo>
<big>
Tags:
这个是官方推荐的方法,通过dw的验证
这里的代码

ie下会多3px;
.cls6_1,.cls5_1{margin-left:8px;}


加head上面加这个,加zoom
<!--[if IE]>
<style type="text/css">
.cls6_1,.cls5_1{margin-left:5px;zoom:1;}
.cls5_2{margin-left:298px;margin-right:254px;zomm:1;}
.cls6_2,.cls5_3{margin-right:5px;zoom:1;}
</style>
<![endif]-->

ps.........................................................
昨天的排版,今天挖错,我的排版中是用4px和8px,在fw下对比,左右两边正常!无逢链接!
Tags: , , , ,
Pages: 10/40 First page Previous page 5 6 7 8 9 10 11 12 13 14 Next page Final page [ View by Articles | List ]