/// <summary> /// /// </summary> /// <param name="sqlexpression"></param> private void execNoQuery(Expression sqlexpression) { #region Expresser expresser = new Expresser(); this.Commandor.CommandText = expresser.CreateGeneralSelectSQL(sqlexpression); sqlexpression.ReturnValue = this.Commandor.ExecuteNonQuery(); #endregion }
/// <summary> /// /// </summary> /// <param name="sqlexpression"></param> private void fillDsWithoutPage(Expression sqlexpression) { #region Expresser expresser = new Expresser(); string tablename = expresser.GetViewTablename(sqlexpression); this.Selector.SelectCommand.CommandText = expresser.CreateSelectSQLWithoutPage(sqlexpression); this.Selector.Fill(sqlexpression.ReturnDS, tablename); #endregion }
/// <summary> /// /// </summary> /// <param name="sqlexpression"></param> private void saveDs(Expression sqlexpression) { #region Expresser expresser = new Expresser(); this.Selector.SelectCommand.CommandText = sqlexpression.SqlBusiness; this.Selector.InsertCommand = this.commandBuilder.GetInsertCommand(); this.Selector.UpdateCommand = this.commandBuilder.GetUpdateCommand(); this.Selector.DeleteCommand = this.commandBuilder.GetDeleteCommand(); this.Selector.Update(sqlexpression.WillSaveDs, sqlexpression.WillSaveDs.Tables[0].TableName); #endregion }
/// <summary> /// /// </summary> /// <param name="willSaveDs"></param> /// <param name="tablename"></param> /// <param name="primaryKeyName"></param> public override void AddAction(DataSet willSaveDs) { #region Expresser expresser = new Expresser(); Expression sql = this.createSqlAction(); sql.SqlBusiness = expresser.CreateBuilderSelect(willSaveDs); sql.WillSaveDs = willSaveDs; sql.EnumReturn = EnumDBReturnAccess.SaveDS; this._executor.Actions.Add(sql); #endregion }
/// <summary> /// /// </summary> /// <param name="sqlexpression"></param> private void fillDsByStoredProcedure(Expression sqlexpression) { #region Expresser expresser = new Expresser(); string tablename = expresser.GetViewTablename(sqlexpression); SqlCommand cmd = (SqlCommand)this.Selector.SelectCommand; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "SupesoftPage"; cmd.Parameters.Add("@TableName", SqlDbType.NVarChar, 2000).Value = expresser.CreateSelectSQL(sqlexpression); cmd.Parameters.Add("@ReturnFields", SqlDbType.NVarChar, 500).Value = sqlexpression.SqlConditions.ReturnFields; cmd.Parameters.Add("@PageSize", SqlDbType.NVarChar, 500).Value = sqlexpression.SqlConditions.PageSize; cmd.Parameters.Add("@PageIndex", SqlDbType.NVarChar, 500).Value = sqlexpression.SqlConditions.PageIndex; cmd.Parameters.Add("@Where", SqlDbType.NVarChar, 500).Value = ""; cmd.Parameters.Add("@Orderfld", SqlDbType.NVarChar, 500).Value = "uploadtime"; cmd.Parameters.Add("@OrderType", SqlDbType.NVarChar, 500).Value = 1; this.Selector.Fill(sqlexpression.ReturnDS, tablename); #endregion }