Click here to Skip to main content
15,886,074 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Database support for a website Pin
Braulio Dez29-Oct-07 4:22
Braulio Dez29-Oct-07 4:22 
QuestionCombo Box A-Z Validation Pin
kunal_gct28-Oct-07 20:33
kunal_gct28-Oct-07 20:33 
QuestionMail sending problem Pin
Lijo Rajan28-Oct-07 20:25
Lijo Rajan28-Oct-07 20:25 
AnswerRe: Mail sending problem Pin
Ghazi H. Wadi28-Oct-07 21:07
Ghazi H. Wadi28-Oct-07 21:07 
GeneralRe: Mail sending problem Pin
Lijo Rajan28-Oct-07 21:20
Lijo Rajan28-Oct-07 21:20 
GeneralRe: Mail sending problem Pin
Braulio Dez29-Oct-07 4:26
Braulio Dez29-Oct-07 4:26 
GeneralRe: Mail sending problem Pin
Ghazi H. Wadi29-Oct-07 10:43
Ghazi H. Wadi29-Oct-07 10:43 
QuestionRegarding Layers Pin
Satish_S28-Oct-07 19:53
Satish_S28-Oct-07 19:53 
Hi

This is the first time i am using Layers in My project,but still i need to whether i am using the three layers correctly or not. Please check my code and tell where i am getting lacked or wrong. I hope your support will lead me in a right way.


In My Presentation Layer i Have following

<br />
<br />
 Private Sub btnSave_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.ServerClick<br />
        Dim myBLL As New NitemBLL<br />
        myBLL.Group = CInt(Me.txtBG.Value)<br />
        dgFilter.DataSource = myBLL.Getrecords()<br />
        dgFilter.DataBind()<br />
    End Sub<br />
<br />



In My Bussiness Logic Layer i Have following

<br />
Public Class NitemBLL<br />
    Private _groupID As Integer<br />
    Private _rhID As String = String.Empty<br />
    Private _unitNo As String = String.Empty<br />
    Public Property Group() As Integer<br />
        Get<br />
            Return _groupID<br />
        End Get<br />
        Set(ByVal Value As Integer)<br />
            _groupID = Value<br />
        End Set<br />
    End Property<br />
    Public Property RH() As String<br />
        Get<br />
            Return _rhID<br />
        End Get<br />
        Set(ByVal value As String)<br />
            _rhID = value<br />
        End Set<br />
    End Property<br />
    Public Property Unit() As String<br />
        Get<br />
            Return _unitNo<br />
        End Get<br />
        Set(ByVal value As String)<br />
            _unitNo = value<br />
        End Set<br />
    End Property<br />
    Public Function Getrecords() As DataSet<br />
        Dim nn As New NitemDAL<br />
        Return nn.Getrecord(Group)<br />
    End Function<br />


In My Data Access Layer i Have following

<br />
Public Class NitemDAL<br />
<br />
    Public Function Getrecord(ByVal groupid As Integer) As DataSet<br />
        Dim oMyDataset As New DataSet<br />
        Dim oMyAdapter As New SqlDataAdapter<br />
        Dim oMyConn As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("BBM_CONSTR"))<br />
        Dim oMyCommand As SqlCommand = New SqlCommand("select cBB_Unit_No,convert(varchar(10),dBB_Donate_dt,105)[date] from blood_donate where iBloodgroup_id=" & groupid)<br />
        oMyCommand.Connection = oMyConn<br />
        oMyCommand.CommandType = CommandType.Text<br />
        Try<br />
            oMyConn.Open()<br />
            oMyAdapter.SelectCommand = oMyCommand<br />
            oMyAdapter.Fill(oMyDataset)<br />
            oMyCommand.ExecuteNonQuery()<br />
            oMyConn.Close()<br />
        Catch ex As Exception<br />
            ex.Message.ToString()<br />
        End Try<br />
        If oMyDataset.Tables(0).Rows.Count > 0 Then<br />
            Return oMyDataset<br />
        End If<br />
    End Function<br />
<br />



I am not getting any errors. i am getting the Data Grid filled with correct values.

sathimailin
AnswerRe: Regarding Layers Pin
N a v a n e e t h28-Oct-07 20:21
N a v a n e e t h28-Oct-07 20:21 
GeneralRe: Regarding Layers Pin
Satish_S28-Oct-07 20:41
Satish_S28-Oct-07 20:41 
GeneralRe: Regarding Layers Pin
N a v a n e e t h28-Oct-07 20:56
N a v a n e e t h28-Oct-07 20:56 
GeneralRe: Regarding Layers Pin
Satish_S28-Oct-07 21:09
Satish_S28-Oct-07 21:09 
GeneralRe: Regarding Layers Pin
N a v a n e e t h28-Oct-07 21:12
N a v a n e e t h28-Oct-07 21:12 
GeneralRe: Regarding Layers Pin
Satish_S29-Oct-07 2:26
Satish_S29-Oct-07 2:26 
GeneralRe: Regarding Layers Pin
N a v a n e e t h29-Oct-07 18:31
N a v a n e e t h29-Oct-07 18:31 
GeneralRe: Regarding Layers Pin
Satish_S29-Oct-07 20:53
Satish_S29-Oct-07 20:53 
GeneralRe: Regarding Layers Pin
N a v a n e e t h29-Oct-07 22:24
N a v a n e e t h29-Oct-07 22:24 
GeneralRe: Regarding Layers Pin
Satish_S30-Oct-07 21:18
Satish_S30-Oct-07 21:18 
QuestionHow to add Button click event?? Pin
varshavmane28-Oct-07 19:35
varshavmane28-Oct-07 19:35 
AnswerRe: How to add Button click event?? Pin
N a v a n e e t h28-Oct-07 19:44
N a v a n e e t h28-Oct-07 19:44 
GeneralRe: How to add Button click event?? Pin
varshavmane28-Oct-07 20:06
varshavmane28-Oct-07 20:06 
GeneralRe: How to add Button click event?? Pin
N a v a n e e t h28-Oct-07 20:24
N a v a n e e t h28-Oct-07 20:24 
AnswerRe: How to add Button click event?? Pin
soni uma28-Oct-07 19:46
soni uma28-Oct-07 19:46 
QuestionTextBox Multiline Mode is not working in Content Placeholder ****** Pin
VenkataRamana.Gali28-Oct-07 19:30
VenkataRamana.Gali28-Oct-07 19:30 
AnswerRe: TextBox Multiline Mode is not working in Content Placeholder ****** Pin
soni uma28-Oct-07 19:55
soni uma28-Oct-07 19:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.