Sunday, 27 January 2013

Dynamic Digital clock using c# and .net windows application


This post contains the way to add the dynamic digital clock to the .net windows application.

 Click here to download the coding for Dynamic digital clock

screen shot:

Hope it is useful
Thank you
If any doubt and feedback please give your comment bellow.

Wednesday, 23 January 2013

Simple Student Information System in C# windows application using SQL SERVER 2008

This article gives the basic window application program with the SQL SERVER as the back-end for the beginners in .net programming.

The following steps are used to create the windows application in .net.

1. Open visual studio 2010.


2. Open visual studio->new->project



3. Open a new visual C# windows application.



4. Add the required forms.

Database:
The following are the steps to create database using query in SQL SERVER 2008
  1.       Open SQL SERVER 2008.
  2.           Open a new query window.
  3.            Type the following code to create the database student.
              create database student;

               Now select the code and execute the code for database creation.

     4. After creating the database use the database to create tables.
     use student;
    Now select the code and execute the code to use the particular database.

5. Create the table info by the following code.

create table info(rollno nvarchar(20)not null primary key,sname nvarchar(50),gen nvarchar(10),dob date,addr nvarchar(100),phno bigint,cname nvarchar(100),jdt date);

Now select the code and execute the code to create the table.


Screen shots:


Fig [1]:  New Student Registration

Fig [2]: Student search by Name

Fig [3]: Student search by Date of joining

Any Query!!!!

Saturday, 15 December 2012

Concepts

Introduction to .net framework

  .net framework is developed by Microsoft. It is mainly developed for the INTERNET programming. It is a type safety environment and manages all aspects of program execution like allocation of memory for storage of data and instruction. It support cross language capability.
The application developed in VB.net can be referenced in ASP.net or C#.net.
.net is designed to provide :
  • Increase interactive for web sites.
  • Integrate various communication media namely e-mail, fax, tele phone etc.
  • The ability of re-usability.

Components of .net framework

The basis of this new development platform consists of three primary components or layers:
  1.    common language runtime
  2. .NET Framework base classes
  3. user and program interfaces

net framework architecture:


The following are the components of .net framework architecture.

COMMON LANGUAGE RUNTIME   (CLR):

  • The CLR is the foundation upon which the .NET Framework has been built. 
  • The runtime manages code at execution time and provides all the core services such as memory management, thread management and remoting.

CLR Features

  1.  CLR manages memory, thread execution, code execution, compilation code safety verification and other system services.
  2. For security reasons, managed code is assigned varying degrees of trust based on origin. This prevents or allows the managed component from performing file access operations, registry access operations or other sensitive functions even within the same active application.
  3. The Runtime enforces code robustness by implementing strict type and code verification infrastructure called Common type System (CTS). The CTS ensures that all managed code is self describing and all Microsoft or third party language compiler generated codes conform to CTS. This enables the managed code to consume other managed types and enforce strict type fidelity and type safety.
  4. CLR eliminates many common software issues like handling of object layout, references to objects and garbage clearance. This type of memory management prevents memory leaks and invalid memory references.
  5. The CLR also accelerates developer productivity. The programmer is free to choose the language of the application without worrying about compatibility and integration issues. He is also enabled to take advantage of the runtime and the class library of the .NET Framework and also harvest components from other applications written in different languages by different developers. This implicitly eases the process of migration.
  6. Though CLR aims to be futuristic software, it lends support to existing applications. The interoperability between the managed and unmanaged codes makes this process extremely simple.
  7. The design of the CLR is geared towards enhancing performance. The Just-in-time (JIT) compiling enables managed code to run in the native machine language of the system executing it. During the process the memory manager removes the possibilities of fragmented memory and increases memory locality-of-reference to enhance performance.
  8. Finally, server side applications can host runtime. High performance servers like Microsoft SQL Server and Internet Information Services can host this CLR and the infrastructure so provided can be used to write business logic while enjoying the best benefits of enterprise server support.

Class Library

  • A blueprint of an object is called a class. All definitions of haw a particular object will be instantiated at runtime, its properties and methods and storage structures are defined in the class.
  • Classes are used by developers for creating instances of the class at runtime using the keyword “New”.
  • The Class Library is an object oriented collection of reusable types. It is comprehensive and the types can be used to develop command line applications or GUI applications such as Web forms or XML Web services.
  • Unmanaged components that load CLR into their processes can be hosted by the .NET Framework to initiate the execution of managed code. This creates a software environment that exploits both the managed and unmanaged codes.
  • The.NET Framework also provides a number of runtime hosts and supports third party runtime hosts.
Class Library Features

1. The class library is a collection of reusable types that integrate with the CLR.

2. It is object oriented and provides types from which user defined types can derive functionality. This makes for ease of use and is time saving.

3. Third party components can be integrated seamlessly with classes in the .NET framework.

4. It enables a range of common programming tasks such as string management, data collection and file access.

5. It supports a variety of specialized development scenarios such as console application development, Windows GUI applications, ASP.NET Applications, XML Web services.


The Common Type System (CTS)


  • A number of types are supported by the CLR and are described by the CTS. Both value types are supported—primitive data types and reference types.
  • The primitive data types include Byte, Int16, Double and Boolean while Reference types include arrays, classes and object and string types.
  • Reference types are types that store a reference to the location of their values. The value is stored as part of a defined class and is referenced through a class member on the instance of a class.
  • User defined value types and enumerations are derived from the value types mentioned above.
Click here to download the material