本文整理汇总了C#中TPortalClass.DAO.MakeInParam方法的典型用法代码示例。如果您正苦于以下问题:C# DAO.MakeInParam方法的具体用法?C# DAO.MakeInParam怎么用?C# DAO.MakeInParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPortalClass.DAO
的用法示例。
在下文中一共展示了DAO.MakeInParam方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Delete
//ɾ��һ������
public bool Delete()
{
bool ret = true;
DAO db = new DAO();
try
{
string sql = " delete JpColumnRelations where [email protected] and [email protected]_relation and [email protected] ";
SqlParameter[] sqlparam = {
db.MakeInParam("@cid",SqlDbType.VarChar,cid),
db.MakeInParam("@cid_relation",SqlDbType.VarChar,cid_relation),
db.MakeInParam("@relation",SqlDbType.VarChar,relation),
};
db.Execute(sql, sqlparam);
}
catch
{
ret = false;
}
finally
{
db.Close();
db.Dispose();
}
return ret;
}
示例2: Update
public bool Update()
{
bool ret = true;
DAO db = new DAO();
try
{
String sql = "UPDATE JpPubHtml SET [email protected],[email protected],[email protected] where [email protected]";
SqlParameter[] sqlparam = {
db.MakeInParam("@id",SqlDbType.VarChar,id),
db.MakeInParam("@pages",SqlDbType.VarChar,pages),
db.MakeInParam("@days",SqlDbType.VarChar,days),
db.MakeInParam("@status",SqlDbType.VarChar,status),
};
db.Execute(sql, sqlparam);
}
catch
{
ret = false;
}
finally
{
db.Close();
db.Dispose();
}
return ret;
}
示例3: Insert
/// <summary>
/// 插入
/// </summary>
/// <returns></returns>
public bool Insert()
{
bool ret = true;
DAO db = new DAO();
try
{
String sqlInsert = " insert into hy_verifycode(hy_tel,hy_code,hy_addtime) values (@hy_tel,@hy_code,@hy_addtime)";
SqlParameter[] sqlparam = {db.MakeInParam("@hy_addtime",SqlDbType.DateTime,hy_addtime),
db.MakeInParam("@hy_tel",SqlDbType.VarChar,hy_tel),
db.MakeInParam("@hy_code",SqlDbType.VarChar,hy_code)
};
db.Execute(sqlInsert, sqlparam);
}
catch (Exception ex)
{
throw ex;
ret = false;
}
finally
{
db.Close();
db.Dispose();
}
return ret;
}
示例4: Insert
public bool Insert()
{
bool ret = true;
DAO db = new DAO();
try
{
string sql = " insert into JpPubHtml(id,pages,days,status) values (@id,@pages,@days,@status)";
SqlParameter[] sqlparam = {
db.MakeInParam("@id",SqlDbType.VarChar,id),
db.MakeInParam("@pages",SqlDbType.VarChar,pages),
db.MakeInParam("@days",SqlDbType.VarChar,days),
db.MakeInParam("@status",SqlDbType.VarChar,status),
};
db.Execute(sql, sqlparam);
}
catch
{
ret = false;
}
finally
{
db.Close();
db.Dispose();
}
return ret;
}
示例5: Delete
/// <summary>
/// ɾ��
/// </summary>
/// <returns></returns>
public bool Delete()
{
bool ret = true;
DAO db = new DAO();
try
{
//��ɾ��ѡ��
String sql_option = "delete from JpVoteOptions where [email protected] ";
SqlParameter[] sqlparam_option = {
db.MakeInParam("@id",SqlDbType.Int,id),
};
db.Execute(sql_option, sqlparam_option);
String sql = "delete from JpVote where [email protected] ";
SqlParameter[] sqlparam = {
db.MakeInParam("@id",SqlDbType.Int,id),
};
db.Execute(sql, sqlparam);
}
catch
{
ret = false;
}
finally
{
db.Close();
db.Dispose();
}
return ret;
}
示例6: Delete
public void Delete(String cid,String tclass)
{
DAO db = new DAO();
String sql = "Delete FROM JpColumnsStyle where [email protected] and [email protected] ";
SqlParameter[] prams ={
db.MakeInParam("@cid", SqlDbType.VarChar, cid),
db.MakeInParam("@tclass", SqlDbType.VarChar, tclass)
};
db.Execute(sql, prams);
db.Close();
}
示例7: Delete
/// <summary>
/// ɾ��
/// </summary>
/// <returns></returns>
public bool Delete()
{
bool ret = true;
DAO db = new DAO();
try
{
string sql = "delete from JpTemplate where [email protected] ";
SqlParameter[] sqlparam = {
db.MakeInParam("@url",SqlDbType.VarChar,url),
};
db.Execute(sql, sqlparam);
}
catch
{
ret = false;
}
finally
{
db.Close();
db.Dispose();
}
return ret;
}
示例8: Delete
/// <summary>
/// ɾ��
/// </summary>
/// <returns></returns>
public bool Delete()
{
bool ret = true;
DAO db = new DAO();
try
{
String sql = "delete from JpOpinionHF where [email protected] ";
SqlParameter[] sqlparam = {
db.MakeInParam("@id",SqlDbType.Int,id),
};
db.Execute(sql, sqlparam);
}
catch
{
ret = false;
}
finally
{
db.Close();
db.Dispose();
}
return ret;
}
示例9: DeleteImg
public bool DeleteImg(string id)
{
bool ret = true;
DAO db = new DAO();
try
{
string sql = "delete from hy_fileatt where [email protected] ";
SqlParameter[] sqlparam = new SqlParameter[]
{
db.MakeInParam("@id", SqlDbType.VarChar, id)
};
db.Execute(sql, sqlparam);
}
catch
{
ret = false;
}
finally
{
db.Close();
db.Dispose();
}
return ret;
}
示例10: DeleteAll
/// <summary>
/// ɾ�����
/// </summary>
/// <returns></returns>
public bool DeleteAll(string uids)
{
bool ret = true;
DAO db = new DAO();
try
{
String sql = "delete from JpStudents where @uid like '%,'+uid+',%'";
SqlParameter[] sqlparam = {
db.MakeInParam("@uid",SqlDbType.VarChar,uids),
};
db.Execute(sql, sqlparam);
}
catch
{
ret = false;
}
finally
{
db.Close();
db.Dispose();
}
return ret;
}
示例11: JpColumns
public JpColumns(string cid)
{
string sql = " select * from JpColumns ";
sql += " where cid = @cid ";
DAO db = new DAO();
SqlParameter[] sqlparam = {
db.MakeInParam("@cid",SqlDbType.VarChar,cid),
};
DataTable dt = db.GetDataTable(sql, sqlparam);
if (dt.Rows.Count > 0)
{
this.cid = dt.Rows[0]["cid"].ToString();
this.cname = dt.Rows[0]["cname"].ToString();
this.tmp_col = dt.Rows[0]["tmp_col"].ToString();
this.tmp_art = dt.Rows[0]["tmp_art"].ToString();
this.online = dt.Rows[0]["online"].ToString();
this.hotpublish = dt.Rows[0]["hotpublish"].ToString();
this.pubtime = dt.Rows[0]["pubtime"].ToString();
this.seotitle = dt.Rows[0]["seotitle"].ToString();
this.seokeywords = dt.Rows[0]["seokeywords"].ToString();
this.seodescription = dt.Rows[0]["seodescription"].ToString();
this.pubhtmlpath = dt.Rows[0]["pubhtmlpath"].ToString();
this.ifhotnews = dt.Rows[0]["ifhotnews"].ToString();
this.csort = Int32.Parse(dt.Rows[0]["csort"].ToString());
this.shtml = dt.Rows[0]["shtml"].ToString();
this.rss = Int32.Parse(dt.Rows[0]["rss"].ToString());
this.newpic = dt.Rows[0]["newpic"].ToString();
this.newday = Int32.Parse(dt.Rows[0]["newday"].ToString());
}
}
示例12: Getdocsbyip
//����IP���ؽ��������˼���ͶƱ��Ϣ ls_date:yyyy-MM-dd��ʽ
public DataTable Getdocsbyip(int id, string ip)
{
String sql = " select * from JpVoteIP ";
sql += " where id = @id and ip = @ip and convert(char(10),addtime,120)=convert(char(10),getdate(),120) ";
DAO db = new DAO();
SqlParameter[] sqlparam = {
db.MakeInParam("@id",SqlDbType.Int,id),
db.MakeInParam("@ip",SqlDbType.VarChar,ip),
};
DataTable dt = db.GetDataTable(sql, sqlparam);
db.Close();
return dt;
}
示例13: Delete
/// <summary>
/// ɾ��
/// </summary>
/// <returns></returns>
public bool Delete()
{
bool ret = true;
DAO db = new DAO();
try
{
String sql = "delete from JpDepts where [email protected] ";
SqlParameter[] sqlparam = {
db.MakeInParam("@deptid",SqlDbType.VarChar,deptid),
};
db.Execute(sql, sqlparam);
}
catch
{
ret = false;
}
finally
{
db.Close();
db.Dispose();
}
return ret;
}
示例14: Delete
/// <summary>
/// 删除
/// </summary>
/// <returns></returns>
public bool Delete()
{
bool ret = true;
DAO db = new DAO();
try
{
//先删除选项
String sql_option = "delete from hy_guidepage where [email protected] ";
SqlParameter[] sqlparam_option = {
db.MakeInParam("@id",SqlDbType.Int,id),
};
db.Execute(sql_option, sqlparam_option);
}
catch
{
ret = false;
}
finally
{
db.Close();
db.Dispose();
}
return ret;
}
示例15: GetStyles
public DataTable GetStyles(string tclass,String cid)
{
string sql = " select a.*,b.description+' '+a.url as thetxt from JpColumnsStyle a left join JpTemplate b on a.url=b.url where 1=1";
sql += " and [email protected] ";
sql += " and [email protected] ";
DAO db = new DAO();
SqlParameter[] sqlparam = {
db.MakeInParam("@tclass",SqlDbType.VarChar,tclass),
db.MakeInParam("@cid",SqlDbType.VarChar,cid)
};
DataTable dt = db.GetDataTable(sql, sqlparam);
return dt;
}