本文整理汇总了C#中com.harmony.SqlHelper.SqlParameterDef类的典型用法代码示例。如果您正苦于以下问题:C# SqlParameterDef类的具体用法?C# SqlParameterDef怎么用?C# SqlParameterDef使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SqlParameterDef类属于com.harmony.SqlHelper命名空间,在下文中一共展示了SqlParameterDef类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: setParameter
private void setParameter(iSqlParameter[] parms, CategoryattrInfo info)
{
try
{
int i = -1;
parms[++i].Value = CFunctions.SetDBString(info.Code);
parms[++i].Value = CFunctions.SetDBString(info.Name);
parms[++i].Value = CFunctions.SetDBString(info.Note);
parms[++i].Value = CFunctions.SetDBString(info.Url);
parms[++i].Value = CFunctions.SetDBString(info.Filepreview);
parms[++i].Value = info.Cid;
parms[++i].Value = info.Orderd == 0 ? info.Id : info.Orderd;
parms[++i].Value = info.Status;
parms[++i].Value = info.Markas;
parms[++i].Value = info.Iconex;
parms[++i].Value = CFunctions.SetDBDatetime(info.Timeupdate);
parms[++i].Value = CFunctions.SetDBString(info.Username);
parms[++i].Value = info.Pis;
parms[++i].Value = info.Pid;
parms[++i].Value = info.Depth;
parms[++i].Value = CFunctions.install_keyword(info.Name) + " " + CFunctions.install_keyword(info.Note);
parms[++i].Value = info.Id;
return;
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:thienchi,项目名称:my-bfinance,代码行数:29,代码来源:CDAL.cs
示例2: Updatestr
public bool Updatestr(string id, string column, object value)
{
try
{
if (CFunctions.IsNullOrEmpty(id)) return false;
using (iSqlConnection iConn = HELPER.getConnect(HELPER.SQL_SYSTEM))
{
string SQL = "UPDATE " + TABLENAME + " SET " + column + "[email protected]_VALUE WHERE id IN(" + id + ")";
iSqlParameter[] parms = new iSqlParameter[]{
new iSqlParameter("PARM_VALUE", iSqlType.Field_tString),
};
int i = -1;
parms[++i].Value = value.ToString();
HELPER.executeNonQuery(iConn, iCommandType.Text, SQL, parms);
iConn.Close();
}
return true;
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:thienchi,项目名称:my-bfinance,代码行数:24,代码来源:CDAL.cs
示例3: Wcmm_Getinfo
public MemberInfo Wcmm_Getinfo(int id)
{
if (id == -1) return null;
try
{
MemberInfo info = null;
using (iSqlConnection iConn = HELPER.getConnect(HELPER.SQL_SYSTEM))
{
string SQL = SQL_GETIFO + " AND [email protected]";
iSqlParameter[] parms = new iSqlParameter[]{
new iSqlParameter(PARM_ID, iSqlType.Field_tInterger),
};
int i = -1;
parms[++i].Value = id;
using (iSqlDataReader dar = HELPER.executeReader(iConn, iCommandType.Text, SQL, parms))
{
if (dar.Read())
{
info = this.getDataReader(dar);
}
}
iConn.Close();
}
return info;
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:thienchi,项目名称:my-bfinance,代码行数:31,代码来源:CDAL.cs
示例4: ChangePwd
public bool ChangePwd(MemberInfo info)
{
try
{
if (info == null) return false;
using (iSqlConnection iConn = HELPER.getConnect(HELPER.SQL_SYSTEM))
{
iSqlParameter[] parms = new iSqlParameter[]{
new iSqlParameter(PARM_PASSWORD, iSqlType.Field_tString),
new iSqlParameter(PARM_ID, iSqlType.Field_tInterger)
};
parms[0].Value = info.Password;
parms[1].Value = info.Id;
HELPER.executeNonQuery(iConn, iCommandType.Text, SQL_CHANGE_PWD, parms);
iConn.Close();
}
return true;
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:thienchi,项目名称:my-bfinance,代码行数:23,代码来源:CDAL.cs
示例5: Getlist
public List<MeCreditcardHistoryInfo> Getlist(int memberid, ListOptions options, out int numResults)
{
try
{
List<MeCreditcardHistoryInfo> arr = null;
using (iSqlConnection iConn = HELPER.getConnect(HELPER.SQL_SYSTEM))
{
string SQL = SQL_GETIFOPAGING.Replace(Queryparam.Varstring.VAR_SORTEXPRESSION, CFunctions.Expression_GetSort(options.SortExp, options.SortDir));
SQL += " AND [email protected]";
SQL = "SELECT * FROM(" + SQL + ") AS T WHERE id<>0 " + CFunctions.Expression_GetLimit(options.PageIndex, options.PageSize);
iSqlParameter[] parms = new iSqlParameter[]{
new iSqlParameter(PARM_MEMBERID, iSqlType.Field_tInterger),
};
int i = -1;
parms[++i].Value = memberid;
using (iSqlDataReader dar = HELPER.executeReader(iConn, iCommandType.Text, SQL, parms))
{
while (dar.Read())
{
MeCreditcardHistoryInfo info = this.getDataReader(dar);
if (arr == null)
arr = new List<MeCreditcardHistoryInfo>();
arr.Add(info);
}
dar.Close();
}
numResults = this.Getlistcount(iConn, memberid);
iConn.Close();
}
return arr;
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:thienchi,项目名称:my-bfinance,代码行数:36,代码来源:CDAL.cs
示例6: iSqlParameter
private iSqlParameter[] getParameter(string query)
{
try
{
iSqlParameter[] parms = HELPER.getCachedParameters(query);
if (parms == null)
{
parms = new iSqlParameter[]{
new iSqlParameter(PARM_NAME, iSqlType.Field_tString),
new iSqlParameter(PARM_PATH, iSqlType.Field_tString),
new iSqlParameter(PARM_NOTE, iSqlType.Field_tString),
new iSqlParameter(PARM_SUBJECT, iSqlType.Field_tString),
new iSqlParameter(PARM_URL, iSqlType.Field_tString),
new iSqlParameter(PARM_SIZED, iSqlType.Field_tBigInt),
new iSqlParameter(PARM_TYPED, iSqlType.Field_tInterger),
new iSqlParameter(PARM_ORDERD, iSqlType.Field_tInterger),
new iSqlParameter(PARM_STATUS, iSqlType.Field_tInterger),
new iSqlParameter(PARM_MARKAS, iSqlType.Field_tInterger),
new iSqlParameter(PARM_ICONEX, iSqlType.Field_tString),
new iSqlParameter(PARM_TIMEUPDATE, iSqlType.Field_tDate),
new iSqlParameter(PARM_USERNAME, iSqlType.Field_tString),
new iSqlParameter(PARM_BELONGTO, iSqlType.Field_tInterger),
new iSqlParameter(PARM_IID, iSqlType.Field_tInterger),
new iSqlParameter(PARM_ID, iSqlType.Field_tInterger),
};
HELPER.cacheParameters(query, parms);
}
return parms;
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:thienchi,项目名称:my-bfinance,代码行数:34,代码来源:CDAL.cs
示例7: Getinfo
public BannerInfo Getinfo(string code)
{
try
{
BannerInfo info = null;
using (iSqlConnection iConn = HELPER.getConnect(HELPER.SQL_SYSTEM))
{
string SQL = SQL_GETIFO + " AND [email protected]";
SQL += " AND A.status<>" + (int)CConstants.State.Status.Waitactive;
SQL += " AND A.status<>" + (int)CConstants.State.Status.Disabled;
iSqlParameter[] parms = new iSqlParameter[]{
new iSqlParameter(PARM_CODE, iSqlType.Field_tString),
};
int i = -1;
parms[++i].Value = code;
using (iSqlDataReader dar = HELPER.executeReader(iConn, iCommandType.Text, SQL, parms))
{
if (dar.Read())
{
info = this.getDataReader(dar);
}
}
iConn.Close();
}
return info;
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:thienchi,项目名称:my-bfinance,代码行数:32,代码来源:CDAL.cs
示例8: Getinforating
public CommentInfo Getinforating(int belongto, int pid)
{
if (belongto == 0 || pid == 0) return null;
try
{
CommentInfo info = null;
using (iSqlConnection iConn = HELPER.getConnect(HELPER.SQL_SYSTEM))
{
string SQL = "SELECT COUNT(id), SUM(rating) FROM " + TABLENAME + " AS A WHERE id<>0";
SQL += " AND [email protected]";
SQL += " AND [email protected]";
SQL += " AND A.status=" + (int)CConstants.State.Status.Actived;
iSqlParameter[] parms = new iSqlParameter[]{
new iSqlParameter(PARM_IID, iSqlType.Field_tInterger),
new iSqlParameter(PARM_BELONGTO, iSqlType.Field_tInterger),
};
int i = -1;
parms[++i].Value = pid;
parms[++i].Value = belongto;
using (iSqlDataReader dar = HELPER.executeReader(iConn, iCommandType.Text, SQL, parms))
{
if (dar.Read())
{
i = -1;
info = new CommentInfo();
info.Viewcounter = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i);
info.Rating = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i);
}
dar.Close();
}
iConn.Close();
}
return info;
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:thienchi,项目名称:my-bfinance,代码行数:39,代码来源:CDAL.cs
示例9: Checkdupphone
public bool Checkdupphone(int belongto, int pid, string phone)
{
try
{
bool vlreturn = false;
using (iSqlConnection iConn = HELPER.getConnect(HELPER.SQL_SYSTEM))
{
string SQL = "SELECT A.id FROM " + TABLENAME + " AS A WHERE A.id<>0"
+ " AND [email protected] AND [email protected] AND [email protected]_PHONE";
iSqlParameter[] parms = new iSqlParameter[]{
new iSqlParameter(PARM_BELONGTO, iSqlType.Field_tInterger),
new iSqlParameter(PARM_IID, iSqlType.Field_tInterger),
new iSqlParameter(PARM_SENDER_PHONE, iSqlType.Field_tString),
};
int i = -1;
parms[++i].Value = belongto;
parms[++i].Value = pid;
parms[++i].Value = phone;
using (iSqlDataReader dar = HELPER.executeReader(iConn, iCommandType.Text, SQL, parms))
{
if (dar.Read())
{
vlreturn = true;
}
}
iConn.Close();
}
return vlreturn;
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:thienchi,项目名称:my-bfinance,代码行数:35,代码来源:CDAL.cs
示例10: Getinfolastest
public MeCreditcardHistoryInfo Getinfolastest(int memberid)
{
if (memberid == 0) return null;
try
{
MeCreditcardHistoryInfo info = null;
using (iSqlConnection iConn = HELPER.getConnect(HELPER.SQL_SYSTEM))
{
string SQL = SQL_GETIFOPAGING.Replace(Queryparam.Varstring.VAR_SORTEXPRESSION, CFunctions.Expression_GetSort("id", "DESC"));
SQL += " AND [email protected]";
SQL = "SELECT TOP 1 * FROM(" + SQL + ") AS T WHERE id<>0";
iSqlParameter[] parms = new iSqlParameter[]{
new iSqlParameter(PARM_MEMBERID, iSqlType.Field_tInterger),
};
int i = -1;
parms[++i].Value = memberid;
using (iSqlDataReader dar = HELPER.executeReader(iConn, iCommandType.Text, SQL, parms))
{
if (dar.Read())
{
info = this.getDataReader(dar);
}
dar.Close();
}
iConn.Close();
}
return info;
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:thienchi,项目名称:my-bfinance,代码行数:33,代码来源:CDAL.cs
示例11: GetinfofullCheckout
public List<CartInfo> GetinfofullCheckout(int memberid, ListOptions options)
{
if (memberid == 0) return null;
try
{
List<CartInfo> arr = null;
using (iSqlConnection iConn = HELPER.getConnect(HELPER.SQL_SYSTEM))
{
string SQL = SQL_GETIFOPAGING.Replace(Queryparam.Varstring.VAR_SORTEXPRESSION, CFunctions.Expression_GetSort(options.SortExp, options.SortDir));
SQL += " AND [email protected]";
SQL += " AND A.status<>" + (int)CConstants.State.Status.Waitactive;
SQL += " AND A.status<>" + (int)CConstants.State.Status.Disabled;
SQL += " AND A.checkout=1";
iSqlParameter[] parms = new iSqlParameter[]{
new iSqlParameter(PARM_MEMBERID, iSqlType.Field_tInterger),
};
int i = -1;
parms[++i].Value = memberid;
using (iSqlDataReader dar = HELPER.executeReader(iConn, iCommandType.Text, SQL, parms))
{
while (dar.Read())
{
CartInfo info = this.getDataReader(dar);
info.lCartitem = (new CCartitem(LANG)).Getlistfull(info.Id);
if (arr == null)
arr = new List<CartInfo>();
arr.Add(info);
}
}
iConn.Close();
}
return arr;
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:thienchi,项目名称:my-bfinance,代码行数:39,代码来源:CDAL.cs
示例12: Login
public MemberInfo Login(MemberInfo info)
{
try
{
MemberInfo _info = null;
using (iSqlConnection iConn = HELPER.getConnect(HELPER.SQL_SYSTEM))
{
string SQL = SQL_GETIFO;
SQL += " AND A.status<>" + (int)CConstants.State.Status.Waitactive;
SQL += " AND A.status<>" + (int)CConstants.State.Status.Disabled;
SQL += " AND ([email protected]) AND ([email protected])";
iSqlParameter[] parms = new iSqlParameter[]{
new iSqlParameter(PARM_USERNAME, iSqlType.Field_tString),
new iSqlParameter(PARM_PASSWORD, iSqlType.Field_tString)
};
parms[0].Value = info.Username;
parms[1].Value = info.Password;
using (iSqlDataReader dar = HELPER.executeReader(iConn, iCommandType.Text, SQL, parms))
{
if (dar.Read())
{
_info = this.getDataReader(dar);
}
}
iConn.Close();
}
return _info;
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:thienchi,项目名称:my-bfinance,代码行数:34,代码来源:CDAL.cs
示例13: GetinfofullNotcheckout
public CartInfo GetinfofullNotcheckout(int memberid)
{
if (memberid == 0) return null;
try
{
CartInfo info = null;
using (iSqlConnection iConn = HELPER.getConnect(HELPER.SQL_SYSTEM))
{
string SQL = SQL_GETIFO + " AND [email protected]";
SQL += " AND A.status<>" + (int)CConstants.State.Status.Waitactive;
SQL += " AND A.status<>" + (int)CConstants.State.Status.Disabled;
SQL += " AND A.checkout=0";
iSqlParameter[] parms = new iSqlParameter[]{
new iSqlParameter(PARM_MEMBERID, iSqlType.Field_tInterger),
};
int i = -1;
parms[++i].Value = memberid;
using (iSqlDataReader dar = HELPER.executeReader(iConn, iCommandType.Text, SQL, parms))
{
if (dar.Read())
{
info = this.getDataReader(dar);
info.lCartitem = (new CCartitem(LANG)).Getlistfull(info.Id);
}
}
iConn.Close();
}
return info;
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:thienchi,项目名称:my-bfinance,代码行数:35,代码来源:CDAL.cs
注:本文中的com.harmony.SqlHelper.SqlParameterDef类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论