コード例 #1
0
ファイル: UniDataToolbar.cs プロジェクト: nazilaka/Unicorn
        private void FillControls()
        {
            if (CurrentRowIndex == -1)
            {
                ClearForm();
                return;
            }

            var dr = SqlHelper.ExecuteReader(DBDataUtility.GetPagedSelectStatement(TableInfo, SortExpression,
                                                                                   CurrentRowIndex, 1, UserCondition));

            if (!dr.Read())
            {
                dr.Close();
                CurrentKeyValue = null;
                return;
            }
            FillFromReader(dr);
            dr.Close();
        }
コード例 #2
0
ファイル: KendoHelper.cs プロジェクト: nazilaka/Unicorn
 public static string GetSql(this DataSourceRequest request, string fieldsList, string fromClaues, string where, string orderBy)
 {
     return(DBDataUtility.GetPagedSelectStatement(fromClaues, fieldsList, orderBy,
                                                  where, (request.Page - 1) * request.PageSize, request.PageSize));
 }