Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 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));
 }