Devils Work

—Blog By DotNetRuler

About

will be updated sooon..

Advertisements

5 Responses to “About”

  1. Rajesh said

    Awesome work man…keep continuing such a good work…cheers …

  2. Harish said

    u simply rock dude \m/:)

  3. Frances said

    I sampled this posting for my application. but I do not know why I get the error.

    https://devilswork.wordpress.com/

    System.NullReferenceException was unhandled by user code
    Message=”Object reference not set to an instance of an object.”

    I did the test.

    gvManager_RowUpdating called twice. The first time without error. but the second time error occure.

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If IsPostBack = False Then

    FillManagerInGrid()

    End If

    End Sub

    Protected Sub gvManager_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles gvManager.DataBound

    End Sub

    Protected Sub gvManager_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles gvManager.RowCancelingEdit
    If gvManager.EditIndex = -1 Then

    FillManagerInGrid()

    End If

    End Sub

    Private Sub FillManagerInGrid(ByVal s As String)

    Dim ds As New DataSet
    If EduConn.State = ConnectionState.Closed Then

    EduConn.ConnectionString = ConfigurationManager.ConnectionStrings(“Helpdesk”).ConnectionString
    EduConn.Open()

    End If

    Dim comEdu As New SqlCommand()
    Dim dpEdu As New SqlDataAdapter(comEdu)

    Try

    With comEdu
    .CommandType = CommandType.Text

    .CommandText = s + “; select * from dbo.PendingLogin”

    .Connection = EduConn

    End With

    dpEdu.Fill(ds)

    gvManager.DataSource = ds

    gvManager.DataBind()

    EduConn.Close()

    Catch objError As Exception
    Exit Try

    Finally

    EduConn.Close()

    End Try

    End Sub

    Private Sub FillManagerInGrid()
    Dim ds As New DataSet

    If EduConn.State = ConnectionState.Closed Then

    EduConn.ConnectionString = ConfigurationManager.ConnectionStrings(“Helpdesk”).ConnectionString
    EduConn.Open()

    End If

    Dim comEdu As New SqlCommand()
    Dim dpEdu As New SqlDataAdapter(comEdu)

    Try

    With comEdu
    .CommandType = CommandType.Text

    .CommandText = “select * from dbo.PendingLogin”

    .Connection = EduConn

    End With

    dpEdu.Fill(ds)

    gvManager.DataSource = ds

    gvManager.DataBind()

    EduConn.Close()

    Catch objError As Exception

    Exit Try

    Finally

    EduConn.Close()

    End Try

    End Sub

    Protected Sub gvManager_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles gvManager.RowDeleting

    Dim sID As String

    sID = gvManager.DataKeys(e.RowIndex).Value.ToString

    Dim s As String

    s = “delete dbo.PendingLogin where PendingLogin.HID = ” + sID
    FillManagerInGrid(s)

    End Sub

    Protected Sub gvManager_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles gvManager.RowEditing
    gvManager.EditIndex = e.NewEditIndex

    FillManagerInGrid()

    End Sub

    Protected Sub gvManager_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles gvManager.RowUpdating
    Dim s As String = gvManager.DataKeys(e.RowIndex).Value.ToString

    Dim ckWin As CheckBox = TryCast(gvManager.Rows(e.RowIndex).FindControl(“ckWincoachE”), CheckBox)
    Dim ckAEdu As CheckBox = DirectCast(gvManager.Rows(e.RowIndex).FindControl(“ckAnnualEduE”), CheckBox)

    Dim ckCEdu As CheckBox = DirectCast(gvManager.Rows(e.RowIndex).FindControl(“ckClinicalEduE”), CheckBox)Dim txtUserE As TextBox = DirectCast(gvManager.Rows(e.RowIndex).FindControl(“txtUserE”), TextBox)

    Dim intWin As Int16 = 0

    Dim intAEdu As Int16 = 0
    Dim intCedu As Int16 = 0

    If ckAEdu.Checked = True Then

    intAEdu = 1

    Else

    intAEdu = 0

    End If

    If ckWin.Checked = True Then

    intWin = 1

    Else

    intWin = 0

    End If

    If ckCEdu.Checked = True Then

    intCedu = 1

    Else

    intCedu = 0

    End If

    Dim UpdateQuery As String

    UpdateQuery = “update dbo.PendingLogin set AnnualEdu = ” & intAEdu & ” , [User]='” & txtUserE.Text & “‘ ,WinCoach=” & intWin & ” , ClinicalEdu= ” & intCedu & ” where HID='” & s & “‘”

    gvManager.EditIndex = -1

    FillManagerInGrid(UpdateQuery)

    End Sub

    Holy Redeemer Health
    System

           

    espsecurity

    Intranet Education Screen

    Existing Pending Request(s) List

    Only grant the privilege when you receive the signature form from manager

    Password Reset Intranet Edu

    <asp:label ID=”Last” runat=”server” Text=”>

    <asp:Label ID=”lblLast” runat=”server” Text=”>

    <asp:label ID=”First” runat=”server” Text=”>

    <asp:label ID=”lblFirst” runat=”server” Text=”>

    <asp:Textbox ID=”txtUserE” runat=”server” Text=”>

    <asp:Label ID=”lblUser” runat=”server” Text=”>

    <asp:checkbox ID=”ckAnnualEduE” runat=”server” Checked=”>

    <asp:checkbox ID=”ckAnnualEdu” Enabled =false runat=”server” Checked=”>

    <asp:checkbox ID=”ckClinicalEduE” runat=”server” Checked=”>

    <asp:checkbox ID=”ckClinicalEduA” runat=”server” Checked=”>

    <asp:checkbox ID=”ckClinicalEdu” Enabled =false runat=”server” Checked=”>

    <asp:checkbox ID=”ckWinCoachE” runat=”server” Checked=”>

    <asp:checkbox ID=”ckWinCoachA” runat=”server” Checked=”>

    <asp:checkbox ID=”ckWinCoach” Enabled =false runat=”server” Checked=”>

  4. mahi said

    sir i want to know how to work with classes in asp.net.. can u please do post a topic regarding complete concept of classes and how to use it in different classes..
    thanx in advance

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: