public int Clear(string tableName = "") { object[] parms = new object[] { "@tableName", tableName }; return(Convert.ToInt32(DbAdapter1.ExcecuteScalar("spResourceListAuto_Clear", true, parms))); }
public virtual bool Update(T businessObject) { string sql = mStoreProcedurePrefix + "AddUpdate"; businessObject.ID = Extensions.AsLong(DbAdapter1.ExcecuteScalar(sql, true, Take(businessObject))); if (businessObject.ID > 0) { return(true); } return(false); }
public virtual int UpdateCustomField(object[] parms, string sql) { switch (ConnectionName) { case "Default": return(Convert.ToInt32(DbAdapter1.ExcecuteScalar(sql, false, parms))); case "Inside": return(Convert.ToInt32(DbAdapter2.ExcecuteScalar(sql, false, parms))); default: return(Convert.ToInt32(DbAdapter1.ExcecuteScalar(sql, false, parms))); } }
public virtual object GetSingleData(List <string> parms, string storeProcedure) { switch (ConnectionName) { case "Default": return(DbAdapter1.ExcecuteScalar(storeProcedure, true, parms.ToArray())); case "Inside": return(DbAdapter2.ExcecuteScalar(storeProcedure, true, parms.ToArray())); default: return(DbAdapter1.ExcecuteScalar(storeProcedure, true, parms.ToArray())); } }
public virtual int Count() { string sql = string.Format(@"SELECT count({0}) FROM {1}", mEntityIDName, TableName); return(DbAdapter1.ExcecuteScalar(sql, false, null).AsInt()); }
public virtual int UpdateByCustomDataSource(object[] parms, string dataSource) { return(Convert.ToInt32(DbAdapter1.ExcecuteScalar(dataSource, true, parms))); }