Monday, November 17, 2008

Can u Expect whats d output


write this below code in console application


string str = "ramesh;sapi;latha";
Console.WriteLine(str);
string[] saray = str.Split(new char[] { ';' });
foreach (string month in saray)
{
Console.WriteLine("{0}", month);
}
Console.ReadLine();

Tuesday, November 11, 2008

Cimple Sql Queries,Try it And Gve Sugetions



--SELECT * FROM emp e WHERE 0 < (SELECT COUNT(*) FROM emp B WHERE
--e.empsal < B.empsal)
--select min(empsal),empname from emp where empsal in(select top 4 empsal from emp order by empsal desc)
--select empname,empsal from emp where empsal in(select min(empsal) from emp where empsal in(select top 4 empsal from emp order by empsal desc))
--select empid,empsal from emp where empsal in(select min(empsal) from emp where empsal in(select top 4 empsal from emp order by desc))
--select *from emp1 order by replicate('0',len(empid)),empid
--error number--select @@error
--version name--select serverproperty('productversion'), serverproperty('productlevel')
--this is also version--select @@version
--select @@error
--select max(getdate())
--to get empnames in reverse order--SELECT * FROM emp1 ORDER BY 'empname'desc
--select * from emp1 where empname="[^l-x]%";
--select @@rowcount
--sp_columns emp1
--sp_help emp1
--By using following query we wil get the duplicate records
--SELECT empname FROM emp1
--Group By empname
--Having Count(*)=1
--select convert(char(10),getdate(),101)
--sp_configure
--sp_renamedb 'swapna','ramesh'
--DBCC CHECKDB
--DBCC CHECKALLOC
--DBCC CHECKFILEGROUP
--select STUFF('lathala',6,7,'xx')
--select replace('lathalalala','la','ramesh')
--to give ur own data type--sp_addtype ramesh,'varchar(15)','not null'
--list of tables-->sp_tables
--sp_who2
--sp_helpdb msdb
--to know DB Space--sp_spaceused emp
--use ramesh
--select name from systypes
--to know DB Space--sp_spaceused @updateusage='TRUE'
--to copy complete column into another table--
select empdesg into emp3 from emp1
select empdesg into emp10 from emp1
select *from emp4
select count(*) from information_schema.tables --how many tables in ur database(count)
select * from information_schema.tables --1.displays database tables
select *from sys.tables --2.displays database tables
select *from sys.tables order by name desc --3.displays database tables in desc order
select *from sys.indexes --displays database indexes
--to rollback a dropped table
begin tran
drop table emp10
rollback tran
select *from emp10
---u cant roll back a truncated table
begin tran
truncate emp10
rollback tran
select *from emp10
--
begin tran
select *from sys.tables
drop table emp2,emp3,emp4,emp9
rollback
select *from sys.tables

Thursday, November 6, 2008

LINQ Links


Style Sheets


http://www.wdvl.com/Authoring/Style/Sheets/Examples/
http://vzone.virgin.net/sizzling.jalfrezi/iniframe.htm

SQL Server



Pop-Up Control JavaScript


CRYSTAL REPORTS


http://www.codeproject.com/KB/aspnet/CrystalReporting.aspx?display=Print

http://www.beansoftware.com/ASP.NET-Tutorials/Using-Crystal-Reports.aspx

AJAX Controls


http://www.c-sharpcorner.com/UploadFile/das_purnima/ResizableTextBox09092008070758AM/ResizableTextBox.aspx
http://www.dotnetheaven.com/UploadFile/rahul4_saxena/AJAXAccordionControl09152008033106AM/AJAXAccordionControl.aspx

http://www.c-sharpcorner.com/UploadFile/mahesh/WPFRichTextBox09072008194855PM/WPFRichTextBox.aspx

WPF Links 4 u


http://www.c-sharpcorner.com/UploadFile/das_purnima/AnimationExtender09022008030708AM/AnimationExtender.aspx.

http://www.c-sharpcorner.com/UploadFile/raj1979/WPFUserControl08312008234556PM/WPFUserControl.aspx

Tuesday, November 4, 2008

wnna cee dotnet videos


http://www.dotnetvideos.net/?gclid=CMXZ17GA4JUCFQohegod21G5Wg

Excel Sheet Generation Using C#


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Excel;

namespace Excel1
{
public partial class Form1 : Form
{
public const int INTERIORCOLOR = 13;
public const int FONTCOLOR = 2;
public Form1()
{
InitializeComponent();
}
Excel.Application oXL = new Excel.Application();
Excel.Workbook oBook;
Excel.Worksheet oSheet;

public void EmployeeReportGeneration(SqlConnection con)
{
int noOfRecords = 0;
oBook = oXL.Workbooks.Add(Type.Missing);
try
{
if (oBook.Worksheets.Count>1)
{
oSheet = (Excel.Worksheet)oBook.Sheets[1];
oXL.Visible = true;
SqlDataAdapter da = new SqlDataAdapter("select * from employee", con);
DataSet ds = new DataSet();
da.Fill(ds);
Range rg = oSheet.get_Range("B2", "E2");
rg.Select();
rg.Font.Bold = true;
rg.Font.Name = "Arial";
rg.Font.Size = 12;
rg.Cells.ColumnWidth = 68;
rg.WrapText = true;
rg.MergeCells = true;
rg.HorizontalAlignment = Excel.Constants.xlCenter;
rg = oSheet.get_Range("B2", Type.Missing);
rg.Value2 = "Employee Records";
rg.Interior.ColorIndex = INTERIORCOLOR;
rg.Font.ColorIndex = FONTCOLOR;

rg = oSheet.get_Range("B3", Type.Missing);
rg.Cells.ColumnWidth = 17;
rg.Font.Bold = true;
rg.Font.Name = "Verdana";
rg.Font.Size = 10;
rg.Interior.ColorIndex = 9;
rg.Font.ColorIndex = 2;
rg.Value2 = "Employee ID";

rg = oSheet.get_Range("C3", Type.Missing);
rg.Cells.ColumnWidth = 17;
rg.Font.Bold = true;
rg.Font.Name = "Verdana";
rg.Font.Size = 10;
rg.Interior.ColorIndex = 9;
rg.Font.ColorIndex = 2;
rg.Value2 = "Employee Name";

rg = oSheet.get_Range("D3", Type.Missing);
rg.Cells.ColumnWidth = 15;
rg.Font.Bold = true;
rg.Font.Name = "Verdana";
rg.Font.Size = 10;
rg.Interior.ColorIndex = 9;
rg.Font.ColorIndex = 2;
rg.Value2 = "Employee Sal";

rg = oSheet.get_Range("E3", Type.Missing);
rg.Cells.ColumnWidth = 19;
rg.Font.Bold = true;
rg.Font.Name = "Verdana";
rg.Font.Size = 10;
rg.Interior.ColorIndex = 9;
rg.Font.ColorIndex = 2;
rg.Value2 = "Employee Desg";

int x = 4;
int i = 0;
noOfRecords = ds.Tables[0].Rows.Count;
while (i < name = "Employees" sa = "B" rg =" oSheet.get_Range(sA.ToString()," value2 =" ds.Tables[0].Rows[i][0].ToString();" bold =" true;" colorindex =" 9;" colorindex =" 2;" sb = "C" rg =" oSheet.get_Range(sB.ToString()," value2 = "'" colorindex =" INTERIORCOLOR;" colorindex =" FONTCOLOR;" sc = "D" rg =" oSheet.get_Range(sC.ToString()," value2 =" ds.Tables[0].Rows[i][2].ToString();" colorindex =" INTERIORCOLOR;" colorindex =" FONTCOLOR;" sd = "E" rg =" oSheet.get_Range(sD.ToString()," value2 =" ds.Tables[0].Rows[i][3].ToString();" colorindex =" INTERIORCOLOR;" colorindex =" FONTCOLOR" rowcount="0;" total =" 0;" rowcount =" 4;" row = "D" rg =" oSheet.get_Range(row.ToString()," total =" total" totaldisplay = "C" rg =" oSheet.get_Range(totalDisplay," value2 = "Total" colorindex =" 5;" bold =" true;" colorindex =" 2;" totalrow = "D" rg =" oSheet.get_Range(totalRow," value2 =" total;" colorindex =" 5;" colorindex =" 2;" numberformat = "Rs0,00" mycharts =" (Excel.ChartObjects)oSheet.ChartObjects(Type.Missing);" mychart1 =" MyCharts.Add(100," ochart =" MyChart1.Chart;" chartrg =" oSheet.get_Range(" haslegend =" true;" position =" Excel.XlLegendPosition.xlLegendPositionLeft;" colorindex =" 5;" hastitle =" true;" text = "Employee Record Chart" excstring =" ex.Message" con =" new" security="yes;data" source="DEV09;database="smple">

DotNet Links

http://microsoft.com/schemas/VisualStudio/TeamTest/2006
vstst.xsd
Automatic
http://schemas.microsoft.com/AspNet/AdRotator-Advertisement-File-1.2
adrotator.xsd
Automatic
http://schemas.microsoft.com/AspNet/AdRotator-Schedule-File
adrotator1_0.xsd
Automatic
http://schemas.microsoft.com/AspNet/SiteMap-File-1.0
SiteMapSchema.xsd
Automatic
http://schemas.microsoft.com/AutomationExtensibility
addinschema.xsd
Automatic
http://schemas.microsoft.com/developer/2004/01/bootstrapper
Package.xsd
Automatic
http://schemas.microsoft.com/xsd/catalog
catalog.xsd
Automatic
http://www.w3.org/1999/xhtml
xhtml.xsd
Automatic
urn:schemas-microsoft-com:xslt
msxsl.xsd
Automatic
http://schemas.microsoft.com/dsltools/SyncDesigner
SyncDesignerSchema.xsd
Automatic
http://schemas.microsoft.com/linqtosql/dbml/2007
DbmlSchema.xsd
Automatic
http://www.w3.org/1999/xlink
xlink.xsd
Automatic
http://schemas.microsoft.com/VisualStudio/2004/03/SmartDevices/XMTA.xsd
xmta.xsd
Automatic
http://www.w3.org/2000/09/xmldsig#
xmlsig.xsd
Include
http://schemas.microsoft.com/Visual-Studio-Intellisense
vsIntellisense.xsd
Automatic
http://www.w3.org/2001/04/xmlenc#
xenc.xsd
Automatic
http://schemas.xmlsoap.org/soap/envelope/
soap1.1.xsd
Automatic
http://schemas.xmlsoap.org/wsdl/
wsdl.xsd
Automatic
http://schemas.xmlsoap.org/wsdl/soap/
wsdlSoap11Binding.xsd
Automatic
http://schemas.xmlsoap.org/wsdl/soap12/
wsdlSoap12Binding.xsd
Automatic
http://www.w3.org/2001/XMLSchema
xsdschema.xsd
Include
http://www.w3.org/XML/1998/namespace
xml.xsd
Automatic
http://www.w3.org/1999/XSL/Transform
xslt.xsd
Automatic
http://www.w3.org/2003/05/soap-envelope
soap1.2.xsd
Automatic
urn:schemas-microsoft-com:datatypes
xdrtypes.xsd
Automatic
urn:schemas-microsoft-com:xml-msdatasource
DataSource.xsd
Automatic
urn:schemas-microsoft-com:rowset
XdrRowset.xsd
Automatic
urn:schemas-microsoft-com:xml-wcfservicemap
ServiceMapSchema.xsd
Automatic
urn:schemas-microsoft-com:xml-data
xdr.xsd
Automatic
urn:schemas-microsoft-com:xml-msdata
msdata.xsd
Automatic
http://schemas.microsoft.com/developer/vstemplate/2005
vstemplate.xsd
Automatic
http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet
snippetformat.xsd
Automatic
http://schemas.microsoft.com/developer/msbuild/2003
Microsoft.Build.xsd
Automatic
http://schemas.microsoft.com/office/2006/01/customui
customUI.xsd
Automatic
http://schemas.microsoft.com/developer/vscontent/2005
vscontent.xsd

Followers