Exemplo n.º 1
0
 public string getQuery(Guid formGridViewID, Guid productID, Guid userID/*, OrderExpression order , List<SearchExpression> searchExpression*/)
 {
     //
     List<SearchExpression> searchExpression = new List<SearchExpression>();
     OrderExpression order = new OrderExpression();
     //
     Query.Query query = new Query.Query(this);
     //query.ClassificationTreeID = treeNodeID;
     query.Columns = this.GetUserProperties(userID, formGridViewID, FieldPlaceHolder.Grid);
     query.UserFields = this.GetUserFields(userID, formGridViewID, FieldPlaceHolder.Grid);
     query.OrderExpression = order;
     query.SearchExpression = this.ValidateSearchExpression(query.Columns, query.UserFields, searchExpression);
     string sql = query.BuildListQuery(productID);
     return sql;
 }
Exemplo n.º 2
0
 public virtual System.Data.DataSet GetList(Guid formGridViewID, Guid productID, Guid userID, /*OrderExpression order ,*/ List<SearchExpression> searchExpression)
 {
     //
     //List<SearchExpression> searchExpression = new List<SearchExpression>();
     OrderExpression order = new OrderExpression();
     //
     Query.Query query = new Query.Query(this);
     //query.ClassificationTreeID = treeNodeID;
     query.Columns = this.GetUserProperties(userID, formGridViewID, FieldPlaceHolder.Grid);
     query.UserFields = this.GetUserFields(userID, formGridViewID, FieldPlaceHolder.Grid);
     query.OrderExpression = order;
     query.SearchExpression = this.ValidateSearchExpression(query.Columns, query.UserFields, searchExpression);
     string sql = query.BuildListQuery(productID);
     using (CommonDataProvider provider = new CommonDataProvider())
     {
         return provider.ExecuteCommand(sql);
     }
 }