Tuesday, February 14, 2012

Is Going Our Life is WiFi ???



///////////////////////////////////////////////////////////////////////////////////////
What do you think about this title?????
It is really very global think ,,,,, we don’t have to just see today’s but also see future. Now ask your self what do you like in terms of technology. Do like lots of wire in life? Now see before 5-7 year Desktop Computer was new thing and we felt that wow!! but now Laptop is booming and it replaced Desktop Computer now What Next,,,,

Mobile Technology--- we know what was before 5 year and what is now in Mobile Technology. More than 80% people have now personal mobile and now a day people also want featured mobile like iphone with 3G network. So just think where technology is going on …..

Apple ipad is coming with total WiFi life which has capability of 10 laptop, 20 mobile, 30 desktop computer. It will cover whole market within this 3-5 year. So now think What Next,,,,,

IBM survey said 2012-2013 year will declared as WiFi Life and Mobile Computing.

We know E-Commerce and it’s power but now time is M-Commerce every transaction will perform by only Mobile no any computer is require.

In last 2 year more than 300000 Mobile Application developed and sold.

My friends I think I don’t want to tell you more because now you can think What Next about our WiFi Life.

I also entered in WiFi Field so I m waiting for you guys!!!!!
Thank You

Thursday, January 26, 2012

0G 1G 2G 3G 4G 5G Networks

0G Network


This is 1st generation of mobile telephony there were very limited use of mobile technology. Specially that time mobile developed and deployed for boats mainly but anyone could get in one’s car in the beginning of the 90s with thousand of dollars. That time Network such as Iridium, Global Star and Eutelsat were truly worldwide.

1G Network


1G Network started in early 1980s which was providing simple voice call and sending text messages. This generation are considered to be first analog cellular system. The main technology was used AMPS, NMT, TACS and speed was 14.4 kbps. The advantage was that the lower power emission helped address with health concerns. The main disadvantage was that it only allowed to contact within premises of that particular nation, NO CROSS OPERATOR ROAMING FACILITIES were provided.

2G Network


This is 2nd which was still the most widespread technology in the world also know as GSM (Group Special Mobile) later renamed in Global System for Mobility. The main technology was used TDMA, CDMA and speed was 9-14.4 kbps. The main advantage of 2g was that it provided roaming facility and this services provided with circuit switching.

2.5G Network


This mid generation was introduced mainly for involving latest bandwidth technology with addition to the existing 2G generation. This offered a higher data rate than 2G technology and enabled the delivery of basic data services like text messaging. Still the data rates were not enough to download an image or browse a website from a PDA. The main technology was used GPRS, EDGE and speed was 144kpbs.

2.75G Network


2.75G Network (a.k.a EDGE)- To be able to watch streaming video and download mp3 files faster – that’s precisely what EDGE stands for where data packets can effectively reach 180kbps. EDGE is now widely being deployed in India.

3G Network


Represents the 3rd Generation designed to overcome all the limitations of above technologies. In this, 3G Wide Brand Wireless Network is used to increase the clarity giving the perfection like that of a real conversation. GSM 3G networks are termed UMTS, or the universal mobile telecommunications service, in the United States, while wideband CDMA (WCDMA) is an effectively synonymous term for UMTS used elsewhere in the world. One of the major positive points of UMTS is its global roaming capabilities. The speed is 3 times that of a GSM, so its called a 3GSM service. So in 3G
Network all that task are possible which we cant think even like Video calling, Fast Internet, Live TV etc.

3.5G or 3G+ Network


HSDPA (3.5G) standard today offers anywhere between 7.2 and 14.4 Mbps on cell phones, Practically speaking, this would mean downloading an mp3 file would take about some seconds instead of something like 2 minutes.

4G Network


It is mainly a marketing buzzword at the moment. Some basic 4G research is being done, but no frequencies have been allocated. The Forth Generation could be ready for implementation around 2012. The term also has become shorthand for Internet everywhere a high-speed wireless network that gives speeds. LTE is considered as 4G technology. Harri Honkasalo, the director of IPR for Nokia Corporation, states that “4G should support at least 100 Mbps peak rates in full-mobility wide area coverage and 1Gbps in low-mobility local area coverage”. The speeds of 3G can be up to 2Mbps, which is much slower than the speeds of 4G.

5G Network (WWWW)


5GNetworks (Real wireless world) (completed WWWW: World Wide Wireless Web)
The idea of WWWW, World Wide Wireless Web, emerged from 4G technologies. The following evolution will be based on 4G that will boost the dream of having a REAL wireless world. Thus, 5G should make an important difference and add more services and benefit to the world over 4G; 5G should be a more intelligent technology that interconnects the entire world without limits.


/////////////////////////////////////////////////////////////////////////////////////

Saturday, November 26, 2011

Make 3D-World Using 3D Studio Max


hi friends,,,

I am working on 3D Studio Max since last 5 year,,, i started working on this software during my first year of BCA. And its really make my life very colorful.

I learn 3D-Max my self just using its default help so its help is really very good to understand.


I made 3 movie clip and more than 150 3D photo and more than 10 3D paper presentation which presented at National Level. So using this 3D software we present some different and attractive thing which is really different and helpful to us. So this is basic profile on 3D-Max……


Now some focus of real application of 3D-Max,,,,, Now a day many of 3D animated movie and cartoon are making in 3D-Max e.g. Krishna , Fish, Cars and many Advertise like Vodafone, Samsung and many more so now you can imagine the power of this kind of software..


3D-Max are generally use in 3D-Object making and its Animation so this object work are really very easy so 3D-Max are most popular but ,,,,,


You cant give real visualize and special effect in 3D-Max , here you can give effect but its not compare to good as MAYA….


MAYA is also one of the best product in 3D-World here you can give real special effect and also you can make 3D-Object but making object are very complex compare to 3D-Max,,,,


3D-Max is product of Auto-Desk so Auto-Desk now adopt MAYA also so now you can think about this both package….


You can learn more about 3D-Max by google and its fully available at Auto-Desk site and its default help are automatically installed during installation of software.


So friends install and try for making your life colorful if you have any doubt than I am always here so you can contact me by simple reply.


I am also attach one 3D-Photo which is developed by me using 3D-Max .

So best of luck to all…………….




Saturday, January 8, 2011

Cloud Computing

hi All Friends

The Cloud Computing is becoming one of the next industry. Now a day many company are looking for Cloud Computing. Basically Cloud Computing is internet based computing whereby shared resources, software and information are provided to computer and other device on demand....

Whats happen!!!! When Reliance store its all data in its own data center now you can assume that Reliance which is in top 5 in world so how much it has data there are trillions of data are daily updated in their firm so....

At that time storage of data and manipulation of data are very complex and costly and also have many risk to maintain so.....

The best solution is keep this data in External Data Center.....
Now a day Developing a Data Center is one of business and many of company are making its futures in Data Center.

So, Storage of data into external Data Center and also we can access as per our requirement so this simply process called Cloud Computing......

So, This is service base process like SASS (Software As Service) in which user can use software online without install to it and its free.

The main advantages of Cloud Computing is that
provide fast access of data ,
provide a service base on subscription plan,
provide security of data with private key to all subscribed user,
provide insurance of data.
its better than Grid Computing,
and many more......

So, This basic contain not enough to say what is Cloud Computing now you can assume that how much its important in Real World so,,,,,,,,,,,,,,,,, Cloud- Computing is Future Of Information Technology so,,
be ready with your self to jump in Cloud- Computing with full of zing and knowledge

So,,, after this basic information you have to know more about Cloud Computing and make your future bright in IT.......

Best of Luck To All
===========================================================
Written By:----------Patel Anvesh (BCA, MCA, DBA) (Mono: 9429583087)

Wednesday, December 8, 2010

3 tier Arc. Connection using VB.NET with SQL Server


Connection.vb
Imports System.Configuration
Imports System.Data.SqlClient
Public Class DBConnection
    Private objConnection As SqlConnection
    Public Shared ConnectionString As String = System.Configuration.ConfigurationManager.AppSettings.Get("con")
    'Data Source=AMIT-PC;Initial Catalog=AMP;Integrated Security=True
    Public Shared CurrentYear As String
    Public Shared CurrentDB As String
    Public WriteOnly Property SetConnection() As String

        Set(ByVal Value As String)
            objConnection = New SqlConnection(Value)
        End Set
    End Property
    Public ReadOnly Property GetConnection() As SqlConnection
        Get
            Return objConnection
        End Get
    End Property
    Public Sub New(ByVal ConnectionString As String)
        Try
            SetConnection = ConnectionString
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Sub New()
        Try
            Dim ConnectionString As String = DBConnection.ConnectionString
            SetConnection = ConnectionString
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    ' This method use for Open connection
    Public Sub OpenConnection()
        Try
            GetConnection.Open()
        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    ' This method use for Close connection
    Public Sub CloseConnection()
        Try
            GetConnection.Close()
        Catch ex As Exception
            Throw ex
        End Try
    End Sub

End Class

Operation.vb
Imports System.Data.SqlClient
Imports System.Collections

Public Class DBOperation
    Public objConnection As DBConnection
    Private _objTransaction As SqlTransaction

#Region "Constructor"
    Public Sub New()
        objConnection = New DBConnection
    End Sub
#End Region

#Region " Property"
    Public ReadOnly Property ConnectionObject() As SqlConnection
        Get
            Return objConnection.GetConnection
        End Get
    End Property
    Public ReadOnly Property Transaction() As SqlTransaction
        Get
            Return _objTransaction
        End Get
    End Property
#End Region

#Region "Other"
    Public Function StartNewTransaction() As SqlTransaction
        Try

            If objConnection.GetConnection.State = ConnectionState.Closed Or _
                objConnection.GetConnection.State = ConnectionState.Broken Then
                objConnection.GetConnection.Open()
            End If
            _objTransaction = ConnectionObject.BeginTransaction()
            Return _objTransaction
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Sub CloseConnection()
        Try
            If ConnectionObject.State <> ConnectionState.Broken And _
                ConnectionObject.State <> ConnectionState.Closed Then objConnection.CloseConnection()
        Catch ex As Exception
        End Try
    End Sub

    '' This method use for exceute Sql command which is return first column of First row object
    'Public Function executeScalar(ByVal commandString As String) As Object
    '    Dim objResult As Object
    '    Try

    '        Dim objSqlCommand As New SqlCommand
    '        objSqlCommand.CommandTimeout = 500
    '        Try
    '            With objSqlCommand
    '                .CommandText = commandString
    '                .CommandType = CommandType.StoredProcedure
    '                .Connection = objConnection.GetConnection
    '            End With
    '            If objConnection.GetConnection.State = ConnectionState.Closed Then objConnection.OpenConnection()
    '            objResult = objSqlCommand.ExecuteScalar
    '        Catch ex As Exception
    '            Throw ex
    '            objResult = Nothing
    '        Finally
    '            objConnection.CloseConnection()
    '        End Try
    '    Catch ex As Exception
    '        Throw ex
    '        objResult = Nothing
    '    End Try
    '    Return objResult
    'End Function

    ' This method use for exceute Sql command (insert,update,delete) which is return no. of Updated rows
    Public Function executeNonQuery(ByVal CommandString As String) As Integer
        Dim intResult As Integer
        Try
            Dim objSqlCommand As New SqlCommand
            objSqlCommand.CommandTimeout = 500
            Try

                With objSqlCommand
                    .CommandText = CommandString
                    .CommandType = CommandType.StoredProcedure
                    .Connection = objConnection.GetConnection
                End With
                If objConnection.GetConnection.State = ConnectionState.Closed Then objConnection.OpenConnection()
                intResult = objSqlCommand.ExecuteNonQuery
            Catch ex As Exception
                Throw ex
                intResult = Nothing
            Finally
                objConnection.CloseConnection()
            End Try
        Catch ex As Exception
            Throw ex
            intResult = Nothing
        End Try
        Return intResult
    End Function

    ' This method use for exceute Sql command (select) which is return rows
    Public Function execute(ByVal CommandString As String) As DataSet
        Dim dsResult As DataSet
        Dim objSqlCommand As New SqlCommand
        objSqlCommand.CommandTimeout = 500
        Dim objSqlDataAdapter As New SqlDataAdapter
        Try
            With objSqlCommand
                .CommandText = CommandString
                .CommandType = CommandType.StoredProcedure
                .Connection = objConnection.GetConnection
            End With

            objSqlDataAdapter.SelectCommand = objSqlCommand

            dsResult = New DataSet
            objSqlDataAdapter.Fill(dsResult)
        Catch ex As Exception
            Throw ex
            dsResult = Nothing
        End Try

        Return dsResult
    End Function

    ' '' This method use for exceute Sql command with Parameter which is return first column of First row object
    'Public Function executeScalar(ByVal commandString As String, ByVal parameter As ICollection) As Object
    '    Dim objResult As Object
    '    Try
    '        Dim objIEnumerator As IEnumerator
    '        Dim objSqlCommand As New SqlCommand
    '        objSqlCommand.CommandTimeout = 500
    '        Try
    '            objIEnumerator = parameter.GetEnumerator
    '            With objSqlCommand
    '                .CommandText = commandString
    '                .CommandType = CommandType.StoredProcedure
    '                .Connection = objConnection.GetConnection
    '            End With
    '            objSqlCommand.Parameters.Clear()
    '            While objIEnumerator.MoveNext
    '                objSqlCommand.Parameters.Add(objIEnumerator.Current)
    '            End While
    '            If objConnection.GetConnection.State = ConnectionState.Closed Then objConnection.OpenConnection()
    '            objResult = objSqlCommand.ExecuteScalar
    '        Catch ex As Exception
    '            Throw ex
    '            objResult = Nothing
    '        Finally
    '            objConnection.CloseConnection()
    '        End Try
    '    Catch ex As Exception
    '        Throw ex
    '        objResult = Nothing
    '    End Try
    '    Return objResult
    'End Function
    'Public Function executeScalar(ByVal commandString As String, ByVal parameter As ICollection, ByVal objTran As SqlClient.SqlTransaction) As Object
    '    Dim objResult As Object
    '    Try
    '        Dim objIEnumerator As IEnumerator
    '        Dim objSqlCommand As New SqlCommand
    '        objSqlCommand.CommandTimeout = 500
    '        Try
    '            objIEnumerator = parameter.GetEnumerator
    '            With objSqlCommand
    '                .CommandText = commandString
    '                .CommandType = CommandType.StoredProcedure
    '                .Connection = objConnection.GetConnection
    '                .Transaction = objTran
    '            End With
    '            objSqlCommand.Parameters.Clear()
    '            While objIEnumerator.MoveNext
    '                objSqlCommand.Parameters.Add(objIEnumerator.Current)
    '            End While
    '            If objConnection.GetConnection.State = ConnectionState.Closed Then objConnection.OpenConnection()
    '            objResult = objSqlCommand.ExecuteScalar
    '        Catch ex As Exception
    '            Throw ex
    '            objResult = Nothing
    '        Finally
    '            objConnection.CloseConnection()
    '        End Try
    '    Catch ex As Exception
    '        Throw ex
    '        objResult = Nothing
    '    End Try
    '    Return objResult
    'End Function

    ' This method use for exceute Sql command (insert,update,delete) with Parameter which is return no. of Updated rows
    Public Function executeNonQuery(ByVal CommandString As String, ByVal parameter As ICollection, _
        Optional ByRef ErrorCode As Integer = 0) As Integer
        Dim intResult As Integer
        Try
            Dim objIEnumerator As IEnumerator
            Dim objSqlCommand As New SqlCommand
            objSqlCommand.CommandTimeout = 500
            Try
                objIEnumerator = parameter.GetEnumerator
                With objSqlCommand
                    .CommandText = CommandString
                    .CommandType = CommandType.StoredProcedure
                    .Connection = objConnection.GetConnection
                End With
                objSqlCommand.Parameters.Clear()
                While objIEnumerator.MoveNext
                    objSqlCommand.Parameters.Add(objIEnumerator.Current)
                End While
                If objConnection.GetConnection.State = ConnectionState.Closed Then objConnection.OpenConnection()
                intResult = objSqlCommand.ExecuteNonQuery
            Catch exsql As SqlException
                ErrorCode = exsql.ErrorCode
                Throw exsql
            Catch ex As Exception
                Throw ex
                intResult = Nothing
            Finally
                objConnection.CloseConnection()
            End Try
        Catch ex As Exception
            Throw ex
            intResult = Nothing
        End Try
        Return intResult
    End Function

    ' This method use for exceute Sql command (insert,update,delete) with Parameter which is return no. of Updated rows
    ' This is exclusively used for transcations.
    Public Function executeNonQuery(ByVal CommandString As String, ByVal parameter As ICollection, _
    ByVal objTransaction As SqlTransaction, Optional ByRef ErrorCode As Integer = 0) As Integer
        Dim intResult As Integer
        Try
            Dim objIEnumerator As IEnumerator
            Dim objSqlCommand As New SqlCommand
            objSqlCommand.CommandTimeout = 500
            Try
                objIEnumerator = parameter.GetEnumerator
                With objSqlCommand
                    .CommandText = CommandString
                    .CommandType = CommandType.StoredProcedure
                    .Connection = objTransaction.Connection
                    .Transaction = objTransaction
                End With
                objSqlCommand.Parameters.Clear()
                While objIEnumerator.MoveNext
                    objSqlCommand.Parameters.Add(objIEnumerator.Current)
                End While
                intResult = objSqlCommand.ExecuteNonQuery
            Catch exsql As SqlException
                ErrorCode = exsql.ErrorCode
                Throw exsql
            Catch ex As Exception
                Throw ex
                intResult = Nothing
            End Try
        Catch ex As Exception
            Throw ex
            intResult = Nothing
        End Try
        Return intResult
    End Function

    ' This method use for exceute Sql command (select) with Parameter which is return rows
    Public Function execute(ByVal CommandString As String, ByVal parameter As ICollection) As DataSet
        Dim dsResult As DataSet
        Dim objIEnumerator As IEnumerator
        Dim objSqlCommand As New SqlCommand
        objSqlCommand.CommandTimeout = 500
        Dim objSqlDataAdapter As New SqlDataAdapter
        Try
            objIEnumerator = parameter.GetEnumerator
            With objSqlCommand
                .CommandText = CommandString
                .CommandType = CommandType.StoredProcedure
                .Connection = objConnection.GetConnection
            End With
            objSqlCommand.Parameters.Clear()
            While objIEnumerator.MoveNext
                objSqlCommand.Parameters.Add(objIEnumerator.Current)
            End While
            objSqlDataAdapter.SelectCommand = objSqlCommand
            dsResult = New DataSet

            objSqlDataAdapter.Fill(dsResult)
        Catch ex As Exception
            Throw ex
            dsResult = Nothing
        End Try
        Return dsResult
    End Function
    Public Function execute(ByVal CommandString As String, ByVal parameter As ICollection, ByVal objTran As SqlClient.SqlTransaction) As DataSet
        Dim dsResult As DataSet

        Dim objIEnumerator As IEnumerator
        Dim objSqlCommand As New SqlCommand
        objSqlCommand.CommandTimeout = 500
        Dim objSqlDataAdapter As New SqlDataAdapter
        Try
            objIEnumerator = parameter.GetEnumerator
            With objSqlCommand
                .CommandText = CommandString
                .CommandType = CommandType.StoredProcedure
                .Connection = objConnection.GetConnection
                .Transaction = objTran
            End With
            objSqlCommand.Parameters.Clear()
            While objIEnumerator.MoveNext
                objSqlCommand.Parameters.Add(objIEnumerator.Current)
            End While
            objSqlDataAdapter.SelectCommand = objSqlCommand
            dsResult = New DataSet
            objSqlDataAdapter.Fill(dsResult)
        Catch ex As Exception
            Throw ex
            dsResult = Nothing

        End Try

        Return dsResult
    End Function

    'Public Function ExecuteSQL(ByVal sSql As String) As DataSet
    '    Dim dsResult As DataSet

    '    Dim objSqlCommand As New SqlCommand
    '    objSqlCommand.CommandTimeout = 500
    '    Dim objSqlDataAdapter As New SqlDataAdapter
    '    Try
    '        With objSqlCommand
    '            .CommandText = sSql
    '            .CommandType = CommandType.Text
    '            .Connection = objConnection.GetConnection
    '        End With
    '        objSqlCommand.Parameters.Clear()
    '        objSqlDataAdapter.SelectCommand = objSqlCommand
    '        dsResult = New DataSet
    '        objSqlDataAdapter.Fill(dsResult)
    '    Catch ex As Exception
    '        Throw ex
    '        dsResult = Nothing
    '    End Try
    '    Return dsResult
    'End Function

    ''Executes sql query for scalar output (first column of first row)
    'Public Function ExecuteSQLScalar(ByVal sSql As String) As Object
    '    Dim objResult As Object
    '    Try
    '        Dim objSqlCommand As New SqlCommand
    '        objSqlCommand.CommandTimeout = 500
    '        Try
    '            With objSqlCommand
    '                .CommandText = sSql
    '                .CommandType = CommandType.Text
    '                .Connection = objConnection.GetConnection
    '            End With
    '            If objConnection.GetConnection.State = ConnectionState.Closed Then objConnection.OpenConnection()
    '            objResult = objSqlCommand.ExecuteScalar
    '        Catch ex As Exception
    '            Throw ex
    '            objResult = Nothing
    '        Finally
    '            objConnection.CloseConnection()
    '        End Try
    '    Catch ex As Exception
    '        Throw ex
    '        objResult = Nothing
    '    End Try
    '    Return objResult
    'End Function
    'Public Function ExecuteDirect(ByVal CommandString As String) As DataSet
    '    Dim dsResult As DataSet

    '    Dim objSqlCommand As New SqlCommand
    '    objSqlCommand.CommandTimeout = 500
    '    Dim objSqlDataAdapter As New SqlDataAdapter
    '    Try
    '        With objSqlCommand
    '            .CommandText = CommandString
    '            .CommandType = CommandType.Text
    '            .Connection = objConnection.GetConnection
    '        End With
    '        objSqlCommand.Parameters.Clear()
    '        objSqlDataAdapter.SelectCommand = objSqlCommand
    '        dsResult = New DataSet
    '        objSqlDataAdapter.Fill(dsResult)
    '    Catch ex As Exception
    '        Throw ex
    '        dsResult = Nothing
    '    End Try
    '    Return dsResult
    'End Function
#End Region

End Class



BAL
CountryMasterBL.vb
Imports DAL
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Collections

Public Class CountryMasterBL
    Public CountryID As String = String.Empty
    Public CountryName As String
    Public objDBOperation As New DAL.DBOperation

    Public Function Save() As Boolean
        Dim blnReturn As Boolean = False
        Try
            Dim alparameter As New ArrayList
            Dim spName As String = "SP_COUNTRY_MASTER_INSERT_UPDATE"
            Dim flag As Integer = 1
            If CountryID.ToString().Length = 0 Then
                CountryID = Guid.NewGuid().ToString()
                flag = 0
            End If
            alparameter.Add(New SqlParameter("@CountryId", CountryID))
            alparameter.Add(New SqlParameter("@CountryName", CountryName))
            alparameter.Add(New SqlParameter("@CountryCode", 12))
            alparameter.Add(New SqlParameter("@Flag", flag))
            blnReturn = objDBOperation.executeNonQuery(spName, alparameter)
        Catch ex As Exception
            Throw ex
        End Try
        Return blnReturn
    End Function
    Public Function Search() As DataSet
        Dim ds As New DataSet
        Try
            Dim alparameter As New ArrayList
            Dim spName As String = "SP_COUNTRY_MASTER_SEARCH"
            alparameter.Add(New SqlParameter("@CountryId", CountryID))
            ds = objDBOperation.execute(spName, alparameter)
        Catch ex As Exception
            Throw ex
        End Try
        Return ds
    End Function

    Public Function Delete() As Integer
        Dim intResult As Integer
        Try
            Dim alparameter As New ArrayList
            Dim spName As String = "SP_COUNTRY_MASTER_DELETE"
            alparameter.Add(New SqlParameter("@CountryId", CountryID))
            intResult = objDBOperation.executeNonQuery(spName, alparameter)
        Catch ex As Exception
            Throw ex
        End Try
        Return intResult
    End Function
End Class


App.config
xml version="1.0" encoding="utf-8" ?>
<configuration>


  <appSettings>
    <add key="con" value="Data Source=AMIT-PC;Initial Catalog=AMP;Integrated Security=True"/>
    <add key="Server" value="AMIT-PC"/>
    <add key="Database" value="AMP"/>
    <add key="UserId" value=""/>
    <add key="Password" value=""/>
   
  appSettings>
 
 
    <system.diagnostics>
        <sources>
           
            <source name="DefaultSource" switchName="DefaultSwitch">
                <listeners>
                    <add name="FileLog"/>
                   
                   
                listeners>
            source>
        sources>
        <switches>
            <add name="DefaultSwitch" value="Information" />
        switches>
        <sharedListeners>
            <add name="FileLog"
                 type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
                 initializeData="FileLogWriter"/>
           
           
        sharedListeners>
    system.diagnostics>
configuration>


Fomr1.vb
Imports BAL
Public Class Form1
    Dim CountryId As String
    Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
        Try
            Dim objsave As New CountryMasterBL
            objsave.CountryID = CountryId
            objsave.CountryName = txtCountryName.Text
            If Not objsave.Save() <> 1 Then
                MsgBox("Record not Save")
            Else
                MsgBox("Record Save")
                FillGrid()
                txtCountryName.Text = ""
            End If
        Catch ex As Exception

        End Try
    End Sub

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        FillGrid()
    End Sub

    Public Sub FillGrid()
        CountryId = ""
        Dim objsearch As New CountryMasterBL
        objsearch.CountryID = CountryId
        Dim dT As DataTable
        dT = objsearch.Search().Tables(0)
        grdCountry.DataSource = dT



    End Sub


    Private Sub grdCountry_RowHeaderMouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles grdCountry.RowHeaderMouseDoubleClick
        CountryId = grdCountry.SelectedCells.Item(0).Value
        txtCountryName.Text = grdCountry.SelectedCells.Item(1).Value
    End Sub

    Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click
        Dim objDelete As New CountryMasterBL
        objDelete.CountryID = CountryId
        Dim bDelete As Boolean = objDelete.Delete()
        If bDelete = True Then
            MsgBox("Record Deleted")
            FillGrid()
        Else
            MsgBox("Record Not Deleted")
        End If
    End Sub

    Private Sub Update_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Update.Click
        Dim objupdate As New CountryMasterBL
        objupdate.CountryID = CountryId
        objupdate.CountryName = txtCountryName.Text
        If Not objupdate.Save() <> 1 Then
            MsgBox("Record not Updated")
        Else
            MsgBox("Record Updated")
            FillGrid()
            txtCountryName.Text = ""
        End If
    End Sub
End Class

SP_COUNTRY_MASTER_DELETE


USE [AMP]
GO
/****** Object:  StoredProcedure [dbo].[SP_COUNTRY_MASTER_DELETE]    Script Date: 07/05/2012 06:49:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[SP_COUNTRY_MASTER_DELETE]
(
      @CountryId VARCHAR(50)
)
AS
IF EXISTS(SELECT 1 FROM STATE_MASTER WHERE
                  STATE_MASTER.COUNTRYID=@CountryId)
BEGIN
RAISERROR('Reference Exists for this item , can not delete',16,1)
return
END

DELETE FROM COUNTRY_MASTER WHERE CountryId=@CountryId

SP_COUNTRY_MASTER_SEARCH

USE [AMP]
GO
/****** Object:  StoredProcedure [dbo].[SP_COUNTRY_MASTER_SEARCH]    Script Date: 07/05/2012 06:52:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[SP_COUNTRY_MASTER_SEARCH]
(
      @CountryId varchar(50) = ''
)
as
if @CountryId=''
begin
select CountryId,CountryName,CountryCode
            from Country_Master    
Order By CountryName   

end
else
begin
select CountryId,CountryName,CountryCode
            from Country_Master
            where CountryId = @CountryId
end

SP_COUNTRY_MASTER_INSERT_UPDATE
USE [AMP]
GO
/****** Object:  StoredProcedure [dbo].[SP_COUNTRY_MASTER_INSERT_UPDATE]    Script Date: 07/05/2012 06:54:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[SP_COUNTRY_MASTER_INSERT_UPDATE]
(
      @CountryId varchar(50),
      @CountryName varchar(50),
      @CountryCode varchar(50),
      @Flag int
)
AS
if @flag = 0
      begin
            IF EXISTS(SELECT 1 FROM Country_Master WHERE CountryName=@CountryName)
            BEGIN
            RAISERROR('Country name already exists.. Cannot be inserted',16,1)
                        RETURN     
            END
            insert into Country_Master (CountryId,CountryName,CountryCode)
                              values(@CountryId,@CountryName,@CountryCode)
      end
else
      begin
      IF EXISTS(SELECT 1 FROM Country_Master WHERE  CountryName=@CountryName  and CountryId != @CountryId)
            BEGIN
            RAISERROR('Country name already exists.. Cannot be edited',16,1)
                        RETURN     
            END
            update Country_Master set
                        CountryName =@CountryName,
                        CountryCode = @CountryCode
                  where CountryId =@CountryId
end