本文整理汇总了C#中IDatabaseProvider.QueryExecute方法的典型用法代码示例。如果您正苦于以下问题:C# IDatabaseProvider.QueryExecute方法的具体用法?C# IDatabaseProvider.QueryExecute怎么用?C# IDatabaseProvider.QueryExecute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDatabaseProvider
的用法示例。
在下文中一共展示了IDatabaseProvider.QueryExecute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LinkInsert
public int LinkInsert(IDatabaseProvider Provider)
{
Hashtable Params = new Hashtable();
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_LINK_KEY, this._key);
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_LINK_ID, this._id.ToString().ToUpper());
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_LINK_NAME, this._name);
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_LINK_ATTR_KEY, this._attributeKey);
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_LINK_LINKED_ATTR_KEY, this._linkedAttributeKey);
var SQL = "INSERT INTO " + CDBConst.CONST_TABLE_RDS_LINKS;
SQL += " (" + CDBConst.CONST_TABLE_FIELD_RDS_LINK_KEY;
SQL += ", " + CDBConst.CONST_TABLE_FIELD_RDS_LINK_ID;
SQL += ", " + CDBConst.CONST_TABLE_FIELD_RDS_LINK_NAME;
SQL += ", " + CDBConst.CONST_TABLE_FIELD_RDS_LINK_ATTR_KEY;
SQL += ", " + CDBConst.CONST_TABLE_FIELD_RDS_LINK_LINKED_ATTR_KEY + ")";
SQL += " VALUES ";
SQL += " (@p" + CDBConst.CONST_TABLE_FIELD_RDS_LINK_KEY;
SQL += ", @p" + CDBConst.CONST_TABLE_FIELD_RDS_LINK_ID;
SQL += ", @p" + CDBConst.CONST_TABLE_FIELD_RDS_LINK_NAME;
SQL += ", @p" + CDBConst.CONST_TABLE_FIELD_RDS_LINK_ATTR_KEY;
SQL += ", @p" + CDBConst.CONST_TABLE_FIELD_RDS_LINK_LINKED_ATTR_KEY + ")";
var T = Provider.QueryExecute(SQL, false, Params);
return (T ? -1 : -2);
}
示例2: LinkDelete
public int LinkDelete(IDatabaseProvider Provider)
{
Hashtable Params = new Hashtable();
Params.Add(CDBConst.CONST_TABLE_FIELD_OBJ_KEY, this._sourceObjectKey);
Params.Add(CDBConst.CONST_TABLE_FIELD_LINK_OBJ_KEY, this._linkedObjectKey);
string SQL = "DELETE FROM " + CDBConst.CONST_TABLE_OBJECTS_LINKS + " WHERE ";
SQL += CDBConst.CONST_TABLE_FIELD_OBJ_KEY + " = @p" + CDBConst.CONST_TABLE_FIELD_OBJ_KEY + " AND ";
SQL += CDBConst.CONST_TABLE_FIELD_LINK_OBJ_KEY + " = @p" + CDBConst.CONST_TABLE_FIELD_LINK_OBJ_KEY;
var R = Provider.QueryExecute(SQL, false, Params);
return (R ? CErrors.ERR_SUC : CErrors.ERR_DB_DELETE_OBJECT);
}
示例3: RecordDelete
public int RecordDelete(IDatabaseProvider Provider)
{
Hashtable Params = new Hashtable();
Params.Add(CDBConst.CONST_TABLE_FIELD_METAOBJSEC_USER_KEY, this.UserKey);
Params.Add(CDBConst.CONST_TABLE_FIELD_METAOBJSEC_METAOBJECT_KEY, this.MetaobjectKey);
var SQL = "DELETE FROM "+ CDBConst.CONST_TABLE_METAOBJECT_SECURITY;
SQL += " WHERE " + CDBConst.CONST_TABLE_FIELD_METAOBJSEC_USER_KEY + "= @p" + CDBConst.CONST_TABLE_FIELD_METAOBJSEC_USER_KEY;
SQL += " AND " + CDBConst.CONST_TABLE_FIELD_METAOBJSEC_METAOBJECT_KEY + "= @p" + CDBConst.CONST_TABLE_FIELD_METAOBJSEC_METAOBJECT_KEY;
var T = Provider.QueryExecute(SQL, false, Params);
return (T ? CErrors.ERR_SUC : CErrors.ERR_DB_DELETE_OBJECT);
}
示例4: LanguageInsert
public int LanguageInsert(IDatabaseProvider Provider)
{
Hashtable Params = new Hashtable();
Params.Add(CDBConst.CONST_TABLE_FIELD_LANGUAGES_CODE, this._languageCode);
Params.Add(CDBConst.CONST_TABLE_FIELD_LANGUAGES_NAME, this._languageName);
var SQL = "INSERT INTO " + CDBConst.CONST_TABLE_LANGUAGES;
SQL += "(" + CDBConst.CONST_TABLE_FIELD_LANGUAGES_CODE + ", " + CDBConst.CONST_TABLE_FIELD_LANGUAGES_NAME + ")";
SQL += " VALUES ";
SQL += "(@p" + CDBConst.CONST_TABLE_FIELD_LANGUAGES_CODE + ", @p" + CDBConst.CONST_TABLE_FIELD_LANGUAGES_NAME + ")";
var T = Provider.QueryExecute(SQL, false, Params);
return (T ? CErrors.ERR_SUC : CErrors.ERR_DB_INSERT_OBJECT);
}
示例5: AmountInsert
public int AmountInsert(IDatabaseProvider Provider)
{
Hashtable Params = new Hashtable();
Params.Add(CDBConst.CONST_TABLE_FIELD_ORDERS_AMOUNTS_ORDER_KEY, this._orderKey);
Params.Add(CDBConst.CONST_TABLE_FIELD_ORDERS_AMOUNTS_AMOUNT_KEY, this._amountKey);
Params.Add(CDBConst.CONST_TABLE_FIELD_ORDERS_AMOUNTS_AMOUNT, this._amount);
var SQL = "INSERT INTO " + CDBConst.CONST_TABLE_ORDERS_AMOUNTS;
SQL += "(" + CDBConst.CONST_TABLE_FIELD_ORDERS_AMOUNTS_ORDER_KEY + ", " + CDBConst.CONST_TABLE_FIELD_ORDERS_AMOUNTS_AMOUNT_KEY + ", " + CDBConst.CONST_TABLE_FIELD_ORDERS_AMOUNTS_AMOUNT + ")";
SQL += " VALUES ";
SQL += "(@p" + CDBConst.CONST_TABLE_FIELD_ORDERS_AMOUNTS_ORDER_KEY + ", @p" + CDBConst.CONST_TABLE_FIELD_ORDERS_AMOUNTS_AMOUNT_KEY + ", @p" + CDBConst.CONST_TABLE_FIELD_ORDERS_AMOUNTS_AMOUNT + ")";
var T = Provider.QueryExecute(SQL, false, Params);
return (T ? CErrors.ERR_SUC : CErrors.ERR_DB_INSERT_OBJECT);
}
示例6: LanguageUpdate
public int LanguageUpdate(IDatabaseProvider Provider)
{
var ExistingLanguge = CMetaobjectLanguage.sGetLanguage(this._languageCode, Provider);
if (ExistingLanguge != null)
{
this.LanguageInsert(Provider);
return -1;
}
Hashtable Params = new Hashtable();
Params.Add(CDBConst.CONST_TABLE_FIELD_LANGUAGES_CODE, this._languageCode);
Params.Add(CDBConst.CONST_TABLE_FIELD_LANGUAGES_NAME, this._languageName);
var SQL = "UPDATE " + CDBConst.CONST_TABLE_LANGUAGES;
SQL += "SET ";
SQL += CDBConst.CONST_TABLE_FIELD_LANGUAGES_NAME + " = @p" + CDBConst.CONST_TABLE_FIELD_LANGUAGES_NAME;
SQL += " WHERE ";
SQL += CDBConst.CONST_TABLE_FIELD_LANGUAGES_CODE + " = @p" + CDBConst.CONST_TABLE_FIELD_LANGUAGES_CODE;
var T = Provider.QueryExecute(SQL, false, Params);
return (T ? CErrors.ERR_SUC : CErrors.ERR_DB_UPDATE_OBJECT);
}
示例7: AttributeUpdateByID
public int AttributeUpdateByID(IDatabaseProvider Provider)
{
var Exists = this.AttributeExists(Provider);
if (!Exists)
return this.AttributeInsert(Provider);
Hashtable Params = new Hashtable();
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_ATTR_DICT_KEY, this._dictionaryKey);
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_ATTR_IS_HIDDEN, (this._isHidden ? 1 : 0));
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_ATTR_NAME, this._name);
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_ATTR_TYPE, this._type);
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_ATTR_ID, this._id.ToString().ToUpper());
var SQL = "UPDATE " + CDBConst.CONST_TABLE_RDS_ATTRIBUTES + " SET ";
SQL += CDBConst.CONST_TABLE_FIELD_RDS_ATTR_DICT_KEY + " = @p" + CDBConst.CONST_TABLE_FIELD_RDS_ATTR_DICT_KEY + ", ";
SQL += CDBConst.CONST_TABLE_FIELD_RDS_ATTR_IS_HIDDEN + " = @p" + CDBConst.CONST_TABLE_FIELD_RDS_ATTR_IS_HIDDEN + ", ";
SQL += CDBConst.CONST_TABLE_FIELD_RDS_ATTR_NAME + " = @p" + CDBConst.CONST_TABLE_FIELD_RDS_ATTR_NAME + ", ";
SQL += CDBConst.CONST_TABLE_FIELD_RDS_ATTR_TYPE + " = @p" + CDBConst.CONST_TABLE_FIELD_RDS_ATTR_TYPE + " ";
SQL += " WHERE " + CDBConst.CONST_TABLE_FIELD_RDS_ATTR_ID + " = @p" + CDBConst.CONST_TABLE_FIELD_RDS_ATTR_ID;
var R = Provider.QueryExecute(SQL, false, Params);
return (R ? -1 : -2);
}
示例8: AttributeDeleteByID
public int AttributeDeleteByID(IDatabaseProvider Provider)
{
Hashtable Params = new Hashtable();
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_ATTR_ID, this._id.ToString().ToUpper());
var SQL = "DELETE FROM " + CDBConst.CONST_TABLE_RDS_ATTRIBUTES + " WHERE " + CDBConst.CONST_TABLE_FIELD_RDS_ATTR_ID + " = @p" + CDBConst.CONST_TABLE_FIELD_RDS_ATTR_ID;
var R = Provider.QueryExecute(SQL, false, Params);
if (!R)
return -3;
var RR = CRdsAttributeLink.sDeleteLinksByAttribute(this._key, Provider);
if (RR != -1)
return RR;
RR = CRdsAttributeValue.sAttributeValuesDeleteByAttribute(this._key, Provider);
if (RR != -1)
return RR;
RR = CRdsAttributeLink.sDeleteLinksByLinkedAttribute(this._key, Provider);
return RR;
}
示例9: sDeleteSessionsByUser
public static int sDeleteSessionsByUser(decimal UserKey, IDatabaseProvider Provider)
{
Hashtable Params = new Hashtable();
Params.Add(CDBConst.CONST_TABLE_FIELD_SESSION_USER, UserKey);
var SQL = "DELETE FROM " + CDBConst.CONST_TABLE_SESSION;
SQL += " WHERE " + CDBConst.CONST_TABLE_FIELD_SESSION_USER + " = @p" + CDBConst.CONST_TABLE_FIELD_SESSION_USER;
var T = Provider.QueryExecute(SQL, false, Params);
return (T ? CErrors.ERR_SUC : CErrors.ERR_DB_DELETE_OBJECT);
}
示例10: ElementDelete
public int ElementDelete(IDatabaseProvider Provider)
{
Hashtable Params = new Hashtable();
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_ELEM_KEY, this._key);
var SQL = "DELETE FROM " + CDBConst.CONST_TABLE_RDS_ELEM + " WHERE " + CDBConst.CONST_TABLE_FIELD_RDS_ELEM_KEY + " = @p" + CDBConst.CONST_TABLE_FIELD_RDS_ELEM_KEY;
var R = Provider.QueryExecute(SQL, false, Params);
var RR = CRdsElement.sElementsChildrenDelete(this._key, this._dictionaryKey, Provider);
if (RR != -1)
return RR;
RR = this._values.AttributeValuesDelete(Provider);
if (RR != -1)
return RR;
return (R ? -1 : -2);
}
示例11: ElementInsert
public int ElementInsert(IDatabaseProvider Provider)
{
this._key = CDatabaseSequence.sGetRdsKey(Provider);
this._version = CDatabaseSequence.sGetVersionKey(Provider);
Hashtable Params = new Hashtable();
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_ELEM_DICT_KEY, this._dictionaryKey);
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_ELEM_KEY, this._key);
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_ELEM_VERSION, this._version);
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_ELEM_PARENT, this._parent);
var SQL = "INSERT INTO " + CDBConst.CONST_TABLE_RDS_ELEM + " (";
SQL += CDBConst.CONST_TABLE_FIELD_RDS_ELEM_DICT_KEY + ", " + CDBConst.CONST_TABLE_FIELD_RDS_ELEM_KEY + ", ";
SQL += CDBConst.CONST_TABLE_FIELD_RDS_ELEM_VERSION + ", " + CDBConst.CONST_TABLE_FIELD_RDS_ELEM_PARENT + ")";
SQL += " VALUES (";
SQL += "@p" + CDBConst.CONST_TABLE_FIELD_RDS_ELEM_DICT_KEY + ", @p" + CDBConst.CONST_TABLE_FIELD_RDS_ELEM_KEY + ", ";
SQL += "@p" + CDBConst.CONST_TABLE_FIELD_RDS_ELEM_VERSION + ", @p" + CDBConst.CONST_TABLE_FIELD_RDS_ELEM_PARENT + ")";
var R = Provider.QueryExecute(SQL, false, Params);
if (R)
{
this.Version = this.Version;
this._values.AttributeValuesInsert(Provider);
}
return (R ? -1 : -2);
}
示例12: ValueInsert
public int ValueInsert(IDatabaseProvider Provider)
{
Hashtable Params = new Hashtable();
var SQL = "";
var Keys = new int[this._values.Keys.Count];
this._values.Keys.CopyTo(Keys, 0);
foreach (int Key in Keys)
{
var Stream = this._values[Key].SerializeBinaryStream();
var Data = Stream.ToDataByteArray();
var ExistingValue = CMetaobjectAttributeValue.sGetValue(this._objectKey, this._attributeID, Key, Provider);
if (ExistingValue != null)
{
Params.Clear();
Params.Add(CDBConst.CONST_TABLE_FIELD_OBJ_KEY, this._objectKey);
Params.Add(CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_ID, this._attributeID);
Params.Add(CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_LOCALE, Key);
Params.Add(CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_VALUE, Data);
SQL = "UPDATE " + CDBConst.CONST_TABLE_OBJECTS_ATTR + " SET ";
SQL += CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_VALUE + " = @p" + CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_VALUE;
SQL += " WHERE " + CDBConst.CONST_TABLE_FIELD_OBJ_KEY + " = @p" + CDBConst.CONST_TABLE_FIELD_OBJ_KEY;
SQL += " AND " + CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_ID + " = @p" + CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_ID;
SQL += " AND " + CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_LOCALE + " = @p" + CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_LOCALE;
var R = Provider.QueryExecute(SQL, false, Params);
if (!R)
return CErrors.ERR_DB_INSERT_OBJECT;
continue;
}
Params.Clear();
Params.Add(CDBConst.CONST_TABLE_FIELD_OBJ_KEY, this._objectKey);
Params.Add(CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_ID, this._attributeID);
Params.Add(CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_LOCALE, Key);
Params.Add(CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_VALUE, Data);
SQL = "INSERT INTO " + CDBConst.CONST_TABLE_OBJECTS_ATTR + " (";
SQL += CDBConst.CONST_TABLE_FIELD_OBJ_KEY + ", " + CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_ID + ", ";
SQL += CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_LOCALE + ", " + CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_VALUE;
SQL += ") VALUES (";
SQL += "@p" + CDBConst.CONST_TABLE_FIELD_OBJ_KEY + ", @p" + CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_ID + ", @p";
SQL += CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_LOCALE + ", @p" + CDBConst.CONST_TABLE_FIELD_OBJ_ATTR_VALUE + ")";
var RR = Provider.QueryExecute(SQL, false, Params);
if (!RR)
return CErrors.ERR_DB_INSERT_OBJECT;
}
return CErrors.ERR_SUC;
}
示例13: LinkUpdateByKey
public int LinkUpdateByKey(IDatabaseProvider Provider)
{
bool Exists = this.LinkExists(Provider);
if (!Exists)
return this.LinkInsert(Provider);
Hashtable Params = new Hashtable();
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_LINK_KEY, this._key);
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_LINK_NAME, this._name);
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_LINK_ATTR_KEY, this._attributeKey);
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_LINK_LINKED_ATTR_KEY, this._linkedAttributeKey);
var SQL = "UPDATE " + CDBConst.CONST_TABLE_RDS_LINKS + " SET ";
SQL += CDBConst.CONST_TABLE_FIELD_RDS_LINK_NAME + " = @p" + CDBConst.CONST_TABLE_FIELD_RDS_LINK_NAME + ", ";
SQL += CDBConst.CONST_TABLE_FIELD_RDS_LINK_ATTR_KEY + " = @p" + CDBConst.CONST_TABLE_FIELD_RDS_LINK_ATTR_KEY + ", ";
SQL += CDBConst.CONST_TABLE_FIELD_RDS_LINK_LINKED_ATTR_KEY + " = @p" + CDBConst.CONST_TABLE_FIELD_RDS_LINK_LINKED_ATTR_KEY + ", ";
SQL += " WHERE ";
SQL += CDBConst.CONST_TABLE_FIELD_RDS_LINK_KEY + " = @p" + CDBConst.CONST_TABLE_FIELD_RDS_LINK_KEY;
var T = Provider.QueryExecute(SQL, false, Params);
return (T ? -1 : -2);
}
示例14: SessionDeleteByID
public int SessionDeleteByID(IDatabaseProvider Provider)
{
Hashtable Params = new Hashtable();
Params.Add(CDBConst.CONST_TABLE_FIELD_SESSION_ID, this._id.ToString().ToUpper());
var SQL = "DELETE FROM " + CDBConst.CONST_TABLE_SESSION;
SQL += " WHERE " + CDBConst.CONST_TABLE_FIELD_SESSION_USER + " = @p" + CDBConst.CONST_TABLE_FIELD_SESSION_USER;
SQL += " AND " + CDBConst.CONST_TABLE_FIELD_SESSION_ID + " = @p" + CDBConst.CONST_TABLE_FIELD_SESSION_ID;
var T = Provider.QueryExecute(SQL, false, Params);
return (T ? CErrors.ERR_SUC : CErrors.ERR_DB_DELETE_OBJECT);
}
示例15: sDeleteLinksByLinkedAttribute
public static int sDeleteLinksByLinkedAttribute(decimal LinkedAttributeKey, IDatabaseProvider Provider)
{
Hashtable Params = new Hashtable();
Params.Add(CDBConst.CONST_TABLE_FIELD_RDS_LINK_LINKED_ATTR_KEY, LinkedAttributeKey);
var SQL = "DELETE FROM " + CDBConst.CONST_TABLE_RDS_LINKS;
SQL += " WHERE ";
SQL += CDBConst.CONST_TABLE_FIELD_RDS_LINK_LINKED_ATTR_KEY + " = @p" + CDBConst.CONST_TABLE_FIELD_RDS_LINK_LINKED_ATTR_KEY;
var T = Provider.QueryExecute(SQL, false, Params);
return (T ? -1 : -2);
}