Tuesday, October 30, 2012

Crystal Report-An Introduction

In general, report is a proper formatted output. In .NET framework, we can create report with the help of inbuilt reporting tools called crystal report. Crystal Report is a business intelligence application which is used to generates reports from a various types of data sources. It allows users to graphically design report layout and data connections. It provides the ability to create interactive, presentation-quality content. When we think of a report then it is obvious that we want to do at least three things such as create, modify and run a report against a data in the data base.


While creating a report, some important things need to be remembered.
1. Table name
2. Kind of data from table.
3. Manipulation on data to get required and informative result.
4. Way to format the report etc.

Silverlight-An Introduction

It is a powerful development tool for creating interactive user interface for window, web and mobile application. It is an application framework for creating rich internet applications. The runtime environment is available for silverlight as free plug-in powered by the .NET framework and compatible with any browser, device and operating system.
Working with Silverlight

Steps to be followed:
1. Start Visual Studio and go to File->New->Website.

2.New Web Site window will populate.Select ASP.NET Web Site and click on button Ok.


3. In Solution Explorer, right click on project name Silverlight and select Add New Item.


4. Add New Item window will populate.Select Silverlight Application from template list and click on button Add.


5. Add Silverlight Application window will populate.Click on button Ok.


6. Silverlight Application projet window will populate.


Notes:

1. Whenever we create new Silverlight Application project, it always contains two files such as  MainPage.xaml and App.xaml as well as code behind class files that are associated with them.
2. The App.xaml file is used to declare resources, such as brush and style objects that are shared across the application. The Application code-behind class for the App.xaml file can be used to handle application level events – such as
     1. Application Startup
     2. Application Exit and
    3. Application_UnhandledException.
3. The Page.xaml file is by default the initial UI control that is loaded when the application activates. Within it we can use UI controls to define our user interface, and then handle events off of them within the Page code-behind class.
4. Whenever we build our project, Visual Studio will by default compile the code and .XAML markup into a standard .NET assembly file, and then package it into .xap file.
5. Xap file is a compressed result of the silverlight application which contains application manifest file, compiled output assembly and other recourses used by silverlight application

7. Drag a control TextBlock from Toolbox inside Grid. Add a text attribute to the TextBlock element and sets it a value of “Hello World.”We can see Hello World in the Grid. in the below mentioned screenshot.


8. Run the application by pressing F5 and it will launch test web page that hosts our application.


Thursday, October 25, 2012

GridView-An Introduction

GridView
Displaying tabular data is most crucial work in software development.ASP.NET provides a number of tools or controls to fulfill this purpose. GridView control is one of them. It is the supergun of .net framework. It is most rich, featured and versatile control. It is used to display, update, delete and sort data from many types of data sources such as database, Xml files and business objects.
Working with GridView control
To use a GridView control, a DataSource control has to be attached to the GridView control. The property DataSourceID of the GridView control binds the GridView control to the DataSource control.
Steps to follow:
Before working with Gridview we require to create table with the help of any database vendor like SQL Server or Oracle or MSAccess or any other vendors.Here we are using SQL Server 2005 and created table Intro



1. Drag a GridView control from the toolbox pane to the ASP page.In design view click on GridView control ,GridView task box will display.


2. Click on New data source from dropdown list, Choose a Data Source Configuration Wizard window will come.
3. Select any data source. We select Sql data source and click on button OK.
4. Configure Data Source window will come. Click on button New Connection.
5. Choose Configure Data Source window will come. Select Microsoft SQL Server. Two options will populate in Data Provider dropdown list. Select .NET Framework Data Provider for SQL Server and click on button Continue.
6. Add Connection window will come. Enter Server name. For this SQL Server should install in our system.
7. When we will enter server name, Select or enter a database name dropdown list will be enabled and database names would populated in dropdown list. Select proper database and click on button Test Connection.
8. Test connection succeeded message box will populate and then click on button OK in message box.
9. Click on button OK in Add Connection window. Flow will come again on Configure Data Source window.
10. Click on button Next and again Next. We can see the columns of the table Intro.
11. Click on button Next and we will see Test Query option in Configure Data Source window where there is a button Test Query. On clicking on button Test Query we will see the data contained in Intro table. Click on button Finish.
12. We can see the columns mentioned in the table Intro.
13. Run this program by pressing F5 and we see the data is retrieved from the table Intro in Grid form in web page.




Wednesday, October 24, 2012

DataBound Control in .NET

A web application or window application is worthy when we introduce data access in the application and its mapping with application. To map data access to our application .net framework provides DataBound control.

DataBound control is used to show data in our application with the help of DataSource control. DataBound control can be used to display data and modify data according to requirement in our application.
We can work with a DataBound control by binding it to a DataSource control such as SqlDataSource or ObjectDataSource or AccessDataSource or LinqDataSource or XmlDataSource or EntityDataSource or SiteMapDataSorce control.The DataSource control connects to a data source such as database or xml or middle tier object and then retrieves or updates data.

There are three types of DataBound controls:
1. List control
2. Tabular control
3. Hierarchical control.

List control
There are five types of list control:
1. CheckBoxList
2. RadioButtonList
3. BulletedList
4. DropDownList
5. ListBox
CheckBoxList
It is used to display a list of check boxes and multiple selections can be possible.
RadioButtonList
It is used to display a list of radio buttons and only one selection can be possible.
BulletedList
It is used to display a bulleted list of items. Each item can be displayed a text or a link button or a hyperlink.
DropDownList
It is used to display a dropdown list. Only one item in the dropdown list can be selected.
ListBox
It is used to display a list box and multiple selections can be possible but depends on configuration that we define on items.

Tabular Control
There are six types of tabular control:
1. GridView
2. DataList
3. Repeater
4. ListView
5. DetailsView
6. FormView
Notes: GridView, DataList, Repeater and ListView display multiple data items at a time whereas DetailsView and FormView display single data at a time.
GridView
It is used to display a set of data items in a HTML table.We can use this control to display all the records contained in the table. This control supports sorting, paging and editing data.
DataList
It is used to display a set of data items in an HTML table. Unlike the GridView control, more than one data item can display in a single row.
Repeater
It is used to display a set of data items using a template. Unlike the GridView and DataList controls, this control does not automatically render an HTML table.
ListView
It is used to display a set of data items using a template. Unlike the Repeater control, this control supports sorting, paging and editing data.
DetailsView
It is used to display a single data item in an HTML table. We can use this control to display a single record contained in the table. This control supports sorting, paging, adding and editing data.
FormView
It is used to display a single data item using a template. Unlike the DetailsView ,this control allows to use to layout a form by using templates.

Hierarchical control
There are two types of hierarchical control:
1. Menu
2. TreeView
Menu
It is used to display a single data item in a static or dynamic menu.
TreeViewIt is used to display a single data item in a tree.

Monday, October 22, 2012

Saturday, October 20, 2012

Can a person fly?

There is a big contention on flying a person like a bird. Is this possible? Someone says “YES” and someone says “NO”. If possible then how it would achieve? For this we have to see how bird flies and then we would target to explore the concept.

Logically, when a bird flaps its wings, air is pushed downward. According to Newton’s 3rd law, this produces an opposite force that “lifts” the bird into the air. Since a bird’s body structure and specially its wing is in the shape of an airfoil, and hence it produces some lift even when the bird is just gliding.
But there are some birds like as penguins and ostriches that are not able to fly. What are the reasons? Is it same as human being? We will discuss later.

Wednesday, October 17, 2012

Tuesday, October 16, 2012

jQuery- An Introduction



There are many JavaScript library which provides additional features based on our requirements as Manipulation, Graphics, Tools based, Ajax based, Effect, Web application based, cryptography, Widget and miscellaneous.  Now we will check the DOM-manipulation javaScript library named jQuery.

We can also see more details about javaScript library JavaScript1 JavaScript2

jQuery is a kind of JavaScript library. It has changed the way that we write JavaScript. It is simple and provides more possibilities to create interactive web application. It simplifies HTML document traversing, even handling and Ajax interaction in rapid web application. It is used to create animation and more interactive website.

Shaping Ideas

Everyone has an idea but matters only how we innovate and takes further.

Friday, October 12, 2012

Difference between JOIN and UNION

JOIN
JOIN is used to display data from more than two tables.

SELECT FIRST_NAME ,LAST_NAME,JOB_ID FROM TABLE1 T1 JOIN TABLE2 T2 ON
(T1.JOB_ID=T2.JOB_ID);
NOTES: To join n tables together, we need a minimum of n-1 join conditions.

UNION
UNION is used to display combined data from two tables into a single result set.
SELECT FIRST_NAME ,LAST_NAME,JOB_ID FROM TABLE1
UNION
SELECT FIRST_NAME ,LAST_NAME,JOB_ID FROM TABLE2
NOTES: The number of columns and order must match in all tables.

Thursday, October 11, 2012

Difference between ORDER BY and GROUP BY

ORDER BY

ORDER BY is used to sort the rows.It affects only the order of result set.
SELECT FIRST_NAME,LAST_NAME,JOB_ID,DEPARTMENT_ID FROM EMPLOYEE
ORDER BY JOB_ID
NOTE:If we are using ORDER BY clause,it must be last clause of the SQL statement.

GROUP BY
GROUP BY is used to divide the rows into group in a table. GROUP BY specifies how the rows should be grouped.
SELECT DEP_ID,AVG(SAL) FROM EMPLOYEE
GROUP BY DEP_ID
NOTE:Rows are sorted by ascending order of the columns included in the GROUP BY clause by default.

Wednesday, October 10, 2012

Difference between BETWEEN and IN

BETWEEN
BETWEEN is used to display rows based on a range of values.
SELECT FIRST_NAME, SALARY FROM EMPLOYEE
WHERE SALARY BETWEEN 4000 and 10000;
NOTE: Values specified with the BETWEEN condition are inclusive. We have to specify the lower limit first.

IN
IN is used to test for values in a list
SELECT FIRST_NAME, SALARY, EMP_ID FROM EMPLOYEE
WHERE EMP_ID IN (150,250,300);
NOTE: THE IN condition can be used with any data type.


Difference between DELETE,DROP and TRUNCATE

DELETE

DELETE is used to remove exiting rows from a table.
DELETE FROM TableName
WHERE condition;
If we omit the WHERE clause all rows in the table are deleted otherwise specific rows are deleted based on the condition. After performing a DELETE operation we need to COMMIT or ROLLBACK the transaction to make the change permanent or to undo it.
NOTE: All DELETE triggers on the table will fire.

DROP
DROP is used to delete the definition of oracle table.When we drop a table,the database loses all the data in the table and all the indexes associates with it.
DROP TABLE TableName
After dropping table any views and synonmys are still remained there but are invalid.

TRUNCATE
TRUNCATE is used to remove all rows from a table and release the storage space used by the table.
TRUNCATE TABLE TableName
NOTE:DROP and TRUNCATE are DDL but DELETE is DML.So when we use TRUNCATE we cannot roll back row removed and even no triggers will be fired.

Copyright © Codingnodes,2014.All Rights Reserved.