Search This Blog

2009-05-31

Cool programs for Windows, most of which free ( revised )

Cool programs for Windows, most of which free ( revised )

Browsing


Opera - simply the best browser on the planet


firefox the most extensible browser

Safari - Apple like quality for Windows


Google Chrome - fast , reliable and stable browser from Google




izarc - the best zipper





Process Explorer - shows resources usage per running process on Windows



Google Earth

Picasa - the best free picture viewer , organizer




Mozilla Thunderbird








Foxit Reader - much faster pdf reader



Textpad - the best text editor for Windows



smstoolpack - create CRUD for sql server



GreenShot



Open diff - tool for comparing sql server 2005 databases



Skype - the best client for Internet and Video Telephony



NSIS - the best open source Windows installer maker



And the time plugin



Gears -- edit online documents offline



Free youtube to ipod converter -- get mp4 files easily to your phone



Defragler - Disk Defragment utility



DvdDecrypter - the best DVD free ripper



ArsClip remembers your clibboard stuff - Hint , Ctrl + Shift + Z , 2



colorpic - Color to hex utility



Expresso - a GUI tool for building and verifying Regular Expressions


a flv file player
Python - for cool scripts and programming



STARUML - the best open source UML editor

Infrarecorder - free CD / DVD burner

Paint.Net - freeware image editor



putty


winscp


Multiline Search and Replace utility program


Google Gears - use Gmail offline


HijackThis

tortoise svn - a stable gui and command line to subversion for Windows


slik svn - the command line tools for svn for windows


Perl for Windows

2009-05-29

Understanding “Set based” and “Procedural” approaches in SQL

Nice article by M.M.Al-Farooque Shubho




use Northwind


go

--select column_name from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='Products'
--Declare the Table variable 
DECLARE @Elements TABLE
(
        Number INT IDENTITY(1,1), --Auto incrementing Identity column
        ProductName VARCHAR(300) --The string value
)

--Decalre a variable to remember the position of the current delimiter
DECLARE @CurrentDelimiterPositionVar INT 

--Decalre a variable to remember the number of rows in the table
DECLARE @Count INT

--Populate the TABLE variable using some logic
INSERT INTO @Elements SELECT ProductName FROM dbo.Products

--Initialize the looper variable
SET @CurrentDelimiterPositionVar = 1

--Determine the number of rows in the Table
SELECT @Count=max(Number) from @Elements

--A variable to hold the currently selected value from the table
DECLARE @CurrentValue varchar(300);

--Loop through until all row processing is done
WHILE @CurrentDelimiterPositionVar <= @Count

BEGIN
    --Load current value from the Table
    SELECT @CurrentValue = ProductName FROM @Elements WHERE Number = @CurrentDelimiterPositionVar
    --Process the current value
    print @CurrentValue
    --Increment loop counter
    SET @CurrentDelimiterPositionVar = @CurrentDelimiterPositionVar + 1;
END

how-to reconfigure sql server 2005 / 2008



-- view THE CURRENT CONFIGURATION 
 EXEC SP_CONFIGURE;
-- COPY PASTE THE DESIRED VALUE FOR EXAMPLE
--ENABLE Ole Automation Procedures
 EXECUTE sp_configure 'Ole Automation Procedures', '1' 
 RECONFIGURE WITH OVERRIDE 
 EXEC SP_CONFIGURE 'show advanced option', '1'; 
 --SHOW THE UPDATED CONFIGURATION 
 EXEC SP_CONFIGURE;


-- You will get something like this :
access check cache bucket count 0 16384 0 0
access check cache quota 0 2147483647 0 0
Ad Hoc Distributed Queries 0 1 0 0
affinity I/O mask -2147483648 2147483647 0 0
affinity mask -2147483648 2147483647 0 0
Agent XPs 0 1 1 1
allow updates 0 1 0 0
awe enabled 0 1 0 0
blocked process threshold (s) 0 86400 0 0
c2 audit mode 0 1 0 0
clr enabled 0 1 0 0
cost threshold for parallelism 0 32767 5 5
cross db ownership chaining 0 1 0 0
cursor threshold -1 2147483647 -1 -1
Database Mail XPs 0 1 0 0
default full-text language 0 2147483647 1033 1033
default language 0 9999 0 0
default trace enabled 0 1 1 1
disallow results from triggers 0 1 0 0
filestream access level 0 2 2 2
fill factor (%) 0 100 0 0
ft crawl bandwidth (max) 0 32767 100 100
ft crawl bandwidth (min) 0 32767 0 0
ft notify bandwidth (max) 0 32767 100 100
ft notify bandwidth (min) 0 32767 0 0
index create memory (KB) 704 2147483647 0 0
in-doubt xact resolution 0 2 0 0
lightweight pooling 0 1 0 0
locks 5000 2147483647 0 0
max degree of parallelism 0 64 0 0
max full-text crawl range 0 256 4 4
max server memory (MB) 16 2147483647 2147483647 2147483647
max text repl size (B) -1 2147483647 65536 65536
max worker threads 128 32767 0 0
media retention 0 365 0 0
min memory per query (KB) 512 2147483647 1024 1024
min server memory (MB) 0 2147483647 0 0
nested triggers 0 1 1 1
network packet size (B) 512 32767 4096 4096
Ole Automation Procedures 0 1 1 1
open objects 0 2147483647 0 0
optimize for ad hoc workloads 0 1 0 0
PH timeout (s) 1 3600 60 60
precompute rank 0 1 0 0
priority boost 0 1 0 0
query governor cost limit 0 2147483647 0 0
query wait (s) -1 2147483647 -1 -1
recovery interval (min) 0 32767 0 0
remote access 0 1 1 1
remote admin connections 0 1 1 0
remote login timeout (s) 0 2147483647 20 20
remote proc trans 0 1 0 0
remote query timeout (s) 0 2147483647 600 600
Replication XPs 0 1 0 0
scan for startup procs 0 1 0 0
server trigger recursion 0 1 1 1
set working set size 0 1 0 0
show advanced options 0 1 1 1
SMO and DMO XPs 0 1 1 1
SQL Mail XPs 0 1 0 0
transform noise words 0 1 0 0
two digit year cutoff 1753 9999 2049 2049
user connections 0 32767 0 0
user options 0 32767 0 0
xp_cmdshell 0 1 0 0

2009-05-28

cmd cheat sheet ( revised )

::cmd cheat sheet ( revised )
:: FOLLOW THE SYNTAX TO MAKE COPY PASTE EASIER , USE CAPITAL LETTERS FOR COMMENTS

RUNAS /profile /user:luser0007 " shutdown.exe -r -f -m \\4FID04341"

:: execute command remotely not working
LSrunas /user:luser0007 /password:company007 /domain:%computername% /command:"reboot -r -f -m \\1USD007072" /runpath:"C:\Temp\FOLDER\bin"


psexec -u user0007 -p pass "shutdown.exe -r -f -m \\1US007070 "
psexec -u user0007 -p pass "shutdown.exe -r -f -m \\I88007374"


LSrunas /user:luser0007 /password:company007 /domain:%computername% /command:" updateTRN.bat \\1USD0070071" /runpath:"C:\Temp\Folder\bin"

:: ADDING USER WITH PASS
net user luser0007 company007 /ADD

:: ADDING USER TO THE LOCALGROUP ADMINISTRATORS
net localgroup "Administrators" luser0007 /add

:: ADDING VANTAGE USER IDENTIFIED BY company007 TO THE LOCALGROUP ADMINISTRATORS
net user vantage company007 /add

:: ADDING USER TO THE LOCALGROUP ADMINISTRATORS
net localgroup "Administrators" vantage /add

:: RESTART THE COMPUTER AND FORCE RUNNING APPLICATIONS TO CLOSE WITHOUT
shutdown -r -f -t 00
:: OPENS THE EXPLORER IN THE C:\TEMP FOLDER MAXIMIZED - USE THE /MIN OPTION TO GET

:: THE WINDOWS STARTED MINIMIZED
cmd /c start /max Explorer /e , "C:\Temp"

:: GET A NICE PROMPT
set prompt=$P$S$S$t$_$_$S$S

:: RUN THE REGEDIT AS A SPECIFIC USER
RUNAS /profile /user:luser0007 regedit | sanur /i C:\utils\psts.txt

:: REBOOT AGENT REMOTELY USING THE RUNAS COMMAND - WORKS !!!!
:: START A CMD PROMPT UNDER THE luser0007 user

RUNAS /profile /user:luser0007 cmd.exe | sanur /i C:\utils\psts.txt
RUNAS /profile /user:luser0007 " shutdown.exe -f -r -t 00 -m \\ID88007374"

::WORKS ALSO NEEDS SANUR http://www.commandline.co.uk/sanur_unsupported/index.html
RUNAS /profile /user:luser0007 " shutdown.exe /f /r /t 00 /m \\2SGD00070" | sanur /i C:\utils\psts.txt

runas /u:domain\username program.exe | sanur /i C:\utils\psts.txt
:: GET ALL THE INFORMATION RELATED TO NETWORKING ON A WINDDOWS STATION
ipconfig /all

:: USE OF FOR /F
FOR /F "usebackq delims=\" %i IN (`DIR /AD /B`) DO FIND /I "TEMP"
:: LIST THE RUNNING APPLICATIONS
tasklist /v

:: FIND SOMETHING IN A COMMAND
ipconfig /all | find /i "Ip Address"

:: EXPORT AND PARSE VALUE FROM THE REGISTRY
setlocal
if exist tmp.reg del /q tmp.reg
reg export "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" tmp.reg
for /f "tokens=2 delims==" %%a in ('find /i "username" tmp.reg') do set line=%%a&call :strip
endlocal
goto :EOF
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:strip
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
set usr=%line:"=%
echo/the user is %usr%>>%computername%.txt
del /q tmp.reg
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: ANOTHER WAY OF EXPORTING KEYS FROM THE REGISTRY
regedit /e c:\zzz\reg.reg "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer"

:: COUNT THE NUMBER OF SPECIFIC TYPE OF FILES ARE THEY IN A SPECIFIED DIRECTORY
for /f "tokens=* delims=" %%i in ('dir C:\Temp\Folder4.2\scripts\*.* /b /a-d ^| find /i /c "mdb"') do @echo num of scripts is %%i>>"%cd%\%computername%.txt"

:: LABEL EACH FILE IN A DIRECTORY
for /f "tokens=* delims=" %%i in ('dir /b C:\temp\Folder4.2\scripts\*.mdb') do @echo installed script %%i >>"%cd%\%computername%.txt"

:: START EXPLORER
for /f "tokens=* delims=" %%i in ('type DrillDownAllNames.txt') do (
)
:: CHANGE DRIVE AND DIRECTORY AT THE SAME TIME.
cd /d %ProgramFiles%
:: COMMAND SEPERATOR. EXECUTES TWO (OR MORE) COMMANDS ON ONE LINE.
dir & path
SAME, BUT THE ECHO COMMAND WILL ONLY BE EXECUTED WHEN THE COPY WAS SUCCESFUL.
copy a b && echo
SAME, ONLY IF UNSUCCESFUL.
copy a b || goto error

GOTO THE ERRORLABEL, IF THE PREVIOUS COMMAND EXITTED WITH AN ERRORLEVEL BIGGER THAN ZERO.
)


:: HOW TO IMPORT SILENTLY A REGISTRY FROM A FILE
reg import /s C:\temp\the_name_of_the_file.reg
reg import /s C:\temp\Folder\bin\PcAnyStealth.reg
:: ANOTHERWAYS TROUGH the regedit.exe
cmd /c %SystemRoot%\Regedit.exe /s thePaht\TheFile.reg

:: HOW TO EXPORT VALUES FROM THE REGISTRY INTO A FILE

:: HOW TO BACK UP THE WHOLE REGISTRY THROUGH THE GUI IN WINDOWS XP
http://support.microsoft.com/?kbid=322756


:: DELETING KEYS OR VALUES USING A REG FILE
:: IT IS ALSO POSSIBLE TO DELETE KEYS AND VALUES USING REG FILES. TO DELETE A KEY START BY :: USING THE SAME FORMAT AS THE THE REG FILE ABOVE, BUT PLACE A "-" SYMBOL IN FRONT OF THE :: :: KEY NAME YOU WANT TO DELETE. FOR EXAMPLE TO DELETE THE :: :: [HKEY_LOCAL_MACHINE\SYSTEM\SETUP] KEY THE REG FILE WOULD LOOK LIKE THIS:


REGEDIT4

[-HKEY_LOCAL_MACHINE\SYSTEM\SETUP]


regedit.exe [options] [filename] [regpath]
[filename] Import .reg file into the registry
/s [filename] Silent import, i.e. hide confirmation box when importing files
/e [filename] [regpath] Export the registry to [filename] starting at [regpath]
e.g. regedit /e file.reg HKEY_USERS\.DEFAULT
/L:system Specify the location of the system.dat to use
/R:user Specify the location of the user.dat to use



:: TO EXPORT A KNOW REGISTRY KEY FROM THE REGISTRY
reg export "HKEY_LOCAL_MACHINE\SYSTEM\SETUP" filename.reg


:: IF A FILE OR FOLDER EXISTS (SPELLED WITHOUT THE LETTER S ON THE END). THE PARENTHESES
:: GROUP THE COMMANDS OVER THE LINEBREAK (¶ DENOTES A LINEBREAK).

if errorlevel 1 goto error
if exist "file.log"
echo Log exists
goto end
:: ESCAPE CHARACTER TO USE REDIRECT/PIPE CHARACTERS IS THE CARET (^)
echo a -^> b
:: REDIRECTS OUTPUT (INCLUDING ERROR MESSAGES) TO FILE.LOG
command > file.log 2>&1
:: COMMAND SAME THING (BUT IT APPENDS). IN THIS WAY, YOUR BATCH FILES LOOK CLEANER.
>> file.log 2>&1
PUT MESSAGES IN STDIN.LOG AND ERROR MESSAGES IN STDERR.LOG.
command 1> stdin.log 2> stderr.log

start /wait regedit /s file.reg
:: Will ensure when the batch-file continues, the merge operation has completed.
:: regsvr32 /s file.dll Registers a COM DLL without dialog boxes (no report via %errorlevel% of
:: success/failure). Use /s /u for unregistering. :: QUIT'S THE CURRENT BATCH-FILE
:: (ONLY WORKS UNDER NT4 WHEN COMMAND EXTENTIONS ARE ENABLED, WHICH IS NOT THE DEFAULT).
goto :EOF
THE BATCH FILE'S VERSION OF GOSUB. END THE "SUBROUTINE" WITH GOTO :EOF INSTEAD OF RETURN.
ECHO LOG >> %~N0.LOG IN A BATCH FILE: TRICK TO APPEND A MESSAGE TO A LOG WITH THE SAME NAME AS THE BATCH-FILE, BUT WITH AN OTHER EXTENSION.
call :subroutine
notepad %* In a batch file: replaced by all the arguments in a batch file.

:: UPDATES FOR
http://sysman.Company.com/wsu


C:\winnt\system32\drivers\etc\
147.243.4.137 saeperfp0007


:: SEE THE CURRENT STATUS OF THE ACCOUNTS
net accounts


:: SET THE PASSWORDS TO NEVER EXPIRE ON THE LOCAL COMPUTER
net accounts /maxpwage:unlimited /%computername%
http://server/cvshare/fxwin.ini
:: ADDS LOCAL USER NO PASSWORD NOTHING DO NOT USE
net user luser0007 password /ADD /%computername%

NET USER luser0007 company007 /ADD /expires: never /times: all /%computername%


:: ADDS THE USERS TO THE ADMINISTRATOR GROUP
net localgroup "Administrators" luser0007 /add
net localgroup "Administrators" user0007 /add
net localgroup "Administrators" user /add

RUNAS /profile /user:user0007 REGEDIT
RUNAS /profile /user:luser0007 REGEDIT
RUNAS /profile /user:user REGEDIT
RUNAS /profile /user:WKS_Admin REGEDIT


:: RUN CONSOLE ROOT
RUNAS /profile /user:luser0007 mmc
psexec -u luser0007 -p company007 cmd /c regedit.exe
psexec -u user0007 -p perfor2mance3 cmd /c regedit.exe
psexec -u vantage -p company007 cmd /c regedit.exe

:: FIND AND REPLACE STRING IN TEXT FILE USING GSAR
gsar "-sIMMIDIATERUN:0611" "-rIMMIDIATERUN:0610" -o "C:\Temp\Folder4.2\settings.txt"

:: ACCESS EACH ROW FROM THE FILE
for /f "tokens=* delims=" %%a in ('more/e +0 ^<"%cd%\%computername%.txt"') do :: COMPARING STRINGS @echo off set VAR=before if "%VAR%" == "before" ( echo %var% set VAR=after echo %var% pause if "!VAR!" == "after" @echo If you see this, it worked ) echo %var% pause :: OPEN THE SERVICES FROM THE COMMAND PROMPT %SystemRoot%\system32\services.msc /s :: THE USE OF THE SET COMMAND set agent = something :: WRONG !!!! AVOID SPACES BEFORE = AFTER IT AND AFTER THE RVALUE IT TAKES THOSE ALSO !!!!!! ::ALWAYS USE THE NET USE COMMAND IF YOU WANT TO USE NETWORK RESOURCES FROM CMD net use "\\esdfs0007\dfs\ESGROUPS026\perfect\Maintainence\Documents\deployment\Temporary_Agent_Logs" ::USE REDIRECTING OF ERRORS THIS WAYS copy file1 file2 2>errors.txt
errors.txt

:: CHANGE THE SETTINGS IMMIDIATERUN FROM THE COMMAND LINE
gsar "-sIMMIDIATERUN:0611" "-rIMMIDIATERUN:0610" -o "C:\Temp\Folder4.2\settings.txt"
:: CHANGE THE REBOOOTEVERYCYCLE FROM 1 TO 0
gsar "-sREBOOTEVERYCYCLE:0611" "-rREBOOTEVERYCYCLE:0610" -o "C:\Temp\Folder4.2\settings.txt"
:: CHANGE THE TIMEOUT FROM 30 TO 20
gsar "-sQARUN_TIMEOUT:06130" "-rQARUN_TIMEOUT06120" -o "C:\Temp\Folder4.2\settings.txt"

:: WE DO NOT WANT TO MESS WITH SCRIPTS
IF NOT DEFINED CMDWindow Set CMDWindow=1&Start "GetAndSendInfo" /MIN %0&Goto :EOF
:: PUT THE CODE HERE
exit
:: append a new folder to the path of a
AddPath -s -n -v Path "C:\Program Files\BEA Systems\TUXEDO"

:: DLL LINKING using the regsvr32 command SILENTLY
regsvr32 /s DIV_ExtMESClient.dll

:: runthe registry as a different user


:: using runas command
LSrunas /user:luser0007 /password:company007 /domain:%computername% /command:"REGEDIT" /runpath:"%cd%"
:: normal
RUNAS /profile /user:luser0007 REGEDIT

:: PSEXEC
:: In order to get the psexec working the following commands should succeed
net use \\target\Admin$ /user:Administrator
dir \\target\Admin$
net use \\target\Admin$ /delete
:: (only disconnects, does not delete anything.)

:: reboot fast station with the shutdown utility
C:\Temp\Folder\bin\shutdown.exe -s reboot -f -m "The station will reboot in 3 seconds" -l 3 -c
shutdown -f -r -t 00



::=========================================================
:: using bmail
::=========================================================
:: SETTING TO THE E-MAIL TO WHOM WE ARE GOING TO SEND THE E-MAIL
::=========================================================
set mailadd= ext-yordan.georgiev^@Company.com



::CONTCATENATE ANY ERRORS TO THE END OF THE LOG
echo errors in the logging process are listed bellow: >>"%cd%\%computername%.txt"
for /f "delims=" %%a in ('more/e +0 ^<"%cd%\error_log_%computername%.txt"') do echo/%%a>>"%cd%\%computername%.txt"


:: WE USE THE BMAIL.EXE UTILITY TO SEND OURSELF AN E-MAIL CONTAINING THE TEXT FILE
:: ALTERNATIVE SMTP MIGHT BE esebe107.NOE.Company.com, UNCOMMENT THE NEXT LINE FOR ALTERN
:: cmd /c bmail -s esebe107.NOE.Company.com -m %computername%.txt -t %mailadd% -a %computername% -h
bmail -s smtp.Company.com -m %computername%.txt -t ext-yordan.georgiev@Company.com -a %computername% -h

:: eof using bmail
::=========================================================
::=========================================================
+358 xx YYYYYY @ smsgateway.Company.com
::=========================================================
::HOW TO SEND SMS IN Company WITH BMAL
::=========================================================


::=========================================================
:: edit the hosts file
::=========================================================
echo 147.243.4.137 serverName >> C:\winnt\system32\drivers\etc\hosts
::=========================================================


::=========================================================
::=======================================================
:: START A MINIMIZED BATCH WINDOW
::=======================================================
@echo off
IF NOT DEFINED CVRestart Set CVRestart=1&Start "Minimized" /MIN %0&Goto :EOF

exit
::=======================================================


::=======================================================
:: USAGE OF THE WHERE COMMAND ::WHERE [/R dir] [/Q] [/F] [/T] pattern...
::=======================================================
WHERE /R "\\SERVER\SHAREFOLDER" *stringFoFind*
::=======================================================
::get the mac address of an workstatioin
getMac



RUNAS /profile /user:user0007 "COMPMGMT.MSC " | sanur /i C:\utils\psts.txt
RUNAS /profile /user:luser0007 "regedit " | sanur company007
:: STOP A SERVICE
net stop "PCAnywhere Host Service"

:: STOP AN WINDOWS SERVICE IN MICROSOFTS WAY
sc \\servername stop schedule
:: WITH PSINTERNALS
psservice \\computername -u UserName-p Password stop "PCAnywhere Host Service"
psservice \\1USD007070 -u luser0007 -p Password company007 stop "PCAnywhere Host Service"


::CERTIFICATE MANAGER
certmgr.msc

::command-line that reverses the whole file by lines
perl -e 'print reverse ' file1 file2 file3 ….


:: How do I concatenate files into one file overwriting previous existing one?

copy /b /y *.txt APMDeployment.html

:: If you want separations between the files,
:: try something like this...

@echo off
if .%1==.Loop goto process
> output.fil rem
for %%a in (*.txt) do call %0 Loop %%a
goto end
:process
>>output.fil echo.
>>output.fil echo ----------- File %2 -----------
>>output.fil type %2
:end

net use \\4FIN04806\Temp\tmp "0026plapla" /USER: " yogeorgi@NOE.Company.com"
NET USE W: \\4FIN04806\Temp /Persistent:No


:: COPY FILES RECURSIVELY TO THE CURRENT DIRECTORY
:: USES exec.bat by Fred Stluka
exec /s *pdrs*jpg do xcopy /s /m /f

:: SETTING TITLE AND COLOR AND FOR CMD
cmd.exe /k cd c:\Temp && color fc && title ***** Admin console *****

:: DELETE FILES CONTAINING STRING ON REMOTE COMPUTER
:: uses srp.exe see start remote process
cmd /c srp workstation cmd /c del /q C:\Temp\Folder\Logs\pics\*20060*

:: Fast search the directory for filename

::Windows fast directory search from WinLogo + R
cmd /c "dir C:\temp\Company\Product\THEORY\*toFind* /s /b>list.txt&list.txt "

:: open all textpad files in a directory
for /f "tokens=* delims=" %%i in ('dir /b /s c:\TEMP\Company\*.txt') do cmd /c start /max textpad %%i

:: START NERO START SMART AS THE ROOT USER
RUNAS /profile /user:root "C:\Program Files\Nero\Nero 7\Nero StartSmart\NeroStartSmart.exe"

::how to view the history in cmd
doskey /history

:: FIND A FILE BY PATH - START - RUN - CMD.EXE , D:\ , CD D:\LIBS
for /f "tokens=*" %i in ('dir *Utils*.dll /s /b') do @echo off&echo "%i" >>list.
txt&list.txt

Start - Run - utils (revised)

Control Panel
Windows utility and applications
Disk management
Connection management
Miscellaneous commands

Control Panel



CONTROL MOUSE or MAIN.CPL --- opens mouse properties
CONTROL USERPASSWORDS --- opens User Accounts editor
CONTROL USERPASSWORDS2 or NETPLWIZ --- User account access restrictions
CONTROL PRINTERS --- opens faxes and printers available
CONTROL --- opens the control panel window
CONTROL ADMINTOOLS --- opens the administrative tools
CONTROL KEYBOARD --- opens keyboard properties
CONTROL COLOUR --- opens display properties.Appearance tab
CONTROL FOLDERS --- opens folder options
CONTROL FONTS --- opens font policy management
CONTROL INTERNATIONAL or INTL.CPL --- opens Regional and Language option
APPWIZ.CPL --- opens Add or Remove programs utility tool
OPTIONALFEATURES --- opens Add or Remove Windows component utility
DESK.CPL --- opens display properties. Themes tab
HDWWIZ.CPL --- opens add hardware wizard
IRPROPS.CPL --- infrared utility tool
JOY.CP --- opens game controllers settings
MMSYS.CPL --- opens Sound and Audio device Properties. Volume tab
SYSDM.CPL --- opens System properties
TELEPHON.CPL --- Opens phone and Modem options
TIMEDATE.CPL --- Date and Time properties
WSCUI.CPL --- opens Windows Security Center
ACCESS.CPL --- opens Accessibility Options
WUAUCPL.CPL --- opens Automatic Updates
POWERCFG.CPL --- opens Power Options Properties
AZMAN.MSC --- opens authorisation management utility tool
CERTMGR.MSC --- opens certificate management tool
COMPMGMT.MSC --- opens the Computer management tool
COMEXP.MSC or DCOMCNFG --- opens the Computer Services management tool
DEVMGMT.MSC --- opens Device Manager
EVENTVWR or EVENTVWR.MSC --- opens Event Viewer
FSMGMT.MSC --- opens Shared Folders
NAPCLCFG.MSC --- NAP Client configuration utility tool
SERVICES.MSC --- opens Service manager
TASKSCHD.MSC or CONTROL SCHEDTASKS --- opens Schedule Tasks manager
GPEDIT.MSC --- opens Group Policy utility tool
LUSRMGR.MSC --- opens Local Users and Groups
SECPOL.MSC --- opens local security settings
CIADV.MSC --- opens indexing service
NTMSMGR.MSC --- removable storage manager
NTMSOPRQ.MSC --- removable storage operator requests
WMIMGMT.MSC --- opens (WMI) Window Management Instrumentation
PERFMON or PERFMON.MSC --- opens the Performance monitor
MMC --- opens empty Console
MDSCHED --- opens memory diagnostics tools
DXDIAG --- opens DirectX diagnostics tools
ODBCAD32 --- opens ODBC Data source Administrator
REGEDIT or REGEDT32 --- opens Registry Editor
DRWTSN32 --- opens Dr. Watson
VERIFIER --- opens Driver Verifier Manager
CLICONFG --- opens SQL Server Client Network Utility
UTILMAN --- opens Utility Manager
COLORCPL --- opens color management
CREDWIZ --- back up and recovery tool for user passwords
MOBSYNC --- opens Synchronization center
MSCONFIG --- opens System Configuration Utility
SYSEDIT --- opens System Configuration Editor
SYSKEY --- Windows Account Database Security management


Windows utility and applications



EPLORER --- Opens windows Explorer
IEXPLORER --- Opens Internet explorer
WAB --- opens Contacts
CHARMAP --- opens Character Map
WRITE --- opens WordPad
NOTEPAD --- opens Notepad
CALC --- opens Calculator
CLIPBRD --- opens Clipbook Viewer
WINCHAT --- opens Microsoft Chat Interface
SOUNDRECORDER --- opens sound recording tool
DVDPLAY --- run CD or DVD
WMPLAYER --- opens Windows Media Player
MOVIEMK --- Opens untitled Windows Movie Maker
OSK --- opens on-screen Keyboard
MAGNIFY --- opens Magnifier
WINCAL --- opens Calendar
DIALER --- opens phone Dialer
EUDCEDIT --- opens Private Character Editor
NDVOL --- opens the mixer volume
RSTRUI opens Tool System Restore (For Vista only)
% WINDIR% \ SYSTEM32 \ RESTORE \ rstrui.exe opens Tool System Restore (for XP only).
MSINFO32 --- Opens the System Information
MRT --- launches the utility removal of malware.
Taskmgr --- Opens the Windows Task Manager
CMD --- opens a command prompt
MIGWIZ --- Opens the tool for transferring files and settings from Windows (Vista only)
Migwiz.exe --- Opens the tool for transferring files and settings from Windows (for XP only)
SIDEBAR --- Open the Windows (Vista only)
Sigverif --- Opens the tool for verification of signatures of files
Winver opens the window for your Windows version
FSQUIRT --- Bluetooth Transfer Wizard
IExpress opens the wizard for creating self-extracting archives.
MBLCTR --- opens the mobility center (Windows Vista only)
MSRA --- Opens the Windows Remote Assistance
Mstsc --- opens the tool connection Remote Desktop
MSDT --- opens the diagnostic tools and support Microsoft
WERCON --- opens the reporting tool and solutions to problems (for Vista only)
WINDOWSANYTIMEUPGRADE --- Enables the upgrade of Windows Vista
WINWORD opens Word (if installed)
PRINTBRMUI opens migration wizard printer (Vista only)

Disk management

DISKMGMT.MSC --- opens disk management utility
CLEANMGR --- opens disk drive clean up utility
DFRG.MSC --- opens disk defragmenter
CHKDSK --- complete analysis of disk partition
DISKPART --- disk partitioning tool

Connection management


IPCONFIG --- list the configuration of IP addresses on your PC (for more information type IPCONFIG/? in the CMD menu)
INETCPL.CPL --- opens internet properties
FIREWALL.CPL --- opens windows firewall
NETSETUP.CPL --- opens network setup wizard

Miscellaneous

JAVAWS --- View the cover of JAVA software (if installed)
AC3FILTER.CPL --- Opens the properties AC3 Filter (if installed)
FIREFOX --- Mozilla launches Firefox (if installed)
NETPROJ --- allow or not connecting to a network projector (For Vista only)
LOGOFF --- closes the current session
SHUTDOWN -a -f -t 00 --- shut down Windows
SHUTDOWN -a --- the interrupt Windows shutdown
%WINDIR% or% SYSTEMROOT% opens the Windows installation
%PROGRAMFILES% --- Opens the folder where you installed other programs (Program Files)
%USERPROFILE% --- opens the profile of the user currently logged
%HOMEDRIVE% --- opens the browser on the partition or the operating system is installed
%HOMEPATH% --- opens the currently logged user C --- \ Documents and Settings \ [username]
%TEMP% --- opens the temporary folder
VSP1CLN --- deletes the cache for installation of the service pack 1 for Vista
System File Checker (Requires Windows CD if the cache is not available)
* SFC / scannow --- immediately scans all system files and repairs damaged files
* SFC / VERIFYONLY --- scans only those files system
* SFC / Scanfil = "name and file path" --- scans the specified file, and repaired if damaged
* SFC / VERIFYFILE = "name and file path" --- Scans only the file specified
* SFC / scanonce --- scans the system files on the next restart
* SFC / REVERT --- return the initial configuration (For more information, type SFC /? In the command prompt CMD

::START OFFICE APPLICATIONS FROM COMMAND LINE
EXCEL.EXE
FINDER.EXE
INFOPATH.EXE
MSACCESS.EXE
MSPUB.EXE
OIS.EXE
OUTLOOK.EXE
POWERPNT.EXE
WINWORD.EXE

:: OLDIES ( MIGHT HAVE OVERLAPPINGS WITH THOSE ABOVE )



ACCWIZ.EXE - Accessibility Wizard
CALC.EXE - Calculator
CHARMAP.EXE - Character Map
CLEANMGR.EXE - Disk Space Cleanup Manager
CLICONFG.EXE - SQL Client Configuration Utility
CLIPBRD.EXE - Clipbook Viewer
CLSPACK.EXE - Class Package Export Tool
CMD.EXE - Command Line
CMSTP.EXE - Connection Manager Profile Installer
CONTROL.EXE - Control Panel
DCOMCNFG.EXE - Component Services
DDESHARE.EXE - DDE Share
DRWATSON.EXE - Doctor Watson v1.00b
DRWTSN32.EXE - Doctor Watson Settings
DVDPLAY.EXE - DVD Player
DXDIAG.EXE - DirectX Diagnostics
EUDCEDIT.EXE - Private Character Editor
EVENTVWR.EXE - Event Viewer
EXPLORER.EXE - Windows Explorer
FREECELL.EXE - Free Cell
FXSCLNT.EXE - Fax Console
FXSCOVER.EXE - Fax Cover Page Editor
FXSEND.EXE - MS Fax Send Note Utility
IEXPRESS.EXE - IExpress 2.0
LOGOFF.EXE - System Logoff
MAGNIFY.EXE - Microsoft Magnifier
MMC.EXE - Microsoft Management Console
MOBSYNC.EXE - Microsoft Synchronization Manager
MPLAY32.EXE - Windows Media Player version 5.1
MSTSC.EXE - Remote Desktop Connection 127.0.0.1:3388
Remote Desktop Connection
NARRATOR.EXE - Microsoft Narrator
NETSETUP.EXE - Network Setup Wizard
NOTEPAD.EXE - Notepad
NSLOOKUP.EXE - NSLookup Application
NTSD.EXE - Symbolic Debugger for Windows 2000
ODBCAD32.EXE - ODBC Data Source Administrator
OSK.EXE - On Screen Keyboard
OSUNINST.EXE - Windows Uninstall Utility
PACKAGER.EXE - Object Packager
PERFMON.EXE - Performance Monitor
PROGMAN.EXE - Program Manager
RASPHONE.EXE - Remote Access Phonebook
REGEDIT.EXE - Registry Editor
REGEDT32.EXE - Registry Editor
RESET.EXE - Resets Session
RSTRUI.EXE - System Restore
RTCSHARE.EXE - RTC Application Sharing
SFC.EXE - System File Checker
SHRPUBW.EXE - Create Shared Folder
SHUTDOWN.EXE - System Shutdown
SIGVERIF.EXE - File Signature Verification
SNDREC32.EXE - Sound Recorder
SNDVOL32.EXE - Sound Volume
DIALER.EXE - Phone Dialer
HELPCTR.EXE - Help and Support

Control Panel Tools

ACCESS.CPL - Accessibility Options
APPWIZ.CPL - Add or Remove Programs
DESK.CPL - Display Properties
HDWWIZ.CPL - Add Hardware Wizard
INETCPL.CPL - Internet Explorer Properties
INTL.CPL - Regional and Language Options
JOY.CPL - Game Controllers
MAIN.CPL - Mouse Properties
MMSYS.CPL - Sounds and Audio Device Properties
NCPA.CPL - Network Connections
NUSRMGR.CPL - User Accounts
ODBCCP32.CPL - ODBC Data Source Administrator

POWERCFG.CPL - Power Options Properties
SYSDM.CPL - System Properties
TELEPHON.CPL - Phone and Modem Options
TIMEDATE.CPL - Date and Time Properties

Microsoft Management Console (MMC Snap-ins)
:: - Certificates
CERTMGR.MSC
CIADV.MSC - Indexing Service
:: COMPUTER MANAGEMENT
COMPMGMT.MSC
:: - DEVICE MANAGER
DEVMGMT.MSC
:: DISK DEFRAGMENTER
DFRG.MSC -
:: - Disk Management
DISKMGMT.MSC
:: Event Viewer
EVENTVWR.MSC

FSMGMT.MSC - Shared Folders
:: Local Users and Groups
LUSRMGR.MSC
:: REMOVABLE STORAGE
NTMSMGR.MSC
:: REMOVABLE STORAGE OPERATOR REQUESTS
NTMSOPRQ.MSC
:: PERFORMANCE MONITOR
PERFMON.MSC
:: SERVICES
SERVICES.MSC
:: WINDOWS MANAGEMENT INFRASTRUCTURE
WMIMGMT.MSC

:: CONVENTIONAL USER ACCOUNT INTERFACE
CONTROL USERPASSWORDS2 -
:: KEYBOARD PROPERTIES
control keyboard

Windows command line tools ( revised )

Windows command line tools ( revised )

This post contains links for nice command line tools for Windows , most of which are free and open source :

  • regjump

  • download regjump



    Hint: Create a directory such as D:\temp\utils and add it to your path
    Now this folder could be easily copied to an USB drive and used on many PC's you are working with ... + allmost any PC is allowed to have C:\temp folder and you could just copy the folder there ...

    Development libraries ( most of which open source)

    SOURCES:
    Nant - .Net building tool
    Log4net - a logging platform

    Subsonic - ORM , DAL





    Here a short example how-to add some libraries to your path :
    Start - Run - cmd.exe
    mkdir D:\temp\utils\

    xcopy D:\libs\build\nant-0.85\bin D:\temp\utils

    How-to search for specific dll to reference it from VS:
    Start - Run - cmd.exe
    D:\
    cd D:\libs\
    for /f "tokens=*" %i in ('dir *Utils*.dll /s /b') do @echo off&echo "%i" >>list.
    txt&list.txt

    2009-05-27

    How-to start a new web project for subsonic - beginner tutorial

    SOURCES:
    Download Subsonic

    Unpack it somewhere. Open the project . Build it.
    Search for the subsonic.dll

    @echo off&for /f "tokens=*" %i in ('dir SubSonic.dll /s /b') do echo %i >>list.t
    xt&list.txt

    In my machine is something like this:
    d:\libs\ORM\SubSonic_2.1_Final_Source\src\SubSonicCentral\Bin\SubSonic.dll

    Copy this path ( You will need it for pointing the references in the web project ...

    Start VS - Start - Run - type "devenv" - Enter

    File - new - Project - Web project

    Be sure to have the following Web.config structure ( just browse it and copy paste the needd the following lines to your web.config :



    <?xml version="1.0"?>
    <configuration>
    
    
        <configSections>
          <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic"></section>
    <!-- Your stuff here -->
        </configSections>  
    
    
        <appSettings/>
    
    
      <SubSonicService defaultProvider="Northwind">
        <providers>
          <clear/>
          <add name="Northwind" 
               type="SubSonic.SqlDataProvider, SubSonic" 
               connectionStringName="Northwind" 
               generatedNamespace="Northwind"/>
        </providers>
      </SubSonicService>
    
      <connectionStrings>
        <add name="Northwind" connectionString="Data Source=.;Database=Northwind;Integrated Security=true;"/>
      </connectionStrings>  
        
    
        <system.web>
    
            <compilation debug="true">
    
              <buildProviders>
                <add extension=".abp" type="SubSonic.BuildProvider, SubSonic"/>
               
              </buildProviders>
              
              
              <assemblies>
    <!-- your stuff here -->
              </assemblies>
    
            </compilation>
            <authentication mode="Windows" />
     
    
          <pages>
            <controls>
    
    <!-- your stuff here -->        
    </controls>
          </pages>
    
          <httpHandlers>
             <!-- your stuff here -->
          </httpHandlers>
          <httpModules>
              <!-- your modules here -->
          </httpModules>
    
    
        </system.web>
    
        <system.codedom>
          <compilers>
               <!-- compilers stuff -->
          </compilers>
        </system.codedom>
        
     
        <system.webServer>
          <validation validateIntegratedModeConfiguration="false"/>
          <modules>
            <!-- your modules --> 
         </modules>
          <handlers>
            <!-- your handlers here --> 
         </handlers>
        </system.webServer>
    
        <runtime>
             <!-- runtime stuff here -->
        </runtime>
    
    
    </configuration>
    


    Rename the Default page of the project to QuerryWhere ( You would have to rename the inherits="_Default" and the class _Default also in the code behind...

    Now paste the following code in the code behind of the QuerryWhere page :




    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Reflection;
    using SubSonic;
    using System.Data;
    
    public partial class QuerryWhere : System.Web.UI.Page
    {
    
        private void CreateDynamicControls()
        {
    
    
            panGvHolder.Controls.Clear();
    
            Query qry = Northwind.Product.CreateQuery();
            qry.Columns.AddRange(Northwind.Product.Schema.Columns);
            qry.WHERE("UnitPrice > 15").AND("UnitsInStock < 20 ");
            //WHERE("UnitPrice > 15").AND("UnitsInStock < 30 ");
    
    
            
            using (IDataReader rdr = qry.ExecuteReader())
            {
                Response.Write("<table>");
                while (rdr.Read())
                {
                    Response.Write("<tr>");
                    for (int i = 0; i < rdr.FieldCount; i++)
                    {
                        Response.Write("<td>");
                        Response.Write(rdr[i].ToString() + " ");
                        Response.Write("<td>");
                    } //eof for 
                    Response.Write("</br>");
                    Response.Write("</tr>");
                }
                Response.Write("<table>");
            }
        } //eof method
    
    
        #region TemplateMethods
        protected override void OnInit(EventArgs e)
        {
        } //eof OnInit
    
    
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
            CreateDynamicControls();
        } //protected override void CreateChildControls ( )
    
    
        protected void Page_Load(object sender, EventArgs e)
        {
    
    
        }
    
    
        protected override object SaveViewState()
        {
            return new Pair(base.SaveViewState(), null);
        }
    
        protected override void LoadViewState(object savedState)
        {
            base.LoadViewState(((Pair)savedState).First);
            EnsureChildControls();
        } //LoadViewState
    
    
    
    
    
    
    
        #endregion //TemplateMethods
    
    
        #region DisplayMethods
    
    
        #endregion //DisplayMethods
    
    
        #region ClickEventHandlers
    
        #endregion ClickEventHandlers
    
    
    
        #region Properties
        //set here page properties to use with the viewstate
        #endregion //Properties
    } //eof class 
    

    Subsonic - how-to generate select where queries



    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Reflection;
    using SubSonic;
    using System.Data;
    
    public partial class QuerryWhere : System.Web.UI.Page
    {
    
        private void CreateDynamicControls()
        {
    
    
            panGvHolder.Controls.Clear();
    
            Query qry = Northwind.Product.CreateQuery();
            qry.Columns.AddRange(Northwind.Product.Schema.Columns);
            qry.WHERE("UnitPrice > 15").AND("UnitsInStock < 20 ");
            //WHERE("UnitPrice > 15").AND("UnitsInStock < 30 ");
    
    
            
            using (IDataReader rdr = qry.ExecuteReader())
            {
                Response.Write("<table>");
                while (rdr.Read())
                {
                    Response.Write("<tr>");
                    for (int i = 0; i < rdr.FieldCount; i++)
                    {
                        Response.Write("<td>");
                        Response.Write(rdr[i].ToString() + " ");
                        Response.Write("<td>");
                    } //eof for 
                    Response.Write("</br>");
                    Response.Write("</tr>");
                }
                Response.Write("<table>");
            }
        } //eof method
    
    
        #region TemplateMethods
        protected override void OnInit(EventArgs e)
        {
        } //eof OnInit
    
    
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
            CreateDynamicControls();
        } //protected override void CreateChildControls ( )
    
    
        protected void Page_Load(object sender, EventArgs e)
        {
    
    
        }
    
    
        protected override object SaveViewState()
        {
            return new Pair(base.SaveViewState(), null);
        }
    
        protected override void LoadViewState(object savedState)
        {
            base.LoadViewState(((Pair)savedState).First);
            EnsureChildControls();
        } //LoadViewState
    
    
    
    
    
    
    
        #endregion //TemplateMethods
    
    
        #region DisplayMethods
    
    
        #endregion //DisplayMethods
    
    
        #region ClickEventHandlers
    
        #endregion ClickEventHandlers
    
    
    
        #region Properties
        //set here page properties to use with the viewstate
        #endregion //Properties
    } //eof class 
    

    2009-05-26

    How-to get the current date and the next date in any cultures with C# ?


                        string strGuiDate = "14.03.2008";
                        CultureInfo guiCulture = new CultureInfo("fi-FI");
                        guiCulture.DateTimeFormat.DateSeparator = ".";
                        DateTime datetime = DateTime.Parse(strGuiDate, guiCulture);
                        CultureInfo dbCulture = new CultureInfo("en-US");
                        dbCulture.DateTimeFormat.DateSeparator = "-";
    
                        string strDbTime = datetime.ToString("yyyy-MM-dd");
                        logger.Debug("strDbTime is " + strDbTime);
    
                        DateTime datetime1 = datetime.AddDays(1.0);
                        string strDbTime1 = datetime1.ToString("yyyy-MM-dd");
                        logger.Debug("strDbTime1 is " + strDbTime1);

    2009-05-24

    Start - Run - utils


    Control Panel

    Windows utility and applications

    Disk management

    Connection management

    Miscellaneous commands

    Control Panel


    CONTROL: opens the control panel window

    CONTROL ADMINTOOLS: opens the administrative tools

    CONTROL KEYBOARD: opens keyboard properties

    CONTROL COLOUR: opens display properties.Appearance tab

    CONTROL FOLDERS: opens folder options

    CONTROL FONTS: opens font policy management

    CONTROL INTERNATIONAL or INTL.CPL: opens Regional and Language option

    CONTROL MOUSE or MAIN.CPL: opens mouse properties

    CONTROL USERPASSWORDS: opens User Accounts editor

    CONTROL USERPASSWORDS2 or NETPLWIZ: User account access restrictions

    CONTROL PRINTERS: opens faxes and printers available





    APPWIZ.CPL: opens Add or Remove programs utility tool

    OPTIONALFEATURES: opens Add or Remove Windows component utility

    DESK.CPL: opens display properties. Themes tab

    HDWWIZ.CPL: opens add hardware wizard

    IRPROPS.CPL: infrared utility tool

    JOY.CP: opens game controllers settings

    MMSYS.CPL: opens Sound and Audio device Properties. Volume tab

    SYSDM.CPL: opens System properties

    TELEPHON.CPL: Opens phone and Modem options

    TIMEDATE.CPL: Date and Time properties

    WSCUI.CPL: opens Windows Security Center

    ACCESS.CPL: opens Accessibility Options

    WUAUCPL.CPL: opens Automatic Updates

    POWERCFG.CPL: opens Power Options Properties



    AZMAN.MSC: opens authorisation management utility tool

    CERTMGR.MSC: opens certificate management tool

    COMPMGMT.MSC: opens the Computer management tool

    COMEXP.MSC or DCOMCNFG: opens the Computer Services management tool

    DEVMGMT.MSC: opens Device Manager

    EVENTVWR or EVENTVWR.MSC: opens Event Viewer

    FSMGMT.MSC: opens Shared Folders

    NAPCLCFG.MSC: NAP Client configuration utility tool

    SERVICES.MSC: opens Service manager

    TASKSCHD.MSC or CONTROL SCHEDTASKS: opens Schedule Tasks manager

    GPEDIT.MSC: opens Group Policy utility tool

    LUSRMGR.MSC: opens Local Users and Groups

    SECPOL.MSC: opens local security settings

    CIADV.MSC: opens indexing service

    NTMSMGR.MSC: removable storage manager

    NTMSOPRQ.MSC: removable storage operator requests

    WMIMGMT.MSC: opens (WMI) Window Management Instrumentation

    PERFMON or PERFMON.MSC: opens the Performance monitor

    MMC: opens empty Console



    MDSCHED: opens memory diagnostics tools

    DXDIAG: opens DirectX diagnostics tools

    ODBCAD32: opens ODBC Data source Administrator

    REGEDIT or REGEDT32: opens Registry Editor

    DRWTSN32: opens Dr. Watson

    VERIFIER: opens Driver Verifier Manager

    CLICONFG: opens SQL Server Client Network Utility

    UTILMAN: opens Utility Manager

    COLORCPL: opens color management

    CREDWIZ: back up and recovery tool for user passwords

    MOBSYNC: opens Synchronization center



    MSCONFIG: opens System Configuration Utility

    SYSEDIT: opens System Configuration Editor

    SYSKEY: Windows Account Database Security management

    Windows utility and applications


    EPLORER: Opens windows Explorer

    IEXPLORER: Opens Internet explorer

    WAB: opens Contacts

    CHARMAP: opens Character Map

    WRITE: opens WordPad

    NOTEPAD: opens Notepad

    CALC: opens Calculator

    CLIPBRD: opens Clipbook Viewer

    WINCHAT: opens Microsoft Chat Interface

    SOUNDRECORDER: opens sound recording tool

    DVDPLAY: run CD or DVD



    WMPLAYER: opens Windows Media Player

    MOVIEMK: Opens untitled Windows Movie Maker

    OSK: opens on-screen Keyboard

    MAGNIFY: opens Magnifier

    WINCAL: opens Calendar

    DIALER: opens phone Dialer

    EUDCEDIT: opens Private Character Editor





    NDVOL: opens the mixer volume

    RSTRUI opens Tool System Restore (For Vista only)

    % WINDIR% \ SYSTEM32 \ RESTORE \ rstrui.exe opens Tool System Restore (for XP only). Tutorial HERE

    MSINFO32: Opens the System Information

    MRT : launches the utility removal of malware. Tutorial HERE

    Taskmgr : Opens the Windows Task Manager

    CMD: opens a command prompt

    MIGWIZ: Opens the tool for transferring files and settings from Windows (Vista only)

    Migwiz.exe: Opens the tool for transferring files and settings from Windows (for XP only)

    SIDEBAR: Open the Windows (Vista only)

    Sigverif : Opens the tool for verification of signatures of files

    Winver opens the window for your Windows version

    FSQUIRT: Bluetooth Transfer Wizard

    IExpress opens the wizard for creating self-extracting archives. Tutorial HERE

    MBLCTR: opens the mobility center (Windows Vista only)

    MSRA : Opens the Windows Remote Assistance

    Mstsc : opens the tool connection Remote Desktop

    MSDT: opens the diagnostic tools and support Microsoft

    WERCON: opens the reporting tool and solutions to problems (for Vista only)

    WINDOWSANYTIMEUPGRADE: Enables the upgrade of Windows Vista

    WINWORD opens Word (if installed)

    PRINTBRMUI opens migration wizard printer (Vista only)

    Disk management


    DISKMGMT.MSC: opens disk management utility

    CLEANMGR: opens disk drive clean up utility

    DFRG.MSC: opens disk defragmenter

    CHKDSK: complete analysis of disk partition

    DISKPART: disk partitioning tool

    Connection management


    IPCONFIG: list the configuration of IP addresses on your PC (for more information type IPCONFIG/? in the CMD menu)

    INETCPL.CPL: opens internet properties

    FIREWALL.CPL: opens windows firewall

    NETSETUP.CPL: opens network setup wizard

    Miscellaneous commands


    JAVAWS: View the cover of JAVA software (if installed)

    AC3FILTER.CPL: Opens the properties AC3 Filter (if installed)

    FIREFOX: Mozilla launches Firefox (if installed)

    NETPROJ: allow or not connecting to a network projector (For Vista only)

    LOGOFF: closes the current session

    SHUTDOWN: shut down Windows

    SHUTDOWN-A: the interrupt Windows shutdown

    % WINDIR% or% SYSTEMROOT% opens the Windows installation

    % PROGRAMFILES%: Opens the folder where you installed other programs (Program Files)

    % USERPROFILE%: opens the profile of the user currently logged

    %HOMEDRIVE%: opens the browser on the partition or the operating system is installed

    % HOMEPATH%: opens the currently logged user C: \ Documents and Settings \ [username]

    % TEMP%: opens the temporary folder

    VSP1CLN: deletes the cache for installation of the service pack 1 for Vista



    System File Checker (Requires Windows CD if the cache is not available): (Tutorial here)



    * SFC / scannow: immediately scans all system files and repairs damaged files

    * SFC / VERIFYONLY: scans only those files system

    * SFC / Scanfil = "name and file path": scans the specified file, and repaired if damaged

    * SFC / VERIFYFILE = "name and file path": Scans only the file specified

    * SFC / scanonce: scans the system files on the next restart

    * SFC / REVERT: return the initial configuration (For more information, type SFC /? In the command prompt CMD.

    A new article on the CodeProject about the XGrid

    here

    Amazing how-many comments I got about the fact that the article did not have a snapshot about a simple html table rendering control with sorting and paging !!!

    Well .. there will be one in 2 hours ; ) after a finnish reinstalling all the crap ...

    Cool programs for Windows, most of which free ( revised )

    Cool programs for Windows, most of which free ( revised )
    izarc - the best zipper


    Opera - simply the best browser on the planet


    firefox the most extensible browser



    Process Explorer - shows resources usage per running process on Windows



    Google Earth

    Picasa - the best free picture viewer , organizer

    Google Chrome - fast , reliable and stable browser from Google



    Mozilla Thunderbird




    Safari - Apple like quality for Windows




    Foxit Reader - much faster pdf reader



    Textpad - the best text editor for Windows



    smstoolpack - create CRUD for sql server



    GreenShot



    Open diff - tool for comparing sql server 2005 databases



    Skype - the best client for Internet and Video Telephony



    NSIS - the best open source Windows installer maker



    And the time plugin



    Gears -- edit online documents offline



    Free youtube to ipod converter -- get mp4 files easily to your phone



    Defragler - Disk Defragment utility



    DvdDecrypter - the best DVD free ripper



    ArsClip remembers your clibboard stuff - Hint , Ctrl + Shift + Z , 2



    colorpic - Color to hex utility



    Expresso - a GUI tool for building and verifying Regular Expressions


    a flv file player
    Python - for cool scripts and programming



    STARUML - the best open source UML editor

    Infrarecorder - free CD / DVD burner

    Paint.Net - freeware image editor



    putty


    winscp


    Multiline Search and Replace utility program


    Google Gears - use Gmail offline


    HijackThis

    tortoise svn - a stable gui and command line to subversion for Windows


    slik svn - the command line tools for svn for windows

    2009-05-22

    XGrid revised


    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Text;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Data;
    using System.Collections;
    using System.Collections.Specialized;
    using System.Web.UI.HtmlControls;
    
    
    namespace Gui.Controls
    {
    
    
      [DefaultProperty ( "Text" )]
      [ToolboxData ( "<{0}:XGrid runat=server></{0}:XGrid>" )]
      public class XGrid : GridView
      {
    
    
        #region Constructor
        /// <summary>
        /// Initialises an <see cref="XGrid"/>.
        /// </summary>
        public XGrid ()
        {
        }
        #endregion
    
    
        #region Properties
    
    
    
        #region HasCustomFormatting
        /// <summary>
        /// Whether the results summary should be shown.
        /// </summary>
        [DefaultValue ( true )]
        [Category ( "Appearance" )]
        [Description ( "Whether this gridview would need custom formatting per column ." )]
        public bool HasCustomFormatting
        {
          get
          {
    
            if (HttpContext.Current.Session["global." + this.ID + ".HasCustomFormatting"] == null)
              return false;
            else
              return (bool)HttpContext.Current.Session["global." + this.ID + ".HasCustomFormatting"];
          }
          set { HttpContext.Current.Session["global." + this.ID + ".HasCustomFormatting"] = value; }
        }
        #endregion
    
    
    
    
    
        #region Ld
        private ListDictionary ld;
        [Description ( "Contains the extended properties values from the stored procedures " )]
        public ListDictionary Ld
        {
          get
          {
            return ld;
          }
          set
          {
            this.ld = value;
          }
        }
        #endregion Ld
    
    
        #region MaxCharColapse
        /// <summary>
        /// Whether the results summary should be shown.
        /// </summary>
        [DefaultValue ( 50 )]
        [Category ( "Appearance" )]
        [Description ( "At which character the column of the gridview should colapse" )]
        public int MaxCharColapse
        {
          get
          {
            if (HttpContext.Current.Session["global." + this.ID + "MaxCharColapse"] == null)
              return 50;
            else
              return (int)HttpContext.Current.Session["global." + this.ID + "MaxCharColapse"];
          }
          set { HttpContext.Current.Session["global." + this.ID + "MaxCharColapse"] = value; }
        }
        #endregion MaxCharColapse
    
    
        private int GvPageSize
        {
          get
          {
            if (HttpContext.Current.Session["global." + this.ID + ".GvPageSize"] == null)
            {
              //Utils.Debugger.WriteIf ( "GvPageSize is null " );
              return 20;
            }            //this is the default size of the page
            else
            {
              //Utils.Debugger.WriteIf ( "GvPageSize is  " + System.Convert.ToString ( HttpContext.Current.Session ["global." + this.ID + ".GvPageSize" ] ) );
              return System.Convert.ToInt32 ( HttpContext.Current.Session["global." + this.ID + ".GvPageSize"] );
            }
          } //eof get
          set
          {
            try
            {                //accept only whole numbers , if not whole number set default 7
    
              int pageSizeToSet = value;
              HttpContext.Current.Session["global." + this.ID + ".GvPageSize"] = pageSizeToSet;
              System.Convert.ToInt64 ( pageSizeToSet );
              if (pageSizeToSet >= this.DataSourceCount || pageSizeToSet < 0)
              {
                HttpContext.Current.Session["global." + this.ID + ".GvPageSize"] = this.DataSourceCount;
                //Utils.Debugger.WriteIf ( "The DataSourceCount is " + System.Convert.ToString ( this.DataSourceCount ) );
                this.MyPageIndex = 0;
                //variant Unable to cast object of type 'System.Web.UI.WebControls.TableRow' to type 'System.Web.UI.WebControls.GridViewRow
                //this.AllowPaging = false; 
              } //eof to return all if 
              else
              {
                HttpContext.Current.Session["global." + this.ID + ".GvPageSize"] = value;
              } //eof if the desired page size is smaller than the number 
    
            } //eof try 
            catch (System.FormatException sfe)
            {
              HttpContext.Current.Session["global." + this.ID + ".GvPageSize"] = 13; //fatal number of exceptions 
            } //eof catch
    
          } //eof set
    
        } //eof property GvPageSize
    
    
        private string GetSortDirection ()
        {
          switch (GridViewSortDirection)
          {
            case "ASC":
              GridViewSortDirection = "DESC";
              break;
    
            case "DESC":
              GridViewSortDirection = "ASC";
              break;
          }
    
          return GridViewSortDirection;
        }
    
        #region GridViewSortDirection
        private string GridViewSortDirection
        {
          get { return HttpContext.Current.Session["global." + this.ID + "SortDirection"] as string ?? "ASC"; }
          set { HttpContext.Current.Session["global." + this.ID + "SortDirection"] = value; }
        }
        #endregion GridViewSortDirection
    
    
        //private GenApp.Bo.User userObj;
        //public GenApp.Bo.User UserObj { get { return this.userObj; } set { this.userObj = value; } }
    
    
        #region GridViewSortExpression
        private string GridViewSortExpression
        {
          get { return HttpContext.Current.Session["global." + this.ID + "SortExpression"] as string ?? string.Empty; }
          set { HttpContext.Current.Session["global." + this.ID + "SortExpression"] = value; }
        }
        #endregion //GridViewSortExpression
    
    
        #region MyPageIndex
        public int MyPageIndex
        {
          get
          {
            //     //Utils.Debugger.WriteIf ( "The page index of gb with id " + Convert.ToString ( 
            //        HttpContext.Current.Session ["global." + this.ID ]) + " is " + 
            //Convert.ToString ( 
            //        HttpContext.Current.Session ["global." + this.ID + "MyPageIndex"] ))  ;
            return System.Convert.ToInt16 (
            HttpContext.Current.Session["global." + this.ID + "MyPageIndex"] );
    
          } //eof get
    
          set
          {
            this.PageIndex = value;
            HttpContext.Current.Session["global." + this.ID + "MyPageIndex"] = value;
          }
        } //eof property MyPageIndex
    
    
        #endregion //GridViewSortExpression
    
    
        #region StrLabMsgText
        private string _StrLabMsgText;
        public string StrLabMsgText
        {
          get
          {
            //     //Utils.Debugger.WriteIf ( "The page index of gb with id " + Convert.ToString ( 
            //        HttpContext.Current.Session ["global." + this.ID ]) + " is " + 
            //Convert.ToString ( 
            //        HttpContext.Current.Session ["global." + this.ID + "StrLabMsgText"] ))  ;
            return System.Convert.ToString (
            HttpContext.Current.Session["global." + this.ID + "StrLabMsgText"] );
    
          } //eof get
    
          set
          {
            _StrLabMsgText = value;
            HttpContext.Current.Session["global." + this.ID + "StrLabMsgText"] = value;
          }
        } //eof property StrLabMsgText
    
    
        #endregion
    
    
        #region DataSourceCount
        private int _dataSourceCount;
    
        /// <summary>
        /// The total number of rows in the data source.
        /// </summary>
        [Browsable ( false )]
        public int DataSourceCount
        {
          get
          {
            if (this.Rows.Count == 0)
              return 0;
            else if (this.AllowPaging)
              return this._dataSourceCount;
            else
              return this.Rows.Count;
          }
          set
          {
            this._dataSourceCount = value;
          } //eof set 
    
        }
        #endregion
    
    
        #region ColumnNumberToGenerateLinksTo
        private int _ColumnNumberToGenerateLinksTo;
    
        /// <summary>
        /// The total number of rows in the data source.
        /// </summary>
        [Browsable ( false )]
        public int ColumnNumberToGenerateLinksTo
        {
          get
          {
            if (_ColumnNumberToGenerateLinksTo == null)
              return 0;
            else
              return _ColumnNumberToGenerateLinksTo;
          }
          set
          {
            this._ColumnNumberToGenerateLinksTo = value;
          } //eof set 
    
        }
        #endregion
    
        #region UrlToLinkTo
        private string _UrlToLinkTo;
        /// <summary>
        /// Whether the results summary should be shown.
        /// </summary>
        [DefaultValue ( true )]
        [Category ( "Appearance" )]
        [Description ( " Which is the link to link to." )]
        public string UrlToLinkTo
        {
          get
          {
            if (HttpContext.Current.Session["global." + this.ID + ".UrlToLinkTo"] == null)
              return String.Empty;
            else
              return (string)HttpContext.Current.Session["global." + this.ID + ".UrlToLinkTo"];
          }
          set { HttpContext.Current.Session["global." + this.ID + ".UrlToLinkTo"] = value; }
        }
        #endregion
    
        //#region ColNameToLinkAgainst
        //private string _ColNameToLinkAgainst;
        ///// <summary>
        ///// Whether the results summary should be shown.
        ///// </summary>
        //[DefaultValue ( true )]
        //[Category ( "Appearance" )]
        //[Description ( " Which is the Column Name to link Against." )]
        //public string ColNameToLinkAgainst
        //{
        //  get
        //  {
        //    if (HttpContext.Current.Session["global." + this.ID + ".ColNameToLinkAgainst"] == null)
        //      return String.Empty;
        //    else
        //      return (string)HttpContext.Current.Session["global." + this.ID + ".ColNameToLinkAgainst"];
        //  }
        //  set { HttpContext.Current.Session["global." + this.ID + ".ColNameToLinkAgainst"] = value; }
        //}
        //#endregion
    
        #region ShowResultSummary
        /// <summary>
        /// Whether the results summary should be shown.
        /// </summary>
        [DefaultValue ( true )]
        [Category ( "Appearance" )]
        [Description ( "Whether the results summary should be shown." )]
        public bool ShowResultSummary
        {
          get
          {
    
            if (HttpContext.Current.Session["global." + this.ID + ".ShowResultSummary"] == null)
              return false;
            else
              return (bool)HttpContext.Current.Session["global." + this.ID + ".ShowResultSummary"];
          }
          set { HttpContext.Current.Session["global." + this.ID + ".ShowResultSummary"] = value; }
        }
        #endregion
    
    
        #region AllowInserting
        /// <summary>
        /// Whether the GridView will allow rows to be inserted.
        /// </summary>
        [DefaultValue ( false )]
        [Category ( "Behavior" )]
        [Description ( "Whether the GridView will allow rows to be inserted." )]
        public bool AllowInserting
        {
          get
          {
            if (HttpContext.Current.Session["AllowInserting"] == null)
              return false;
            else
              return (bool)HttpContext.Current.Session["AllowInserting"];
          }
          set
          {
            if (this.AllowInserting != value)
              this.RequiresDataBinding = true;
    
            HttpContext.Current.Session["AllowInserting"] = value;
          }
        }
        #endregion
    
    
        #region InsertRowActive
        /// <summary>
        /// Whether the insert row is active.
        /// </summary>
        [DefaultValue ( true )]
        [Category ( "Appearance" )]
        [Description ( "Whether the insert row is active." )]
        public bool InsertRowActive
        {
          get
          {
            if (HttpContext.Current.Session["InsertRowActive"] == null)
              return true;
            return (bool)HttpContext.Current.Session["InsertRowActive"];
          }
          set
          {
            if (this.InsertRowActive != value)
              this.RequiresDataBinding = true;
    
            HttpContext.Current.Session["InsertRowActive"] = value;
          }
        }
        #endregion
    
    
        #region InsertRow
        private GridViewRow _insertRow;
    
        /// <summary>
        /// The row in the grid that contains the insert controls.
        /// </summary>
        [Browsable ( false )]
        public GridViewRow InsertRow
        {
          get { return this._insertRow; }
        }
        #endregion
    
    
        #region HeaderRow
        private GridViewRow _myHeaderRow;
    
        /// <summary>
        /// Gets the row in the grid that corresponds to the header.
        /// </summary>
        [Browsable ( false )]
        public override GridViewRow HeaderRow
        {
          get
          {
            if (this._myHeaderRow != null)
              return this._myHeaderRow;
            else
              return base.HeaderRow;
          }
        }
        #endregion
    
    
        #region MyDataSource
        private DataTable _MyDataSource;
        public DataTable MyDataSource
        {
          get
          {
            return (DataTable)( HttpContext.Current.Session["global." + this.ID + "MyDataSource"] );
    
          } //eof get
    
          set
          {
            this._MyDataSource = value;
            HttpContext.Current.Session["global." + this.ID + "MyDataSource"] = value;
          }
        } //eof property MyDataSource
    
    
    
        #endregion MyDataSource
    
        #region AscendingImageUrl
        /// <summary>
        /// Image that is displayed when <see cref="SortDirection"/> is ascending.
        /// </summary>
        //[Editor ( typeof ( ImageUrlEditor ), typeof ( UITypeEditor ) )]
        [Description ( "Image that is displayed when SortDirection is ascending." )]
        [Category ( "Appearance" )]
        public string AscendingImageUrl
        {
          get { return HttpContext.Current.Session["AscendingImageUrl"] as string; }
          set { HttpContext.Current.Session["AscendingImageUrl"] = value; }
        }
        #endregion
    
    
        #region DescendingImageUrl
        /// <summary>
        /// Image that is displayed when <see cref="SortDirection"/
        /// is descending.
        /// </summary>
        //[Editor ( typeof ( ImageUrlEditor ), typeof ( UITypeEditor ) )]
        [Description ( "Image that is displayed when SortDirection is descending." )]
        [Category ( "Appearance" )]
        public string DescendingImageUrl
        {
          get { return HttpContext.Current.Session["DescendingImageUrl"] as string; }
          set { HttpContext.Current.Session["DescendingImageUrl"] = value; }
        }
        #endregion
    
    
        #region TextProperty
        [Bindable ( true )]
        [Category ( "Appearance" )]
        [DefaultValue ( "" )]
        [Localizable ( true )]
        public string Text
        {
          get
          {
            String s = (String)HttpContext.Current.Session["Text"];
            return ( ( s == null ) ? "[" + "global." + this.ID + "]" : s );
          }
    
          set
          {
            HttpContext.Current.Session["Text"] = value;
          }
        }
        #endregion Text
    
    
    
        #region FirstRowColor
        [Bindable ( true )]
        [Category ( "Appearance" )]
        [DefaultValue ( "" )]
        [Localizable ( true )]
        public string FirstRowColor
        {
          get
          {
            return (String)HttpContext.Current.Session["FirstRowColor"];
          }
    
          set
          {
            HttpContext.Current.Session["FirsRowColor"] = value;
          }
        }
        #endregion FirsRowColor
    
    
    
        #endregion
    
    
        #region Instance members
    
        #region Events
        /// <summary>
        /// Fires before a row is inserted.
        /// </summary>
        [Category ( "Action" )]
        [Description ( "Fires before a row is inserted." )]
        public event EventHandler<GridViewInsertEventArgs> RowInserting;
    
        /// <summary>
        /// Fires after a row has been inserted.
        /// </summary>
        [Category ( "Action" )]
        [Description ( "Fires after a row has been inserted." )]
        public event EventHandler<GridViewInsertedEventArgs> RowInserted;
    
    
        /// <summary>
        /// Raises the <see cref="RowInserting"/> event.
        /// </summary>
        /// <param name="e">Event data.</param>
        protected virtual void OnRowInserting ( GridViewInsertEventArgs e )
        {
          if (this.RowInserting != null)
            this.RowInserting ( this, e );
          else if (!this.IsBoundUsingDataSourceID && !e.Cancel)
            throw new System.Web.HttpException ( string.Format ( "The GridView '{0}' fired event RowInserting which wasn't handled.", "global." + this.ID ) );
        }
    
        /// <summary>
        /// Raises the <see cref="RowInserted"/> event.
        /// </summary>
        /// <param name="e">Event data.</param>
        protected virtual void OnRowInserted ( GridViewInsertedEventArgs e )
        {
          if (this.RowInserted != null)
            this.RowInserted ( this, e );
        }
    
        protected override void OnSorting ( GridViewSortEventArgs e )
        {
          //Utils.Debugger.WriteIf ( "OnSorting START" );
          GridViewSortExpression = e.SortExpression;
          //int pageIndex = this.PageIndex;
          int pageIndex = this.MyPageIndex;
    
          //    this.DataBind ( ); //databind again after sorting
          //Utils.Debugger.WriteIf ( "From OnSorting" );
          //this.PageSize = this.GvPageSize;
          //this.PageSize = 15; 
          //variant this.PageIndex = pageIndex;
          this.MyPageIndex = pageIndex;
    
    
          //variant this.CreateBottomSummary ( );
          this.DataSource = SortDataTable ( this.DataSource as DataTable, false );
    
          this.DataBind ();
    
          //base.OnSorting ( e );
        }
    
    
    
        protected override void OnDataBinding ( EventArgs e )
        {
          //DEBUG//Utils.Debugger.WriteIf ( "OnDataBionding start " );
          //int newSetPageSize = this.GetPagerSize ( );
          //Utils.Debugger.WriteIf ( "From OnDataBinding" );
          //this.GvPageSize = newSetPageSize;
    
          base.OnDataBinding ( e );
    
        } //eof method OnDataBinding
    
    
        #endregion    //W
        /// <summary>
        /// Create the pager.
        /// </summary>
        /// <param name="row">The pager row.</param>
        /// <param name="columnSpan">The number of columns the pager should span.</param>
        /// <param name="pagedDataSource">The data source.</param>
        protected override void InitializePager ( GridViewRow row, int columnSpan,
          PagedDataSource pagedDataSource )
        {
          //DEBUG//Utils.Debugger.WriteIf ( "Initialize Pager START" );
          // Nab total row count from data source
    
    
    
          #region GenericNumberPager
    
          #region Preparation
          this.DataSourceCount = pagedDataSource.DataSourceCount; ;
          HtmlGenericControl pageControls = new HtmlGenericControl ( "div" );
          pageControls.Style.Add ( "max-width", "100%" );
          pageControls.Style.Add ( HtmlTextWriterStyle.FontSize, "medium" );
    
          // Create table cell for pager
          TableCell cell = new TableCell ();
          cell.ColumnSpan = columnSpan;
          cell.Controls.Clear ();
    
    
          //variant AddSomeFontStyle pageControls.Style.Add ( HtmlTextWriterStyle.FontFamily, "webdings" );
          pageControls.Style.Add ( HtmlTextWriterStyle.FontSize, "medium" );
          pageControls.Style.Add ( "float", "left" );
          #endregion Preparation
    
    
          #region AddTheFirstLink
          LinkButton lnkFirst = new LinkButton ();
          lnkFirst.ID = "lnkFirst";
          lnkFirst.ToolTip = "Click here to open the First page";
          lnkFirst.CausesValidation = false;
          lnkFirst.Text = "First Page";
          lnkFirst.CommandName = "Page";
          lnkFirst.CommandArgument = "first";
          //variant lnkFirst.Enabled = (this.PageIndex != 0);
          lnkFirst.Enabled = ( this.PageIndex != 0 );
          pageControls.Controls.Add ( lnkFirst );
          pageControls.Controls.Add ( new LiteralControl ( "&nbsp;&nbsp; " ) );
          #endregion AddTheFirstLink
    
    
          #region AddThePreviousPageLink
          LinkButton lnkPrevious = new LinkButton ();
          lnkPrevious.ID = "lnkPrevious";
          lnkPrevious.ToolTip = "Click to open the Previous page";
          lnkPrevious.CausesValidation = false;
          lnkPrevious.Text = "Previous Page";
          lnkPrevious.CommandName = "Page";
          lnkPrevious.CommandArgument = "Prev";
          lnkPrevious.Enabled = lnkFirst.Enabled;
          pageControls.Controls.Add ( lnkPrevious );
          pageControls.Controls.Add ( new LiteralControl ( "&nbsp;" ) );
    
          #endregion AddTheNextPageLink
    
    
          #region AddTheNumbersForPaging
    
          int intNumOfPages = System.Convert.ToInt16 ( this.DataSourceCount / this.PageSize );
          int intCurrentPageIndex = this.MyPageIndex;
          int intSizeAdjuster = 0;
          int intPreviousTenPages = 0;
          int intNextTenPages = 0;
          bool flagDoCreatePagerLink = false;
    
    
    
          #region AddThePreviousTenPageLink
          intPreviousTenPages = intCurrentPageIndex - 10;
          if (intPreviousTenPages <= 0)
            intPreviousTenPages = 0;
    
          if (intPreviousTenPages != 0)
          {
            LinkButton lnkPreviousTen = new LinkButton ();
            lnkPreviousTen.ID = "lnkPreviousTen";
            lnkPreviousTen.ToolTip = "Click to open the Previous 10 pages";
            lnkPreviousTen.CausesValidation = false;
            lnkPreviousTen.Text = "-10...";
            lnkPreviousTen.CommandName = "Page";
            lnkPreviousTen.CommandArgument = intPreviousTenPages.ToString ();
            lnkPreviousTen.Enabled = lnkFirst.Enabled;
            pageControls.Controls.Add ( lnkPreviousTen );
            pageControls.Controls.Add ( new LiteralControl ( "&nbsp;" ) );
          }
          #endregion AddThePreviousTenPageLink
    
    
          #region IfThereIsOnlyOneItemItBehavesDifferently
          if (this.PageSize == 1)
            intSizeAdjuster = 0;
          else
            intSizeAdjuster = 1;
          #endregion IfThereIsOnlyOneItemItBehavesDifferently
    
          #region LoopTroughPageNumbers
          for (int i = 0; i < intNumOfPages + intSizeAdjuster; i++)
          {
            #region IfThePagerHasMoreThan2*10Pages
            if (intNumOfPages >= 2 * 10)
            {
              if (intCurrentPageIndex <= 10)
              {
                if (i <= intCurrentPageIndex + 10)
                  flagDoCreatePagerLink = true;
                else
                  flagDoCreatePagerLink = false;
    
                //else do nothing 
    
              } //eof if ( intCurrentPageIndex <= 10)
              else if (intCurrentPageIndex <= intNumOfPages - 10)
              {
                if (i >= intCurrentPageIndex - 10 && i <= intCurrentPageIndex + 10)
                  flagDoCreatePagerLink = true;
                else
                  flagDoCreatePagerLink = false;
    
              }
              else if (intCurrentPageIndex > intNumOfPages - 10)
              {
                if (i <= intCurrentPageIndex && i >= intCurrentPageIndex - 10)
                  flagDoCreatePagerLink = true;
                else if (i > intCurrentPageIndex)
                  flagDoCreatePagerLink = true;
                else
                  flagDoCreatePagerLink = false;
              }
    
              #region AddThePageNumberPagerLink
              if (flagDoCreatePagerLink == true)
              {
    
                LinkButton lbPager = new LinkButton ();
                lbPager.ID = i.ToString ();
    
                lbPager.CommandName = "Page";
                lbPager.CausesValidation = false;
                lbPager.CommandArgument = ( i + 1 ).ToString ();
                lbPager.Text = ( i + 1 ).ToString ();
                //disable the links for the current page
                if (intCurrentPageIndex == i)
                {
                  lbPager.ToolTip = "This is the current active page";
                  lbPager.Enabled = false;
                }
    
                pageControls.Controls.Add ( lbPager );
                pageControls.Controls.Add ( new LiteralControl ( "&nbsp;&nbsp; " ) );
    
              }
              #endregion AddThePageNumberPagerLink
            } //eof if (intNumOfPages > 20)
            #endregion IfThePagerHasMoreThan2*10Pages
    
            else
            {
              #region AddThePageNumberPagerLink
              LinkButton lbPager = new LinkButton ();
              lbPager.ID = i.ToString ();
    
              lbPager.CommandName = "Page";
              lbPager.CausesValidation = false;
              lbPager.CommandArgument = ( i + 1 ).ToString ();
              lbPager.Text = ( i + 1 ).ToString ();
              //disable the links for the current page
              if (intCurrentPageIndex == i)
              {
                lbPager.ToolTip = "This is the current active page";
                lbPager.Enabled = false;
              }
    
              pageControls.Controls.Add ( lbPager );
              pageControls.Controls.Add ( new LiteralControl ( "&nbsp;&nbsp; " ) );
              #endregion AddThePageNumberPagerLink
            } //else if ( intNumOfPages > 10 ) 
    
          } //eof for 
          #endregion LoopTroughPageNumbers
    
          #endregion AddTheNumbersForPaging
    
    
          #region AddTheNextPageLink
          LinkButton lnkNext = new LinkButton ();
          lnkNext.ID = "lnkNext";
          lnkNext.ToolTip = "Next page";
          lnkNext.CausesValidation = false;
          lnkNext.Text = "Next Page";
          lnkNext.CommandName = "Page";
          lnkNext.CommandArgument = "Next";
          //variant lnkNext.Enabled = (this.PageIndex < (this.PageCount - 1));
          lnkNext.Enabled = ( this.PageIndex < ( this.PageCount - 1 ) );
          pageControls.Controls.Add ( lnkNext );
          pageControls.Controls.Add ( new LiteralControl ( "&nbsp;&nbsp; " ) );
          #endregion AddTheNextPageLink
    
          #region AddTheNextTenPagesLink
    
          intNextTenPages = intCurrentPageIndex + 10;
          if (intNextTenPages >= intNumOfPages)
            intNextTenPages = intNumOfPages;
    
          if (intNextTenPages != intNumOfPages)
          {
            LinkButton lnkNextTen = new LinkButton ();
            lnkNextTen.ID = "lnkNextTen";
            lnkNextTen.ToolTip = "Next page";
            lnkNextTen.CausesValidation = false;
            lnkNextTen.Text = "..+10";
            lnkNextTen.CommandName = "Page";
            lnkNextTen.CommandArgument = intNextTenPages.ToString (); ;
            //variant lnkNextTen.Enabled = (this.PageIndex < (this.PageCount - 1));
            lnkNextTen.Enabled = ( this.PageIndex < ( this.PageCount - 1 ) );
            pageControls.Controls.Add ( lnkNextTen );
            pageControls.Controls.Add ( new LiteralControl ( "&nbsp;&nbsp; " ) );
          }
          #endregion AddTheNextPageLink
    
          #region AddTheLastLink
          LinkButton lnkLast = new LinkButton ();
          lnkLast.ID = "lnkLast";
          lnkLast.ToolTip = "Click here to open the Last page";
          lnkLast.CausesValidation = false;
          lnkLast.Text = "Last Page";
          lnkLast.CommandName = "Page";
          lnkLast.CommandArgument = "Last";
          lnkLast.Enabled = ( this.PageIndex < ( this.PageCount - 1 ) );
          pageControls.Controls.Add ( lnkLast );
          pageControls.Controls.Add ( new LiteralControl ( "&nbsp;&nbsp; " ) );
          #endregion AddTheLastLink
    
    
          cell.Controls.Add ( pageControls );
          // Add the cell to pager row
          row.Cells.Add ( cell );
    
    
    
          #region CopyPaste
          //pageControls.Controls.Add ( lnkFirst );
          //pageControls.Controls.Add ( new LiteralControl ( "&nbsp;&nbsp; " ) );
          //LinkButton lnkPrevious = new LinkButton ();
          //lnkPrevious.ID = "lnkPrevious";
          //lnkPrevious.ToolTip = "Previous page";
          //lnkPrevious.CausesValidation = false;
          //lnkPrevious.Text = "<<";
          //lnkPrevious.CommandName = "Page";
          //lnkPrevious.CommandArgument = "Prev";
          //lnkPrevious.Enabled = lnkFirst.Enabled;
          //pageControls.Controls.Add ( lnkPrevious );
          //pageControls.Controls.Add ( new LiteralControl ( "&nbsp;" ) );
          //LinkButton lnkNext = new LinkButton ();
          //lnkNext.ID = "lnkNext";
          //lnkNext.ToolTip = "Next page";
          //lnkNext.CausesValidation = false;
          //lnkNext.Text = ">>";
          //lnkNext.CommandName = "Page";
          //lnkNext.CommandArgument = "Next";
          ////variant lnkNext.Enabled = (this.PageIndex < (this.PageCount - 1));
          //lnkNext.Enabled = ( this.PageIndex < ( this.PageCount - 1 ) );
          //pageControls.Controls.Add ( lnkNext );
          //pageControls.Controls.Add ( new LiteralControl ( "&nbsp;&nbsp; " ) );
          //LinkButton lnkLast = new LinkButton ();
          //lnkLast.ID = "lnkLast";
          //lnkLast.ToolTip = "Last page";
          //lnkLast.CausesValidation = false;
          //lnkLast.Text = "last";
          //lnkLast.CommandName = "Page";
          //lnkLast.CommandArgument = "Last";
          //lnkLast.Enabled = lnkNext.Enabled;
          //pageControls.Controls.Add ( lnkLast );
          #endregion CopyPaste
          // Add pager controls to cell1
    
    
    
          #endregion GenericNumberPager
    
          //variant this.CreateBottomSummary ( );
        }
    
    
        protected override void OnInit ( EventArgs e )
        {
          base.OnInit ( e );
          //Utils.Debugger.WriteIf ( "XGrid.cs OnInit START" );
          //this.GvPageSize = 20;
          this.PageIndex = this.MyPageIndex;
        } //eof method 
    
        protected override void LoadControlState ( object savedState )
        {
          base.LoadControlState ( savedState );
        }
    
        private void CreateBottomSummary ()
        {
          //Utils.Debugger.WriteIf ( "XGrid.cs CreateBottomSummary START" );
          if (this.ShowResultSummary && this.PageCount != 0)
          {
            //Utils.Debugger.WriteIf ( " after if " );
            // Create summary controls
            //variant org 
            //variant int firstResultIndex = this.PageIndex * this.PageSize;
            int firstResultIndex = this.PageIndex * this.PageSize;
    
            //DEBUG//Utils.Debugger.WriteIf ( "From CreateBottomSummary" );
            //variant gets null each 2 time int firstResultIndex = this.PageIndex * this.GvPageSize; 
            HtmlGenericControl topSummaryControl = new HtmlGenericControl ( "div" );
            topSummaryControl.Style.Add ( "float", "left" );
            topSummaryControl.InnerHtml = string.Format ( "Showing records <strong> from </strong>" +
            "{0} <strong> to </strong> {1} out of {2}   ", firstResultIndex + 1,
            firstResultIndex + this.Rows.Count, this.DataSourceCount ); //add + " with " 
            HtmlGenericControl bottomSummaryControl = new HtmlGenericControl ( "div" );
            bottomSummaryControl.Style.Add ( "float", "left" );
            bottomSummaryControl.InnerHtml = topSummaryControl.InnerHtml;
    
    
            #region AddHererTextBox
            ////ADD HERE TEXTBOX START 
            ////====================================Add here the paging textbox START
            //TextBox txtgv = new TextBox ( );
            //txtgv.ID= "global." + this.ID.ToString ( ) + "txtgv";
            //txtgv.Visible = true;
            //txtgv.Width = new Unit ( 20, UnitType.Pixel );
            //txtgv.Font.Size = new FontUnit ( FontSize.XSmall );
            //Utils.Debugger.WriteIf ( "From CreateBottomSummary2" );
            //txtgv.Text = System.Convert.ToString ( this.GvPageSize );
            //txtgv.EnableViewState = true;
            ////ASSIGN EVENT HANDLERS DURING CREATE CHILD CONTROLS 
            ////txtgv.TextChanged += new EventHandler ( this.ClickSetPageSize );
            //Button butPageSetter = new Button ( );
            //butPageSetter.ID = "butPageSetter";
            //butPageSetter.Text = " per page ";
            //butPageSetter.Click += new EventHandler ( this.ClickSetPageSize );
            ////txtgv.TextChanged += new EventHandler ( txtgv_TextChanged );
            //bottomSummaryControl.Controls.Add ( txtgv );
            //bottomSummaryControl.Controls.Add ( butPageSetter );
            ////====================================Add here the paging textbox END
            #endregion //AddHererTextBox
    
    
            if (this.PageCount == 1)
            {
              // Add summary to table at the top
              this.Controls[0].Controls.AddAt ( 0, this.CreateSummaryRow ( topSummaryControl ) );
              // Add summary to table at the bottom
              this.Controls[0].Controls.Add ( this.CreateSummaryRow ( bottomSummaryControl ) );
              //variant bottom this.Controls.Add ( this.CreateSummaryRow ( bottomSummaryControl ) );
            } //eof if
            else
            {
              // Add summary control to top pager
              if (this.TopPagerRow != null)
                this.TopPagerRow.Cells[0].Controls.Add ( topSummaryControl );
              // Add summary control to bottom pager
              if (this.BottomPagerRow != null)
                this.BottomPagerRow.Cells[0].Controls.Add ( bottomSummaryControl );
            } //eof else 
          } //eof if ( this.ShowResultSummary && this.PageCount != 0 )
    
          //variant base.PageSize = this.GvPageSize; 
        }
    
        /// <summary>
        /// Creates the control's child controls.
        /// </summary>
        protected override int CreateChildControls ( IEnumerable dataSource, bool dataBinding )
        {
          int controlsCreated = base.CreateChildControls ( dataSource, dataBinding );
          if (this.DisplayInsertRow)
          {
            ICollection cols = this.CreateColumns ( null, false );
            DataControlField[] fields = new DataControlField[cols.Count];
            cols.CopyTo ( fields, 0 );
            if (this.Controls.Count == 0)
            {
              // Create dummy table for inserting the first entry
              Table tableControl = new Table ();
              if (this.ShowHeader)
              {
                // Create header
                this._myHeaderRow = this.CreateRow ( -1, -1, DataControlRowType.Header, DataControlRowState.Normal );
                this.InitializeRow ( this._myHeaderRow, fields );
                // Trigger events
                GridViewRowEventArgs headerRowArgs = new GridViewRowEventArgs ( this._myHeaderRow );
                this.OnRowCreated ( headerRowArgs );
                tableControl.Rows.Add ( this._myHeaderRow );
                if (dataBinding)
                  this.OnRowDataBound ( headerRowArgs );
              }
              // Add insert row
              this.Controls.Add ( tableControl );
    
    
            }
            else
              // Use generated header row
              this._myHeaderRow = null;
    
            // Create insertion row
            this._insertRow = this.CreateRow ( -1, -1, DataControlRowType.DataRow, this.InsertRowActive ? DataControlRowState.Insert : DataControlRowState.Normal );
            this._insertRow.ControlStyle.MergeWith ( this.AlternatingRowStyle );
            this.InitializeRow ( this._insertRow, fields );
    
            // Trigger events
            GridViewRowEventArgs insertRowArgs = new GridViewRowEventArgs ( this._insertRow );
            this.OnRowCreated ( insertRowArgs );
    
            // Add row to top of table, just below header
            this.Controls[0].Controls.AddAt ( this.Controls[0].Controls.IndexOf ( this.HeaderRow ) + 1, this._insertRow );
            if (dataBinding)
              this.OnRowDataBound ( insertRowArgs );
          }
    
          this.CreateBottomSummary ();
          return controlsCreated;
        } //eof CreateChildControls
    
        /// <summary>
        /// Initialises a row in the grid.
        /// </summary>
        /// <param name="row">The row to initialise.</param>
        /// <param name="fields">The fields with which to initialise the row.</param>
        protected override void InitializeRow ( GridViewRow row, DataControlField[] fields )
        {
          base.InitializeRow ( row, fields );
    
          if (row.RowType == DataControlRowType.Header && this.AscendingImageUrl != null)
          {
    
    
    
    
            for (int i = 0; i < fields.Length; i++)
            {
              if (this.SortExpression.Length > 0 && fields[i].SortExpression == this.SortExpression)
              {
                // Add sort indicator
                Image sortIndicator = new Image ();
                sortIndicator.ImageUrl = this.SortDirection == SortDirection.Ascending ? this.AscendingImageUrl : this.DescendingImageUrl;
                sortIndicator.Style.Add ( HtmlTextWriterStyle.VerticalAlign, "TextTop" );
                row.Cells[i].Controls.Add ( sortIndicator );
                break;
              }
            }
          }
    
          foreach (TableCell cell in row.Cells)
          {
            // If we have an insert button it should only be shown on the insert row
            foreach (Control control in cell.Controls)
            {
              IButtonControl button = control as IButtonControl;
              if (row == this._insertRow)
              {
                if (row.RowState == DataControlRowState.Normal)
                {
                  // Hide all controls other than the insert button on the insert row
                  control.Visible = false;
                  if (button != null && ( button.CommandName == "Insert" || button.CommandName == "New" ))
                    control.Visible = true;
                }
                else if (button != null && button.CommandName == "Cancel")
                  // Hide cancel button on insert row
                  control.Visible = false;
              }
              else if (button != null && button.CommandName == "New")
                // Hide the insert button from all other rows
                control.Visible = false;
            }
          }
        }
    
        private IOrderedDictionary _insertValues;
    
        private bool HandleInsertCallback ( int affectedRows, Exception ex )
        {
          GridViewInsertedEventArgs e = new GridViewInsertedEventArgs ( this._insertValues, ex );
          this.OnRowInserted ( e );
          if (ex != null && !e.ExceptionHandled)
            return false;
    
          this.RequiresDataBinding = true;
          return true;
        }
    
        /// <summary>
        /// Raises the <see cref="GridView.RowCommand"/> event.
        /// </summary>
        /// <param name="e">Event data.</param>
        protected override void OnRowCommand ( GridViewCommandEventArgs e )
        {
          base.OnRowCommand ( e );
          if (e.CommandName == "New")
          {
            this.InsertRowActive = true;
            this.EditIndex = -1;
            this.RequiresDataBinding = true;
          }
          else if (e.CommandName == "Edit")
            this.InsertRowActive = false;
          else if (e.CommandName == "Insert")
          {
            // Perform validation if necessary
            bool doInsert = true;
            IButtonControl button = e.CommandSource as IButtonControl;
            if (button != null)
            {
              if (button.CausesValidation)
              {
                this.Page.Validate ( button.ValidationGroup );
                doInsert = this.Page.IsValid;
              }
            }
    
            if (doInsert)
            {
              // Get values
              this._insertValues = new OrderedDictionary ();
              this.ExtractRowValues ( this._insertValues, this._insertRow, true, false );
              GridViewInsertEventArgs insertArgs = new GridViewInsertEventArgs ( this._insertRow, this._insertValues );
              this.OnRowInserting ( insertArgs );
              if (!insertArgs.Cancel && this.IsBoundUsingDataSourceID)
              {
                // Get data source
                DataSourceView data = this.GetData ();
                data.Insert ( this._insertValues, this.HandleInsertCallback );
              }
            }
          }
        }  //eof method OnRowCommand
    
        protected override void OnRowUpdating ( GridViewUpdateEventArgs e )
        {
          base.OnRowUpdating ( e );
        }
    
        protected override void OnPageIndexChanging ( GridViewPageEventArgs e )
        {
          this.DataSource = this.SortDataTable ( this.DataSource as DataTable, true );
          //this.PageIndex = e.NewPageIndex;
          this.MyPageIndex = e.NewPageIndex;
    
          //Utils.Debugger.WriteIf ( "From OnPageIndexChanging" );
    
          this.DataBind (); //databind again after sorting            
        } //eof method 
    
    
    
        protected override void DataBind ( bool raiseOnDataBinding )
        {
          //this.PageSize = this.GetPagerSize ( );
          //this.PageSize = this.GvPageSize; 
    
          base.DataBind ( raiseOnDataBinding );
          this.PageIndex = this.MyPageIndex;
        }
        /// <summary>
        /// Renders the contents of the control.
        /// </summary>
        /// <param name="writer">The <see cref="HtmlTextWriter"/> to write to.</param>
        protected override void RenderContents ( HtmlTextWriter writer )
        {
          if (String.IsNullOrEmpty ( this.StrLabMsgText ) == false)
          {
            writer.WriteBeginTag ( "div" );
            writer.WriteBeginTag ( "p" );
            writer.Write ( this.StrLabMsgText );
            writer.WriteEndTag ( "p" );
    
            writer.WriteEndTag ( "div" );
          }
          base.RenderContents ( writer );
        } //eof method RenderContents
    
    
    
        //OLD private TableRow CreateSummaryRow ( Control summaryControl )
        //{
        //  TableRow summaryRow = new TableRow ( );
        //  TableCell summaryCell = new TableCell ( );
        //  summaryCell.ColumnSpan = this.HeaderRow.Cells.Count;
        //  summaryRow.Cells.Add ( summaryCell );
        //  summaryCell.Controls.Add ( summaryControl );
    
        //  return summaryRow;
        //} //eof method CreateSummaryRow
    
        private GridViewRow CreateSummaryRow ( Control summaryControl )
        {
          GridViewRow summaryRow = new GridViewRow ( 0, 0, DataControlRowType.EmptyDataRow, DataControlRowState.Normal );
          TableCell summaryCell = new TableCell ();
          summaryCell.ColumnSpan = this.HeaderRow.Cells.Count;
          summaryRow.Cells.Add ( summaryCell );
          summaryCell.Controls.Add ( summaryControl );
    
          return summaryRow;
        } //eof method CreateSummaryRow
    
    
        protected override void OnRowCreated ( GridViewRowEventArgs e )
        {
          //Utils.Debugger.WriteIf ( "START --- XGrid -- OnRowCreated" );
          base.OnRowCreated ( e );
    
          #region HideColumnsSetToBeHidden
          System.Collections.Specialized.ListDictionary ld = this.Ld;
          if (ld != null)
          {
            for (int i = 0; i < e.Row.Cells.Count; i++)
            {
              string key;
              int intColNumberToHide;
    
    
              if (i < 9)
                key = "0" + i.ToString () + "HideColumn";
              else
                key = i.ToString () + "HideColumn";
    
              if (key != null && ld != null && ld[key] != null && String.IsNullOrEmpty ( ld[key].ToString () ) == false)
              {
                #region TryToGetANumber
                try
                {
                  intColNumberToHide = System.Convert.ToInt16 ( ld[key] );
                  if (intColNumberToHide == 1)
                  {
                    e.Row.Cells[i].Visible = false;
                  }
                  else
                  {
                    //do nothing by default all this.columns are visible !!!                                
                  }
                }
                #endregion TryToGetANumber
                #region CatchExceptions
                catch (Exception ex)
                {
    
                }
                #endregion CatchExceptions
              } //eof if (String.IsNullOrEmpty ( ld[key].ToString() ) == false)
            }
          } //eof if (ld != null)
          #endregion HideColumnsSetToBeHidden
    
          if (e.Row.RowType == DataControlRowType.DataRow)
          {
            if (( e.Row.RowIndex % 2 ) == 0)
              e.Row.BackColor = System.Drawing.ColorTranslator.FromHtml ( "#EFEFEF" );
          } //eof if 
          //Utils.Debugger.WriteIf ( "END --- XGrid -- OnRowCreated" );
        } //eof method 
    
    
    
        protected override void OnDataBound ( EventArgs e )
        {
          base.OnDataBound ( e );
    
        }
    
        protected override void OnRowDataBound ( GridViewRowEventArgs e )
        {
    
    
          //Utils.Debugger.WriteIf ( "START --- XGrid --- OnRowDataBound" );
          base.OnRowDataBound ( e );
    
                
    
          
          if (e.Row.RowType == DataControlRowType.Header)
          {
    
          }
    
        } //eof method 
    
    
        private bool DisplayInsertRow
        {
          get { return this.AllowInserting && this.PageIndex == 0; }
        }
        #endregion
    
    
        #region TemplateMethods
        protected override object SaveViewState ()
        {
          return new Pair ( base.SaveViewState (), null );
        }
    
        protected override void LoadViewState ( object savedState )
        {
          base.LoadViewState ( ( (Pair)savedState ).First );
          EnsureChildControls ();
        }
    
        protected override void CreateChildControls ()
        {
          base.CreateChildControls ();
        }
    
        #endregion //TemplateMethods
    
    
        #region UtilityMethods
    
        /// <summary>
        /// Search for a control within the passed root control by the control id passed as string
        /// </summary>
        /// <param name="root">the upper control to start to search for</param>
        /// <param name="id">the id of the control as string</param>
        /// <returns></returns>
        private Control FindControlRecursively ( Control root, string id )
        {
          try
          {
            if (root.ID == id)
            {
              return root;
            } //eof if
    
            foreach (Control c in root.Controls)
            {
              Control t = this.FindControlRecursively ( c, id );
              if (t != null)
              {
                return t;
              } //eof if
            } //eof foreach
          } //eof try 
          catch (Exception e)
          {
            //Utils.Debugger.WriteIf ( "The following Exception occured : \n" + e.Message );
            return null;
          } //eof catch
    
          return null;
        } //eof FindControlRecursive
    
    
        protected DataView SortDataTable ( DataTable dataTable, bool isPageIndexChanging )
        {
          //Utils.Debugger.WriteIf ("SortDataTable(DataTable dataTable, bool isPageIndexChanging) START");
          if (dataTable != null)
          {
            DataView dataView = new DataView ( dataTable );
            if (GridViewSortExpression != string.Empty)
            {
              try
              {
    
                if (isPageIndexChanging)
                {
                  dataView.Sort = string.Format ( "{0} {1}", GridViewSortExpression, GridViewSortDirection );
                }
                else
                {
                  dataView.Sort = string.Format ( "{0} {1}", GridViewSortExpression, GetSortDirection () );
                }
              }
              catch (Exception e)
              {
    
              }
            }
            return dataView;
          }
          else
          {
            return new DataView ();
          }
        } //eof method SortDataTable
    
        #endregion //UtilityMethods
    
    
      } //eof class 
    
    
      /// <summary>
      /// Provides data for the <see cref="ExtendedGridView.RowInserting"/> event.
      /// </summary>
      public class GridViewInsertEventArgs : CancelEventArgs
      {
        #region Constructor
        /// <summary>
        /// Initialises a <see cref="GridViewInsertEventArgs"/>.
        /// </summary>
        /// <param name="row">The insertion row.</param>
        /// <param name="newValues">The values for the new row.</param>
        public GridViewInsertEventArgs ( GridViewRow row, IOrderedDictionary newValues )
        {
          this._row = row;
          this._values = newValues;
        }
        #endregion
    
        #region Properties
    
        #region Row
        private GridViewRow _row;
    
        /// <summary>
        /// The row containing the input controls.
        /// </summary>
        public GridViewRow Row
        {
          get { return this._row; }
        }
        #endregion
    
        #region NewValues
        private IOrderedDictionary _values;
    
        /// <summary>
        /// The values for the new row to insert.
        /// </summary>
        public IOrderedDictionary NewValues
        {
          get { return this._values; }
        }
        #endregion
    
        #endregion
      }
    
      /// <summary>
      /// Provides data for the <see cref="ExtendedGridView.RowInserted"/> delegate.
      /// </summary>
      public class GridViewInsertedEventArgs : EventArgs
      {
        #region Constructor
        /// <summary>
        /// Initialises a <see cref="GridViewInsertedEventArgs"/>.
        /// </summary>
        /// <param name="newValues">The values for the new row.</param>
        /// <param name="ex">The exception that occurred during the insert, if any.</param>
        public GridViewInsertedEventArgs ( IOrderedDictionary newValues, Exception ex )
        {
          this._values = newValues;
          this._exception = ex;
        }
        #endregion
    
        #region Properties
    
        #region NewValues
        private IOrderedDictionary _values;
    
        /// <summary>
        /// The values that were inserted into the new row.
        /// </summary>
        public IOrderedDictionary NewValues
        {
          get { return this._values; }
        }
        #endregion
    
        #region Exception
        private Exception _exception;
    
        /// <summary>
        /// The exception that occurred during the insert, if any.
        /// </summary>
        public Exception Exception
        {
          get { return this._exception; }
        }
        #endregion
    
        #region ExceptionHandled
        private bool _exceptionHandled;
    
        /// <summary>
        /// Whether the exception that occurred during the insert has been handled.
        /// </summary>
        public bool ExceptionHandled
        {
          get { return this._exceptionHandled; }
          set { this._exceptionHandled = value; }
        }
        #endregion
    
        #endregion
      } //eof class GridViewInsertedEventArgs
    } //eof namespace Controls
    

    Labels

    perl (41) Cheat Sheet (25) how-to (24) sql server 2008 (13) windows (13) linux (12) oracle (12) sql (12) Unix (11) cmd windows batch (10) mssql (10) cmd (9) script (9) textpad (9) netezza (8) sql server 2005 (8) cygwin (7) meta data mssql (7) metadata (7) code generation (6) Informatica (5) bash (5) cheatsheet (5) energy (5) tsql (5) utilities (5) excel (4) future (4) generic (4) html (4) perl modules (4) programs (4) settings (4) sh (4) shortcuts (4) поуки (4) принципи (4) Focus Fusion (3) Solaris (3) cool programs (3) development (3) economy (3) example (3) freeware (3) fusion (3) git cheat sheet (3) morphus (3) mssql 2005 (3) nuclear (3) nz (3) parse (3) python (3) sftp (3) sofware development (3) source (3) sqlplus (3) table (3) vim (3) .Net (2) C# (2) China (2) GUI (2) Google (2) GoogleCL (2) Solaris Unix (2) ascii (2) awk (2) batch (2) cas (2) chrome extensions (2) code2html (2) columns (2) configuration (2) conversion (2) duplicates (2) excel shortcuts (2) export (2) file (2) free programs (2) informatica sql repository (2) logging (2) mssql 2008 (2) mysql (2) next big future (2) nsis (2) nz netezza cheat sheet (2) nzsql (2) ora (2) prediction (2) publish (2) release management (2) report (2) security (2) single-click (2) sqlserver 2005 (2) sqlserver 2008 (2) src (2) ssh (2) template (2) tools (2) vba (2) video (2) xlt (2) xml (2) youtube videos (2) *nix (1) .vimrc (1) .virmrc vim settings configs (1) BSD license (1) Bulgaria (1) Dallas (1) Database role (1) Dense plasma focus (1) Deployment (1) ERP (1) ExcelToHtml (1) GD (1) GDP (1) HP-UX (1) Hosting (1) INC (1) IT general (1) ITIL management bullshit-management (1) IZarc (1) Java Web Start (1) JavaScript anchor html jquery (1) Khan Academy (1) LINUX UNIX BASH AND CYGWIN TIPS AND TRICKS (1) Linux Unix rpm cpio build install configure (1) Linux git source build .configure make (1) ListBox (1) MIT HYDROGEN VIRUS (1) OO (1) Obama (1) PowerShell (1) Run-time (1) SDL (1) SIWA (1) SOX (1) Scala (1) Services (1) Stacks (1) SubSonic (1) TED (1) abstractions (1) ansible hosts linux bash (1) ansible linux deployment how-to (1) ansible yum pip python (1) apache (1) apache 2.2 (1) application life cycle (1) architecture (1) archive (1) arguments (1) avatar (1) backup (1) bash Linux open-ssh ssh ssh_server ssh_client public-private key authentication (1) bash perl search and replace (1) bash stub (1) bin (1) biofuels (1) biology (1) books (1) browser (1) bubblesort (1) bugs (1) build (1) byte (1) cas_sql_dev (1) chennai (1) chrome (1) class (1) claut (1) cmdow (1) code generation sqlserver (1) command (1) command line (1) conf (1) confluence (1) console (1) convert (1) cool programs windows free freeware (1) copy-paste (1) csv (1) ctags (1) current local time (1) cygwin X11 port-forwarding mintty xclock Linux Unix X (1) cygwin bash how-to tips_n_tricks (1) cygwin conf how-to (1) data (1) data types (1) db2 cheat sheet (1) db2 starter ibm bash Linux (1) debt (1) diagram (1) dictionaries (1) digital (1) disk (1) disk space (1) documentation (1) dos (1) dubai (1) e-cars (1) electric cars (1) electricity (1) emulate (1) errors (1) exponents (1) export workflow (1) extract (1) fast export (1) fexp (1) file extension (1) file permissions (1) findtag (1) firewall (1) for loop (1) freaky (1) functions (1) fusion research (1) german (1) git gitlab issues handling system (1) google cli (1) google code (1) google command line interface (1) gpg (1) ha (1) head (1) helsinki (1) history (1) hop or flop (1) host-independant (1) how-to Windows cmd time date datetime (1) ibm db2 cognos installation example db deployment provisioning (1) ideas (1) image (1) informatica oracle sql (1) informatica repo sql workflows sessions file source dir (1) informatica source files etl (1) install (1) it management best practices (1) java (1) jump to (1) keyboard shortcuts (1) ksh (1) level (1) linkedin (1) linux bash ansible hosts (1) linux bash commands (1) linux bash how-to shell expansion (1) linux bash shell grep xargs (1) linux bash tips and t ricks (1) linux bash unix cygwin cheatsheet (1) linux bash user accounts password (1) linux bash xargs space (1) linux cheat sheet (1) linux cheat-sheet (1) linux cheatsheet cheat-sheet revised how-to (1) linux how-to non-root vim (1) linux ssh hosts parallel subshell bash oneliner (1) london (1) make (1) me (1) metacolumn (1) metadata functions (1) metaphonre (1) method (1) model (1) movie (1) multithreaded (1) mysql cheat sheet (1) mysql how-to table datatypes (1) n900 (1) nano (1) neteza (1) netezza bash linux nps (1) netezza nps (1) netezza nps nzsql (1) netezza nz Linux bash (1) netezza nz bash linux (1) netezza nz nzsql sql (1) netezza nzsql database db sizes (1) non-password (1) nord pol (1) nps backup nzsql schema (1) number formatting (1) nz db size (1) nz table count rows (1) nzsql date timestamp compare bigint to_date to_char now (1) on-lier (1) one-liners (1) one-to-many (1) oneliners (1) open (1) open source (1) openrowset (1) oracle PL/SQL (1) oracle Perl perl (1) oracle installation usability (1) oracle number formatting format-model ora-sql oracle (1) oracle templates create table (1) oracle trigger generic autoincrement (1) oracle vbox virtual box cheat sheet (1) oracle virtual box cheat sheet (1) outlook (1) parser (1) password (1) paths (1) perl @INC compile-time run-time (1) perl disk usage administration Linux Unix (1) perl modules configuration management (1) permissions (1) php (1) picasa (1) platform (1) postgreSQL how-to (1) powerShell cmd cygwin mintty.exe terminal (1) ppm (1) predictions (1) prices (1) principles (1) productivity (1) project (1) prompt (1) proxy account (1) public private key (1) publishing (1) putty (1) qt (1) read file (1) registry (1) relationship (1) repository (1) rm (1) scp (1) scripts (1) scsi (1) search and replace (1) sed (1) sendEmail (1) sh stub (1) shortcuts Windows sql developer Oracle (1) sidebar (1) silicon (1) smtp (1) software procurement (1) sofware (1) sort (1) sql script (1) sql_dev (1) sqlcmd (1) sqlite (1) sqlite3 (1) sshd (1) sshd cygwin (1) stackoverflow (1) stored procedure (1) stub (1) stupidity (1) subroutines (1) svn (1) sysinternals (1) tail (1) tar (1) temp table (1) templates (1) teradata (1) terminal (1) test (1) testing (1) theory (1) thorium (1) time (1) tip (1) title (1) tmux .tmux.conf configuration (1) tmux efficiency bash (1) tool (1) ui code prototyping tips and tricks (1) umask Linux Unix bash file permissions chmod (1) url (1) urls (1) user (1) utility (1) utils (1) vb (1) vim perl regex bash search for string (1) vim recursively hacks (1) vim starter (1) vim-cheat-sheet vim cheat-sheet (1) vimeo (1) visual stuio (1) warsaw (1) wiki (1) wikipedia (1) window (1) windows 7 (1) windows 8 (1) windows programs (1) windows reinstall (1) windows utility batch perl space Windows::Clipboard (1) wisdoms (1) workflow (1) worth-reading (1) wrapper (1) xp_cmdshell (1) xslt (1) youtube (1)

    Blog Archive

    Translate with Google Translate

    My Blog List

    VideoBar

    This content is not yet available over encrypted connections.