Business Acces Layer in 3 Tier architecture in Asp.net

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using GRMI.DiverseFund.SqlDBDiverseFundDataAccessLayer;
using GRMI.DiverseFund.SqlDBDiverseFundBal;


namespace GRMI.DiverseFund.SqlDBDiverseFundBal
{
    public class InvestorBackerMethods
    {
        InvestorBackerResponse objIbr = new InvestorBackerResponse();

        public InvestorBackerResponse InsertPeerFundingInformation(InvestorBackerProperties objIbp)
        {
            SqlParameter[] p = new SqlParameter[]
            {
                new SqlParameter("@ProfileID", System.Guid.NewGuid().ToString().Substring(4, 19).ToUpper()),
                new SqlParameter("@InvestorBackerType", objIbp.InvestorBackerType),
                new SqlParameter("@InvestorBackerReferenceID",  objIbp.InvestorBackerReferenceId),
                new SqlParameter("@IsTermsAccepted",  objIbp.IsTermsAccepted),
                new SqlParameter("@DisplayName",  objIbp.DisplayName),
              

                new SqlParameter("@MembershipTypeId",  objIbp.MembershipId),
            };

            objIbr.ResultCount = UseDatabaseElements.ExecuteInsertUpdateQuery("spDF_InsertInvBacMaster", p);
            return objIbr;

        }
        public InvestorBackerResponse UpdatePeerFundingInformation(InvestorBackerProperties objIbp)
        {
            SqlParameter[] p = new SqlParameter[]
            {
               new SqlParameter("@ProfileID", objIbp.ProfileId),
               new SqlParameter("@InvestorBackerType", objIbp.InvestorBackerType),
               new SqlParameter("@InvestorBackerReferenceID", objIbp.InvestorBackerReferenceId),
               new SqlParameter("@IsTermsAccepted",objIbp.IsTermsAccepted),
               new SqlParameter("@DisplayName", objIbp.DisplayName),
               new SqlParameter("@ElectronicSignature", objIbp.ElectronicSignature),
               new SqlParameter("@FirstName ", objIbp.FirstName),
               new SqlParameter("@MiddleName ", objIbp.MiddleName),
               new SqlParameter("@LastName ",objIbp.LastName),
              

               new SqlParameter("@BActive", objIbp.BActive),
            };

            objIbr.ResultCount = UseDatabaseElements.ExecuteInsertUpdateQuery("spDF_InsertInvBacMaster", p);
            return objIbr;
        }
        public InvestorBackerResponse GetAllDropDown()
        {
            objIbr.GetMultipleTable = UseDatabaseElements.FetchMultipleTable("spFR_GetInfoParameters");
            return objIbr;
        }

        public InvestorBackerResponse GetInvestorDetails(InvestorBackerProperties objIbpGetInvestorDetails)
        {
            SqlParameter[] p = new SqlParameter[]
            {
                new SqlParameter("@userName", objIbpGetInvestorDetails.UserName)
            };
            objIbr.GetMultipleTable = UseDatabaseElements.FetchMultipleTable("spDF_GETINVESTORDETAILS", p);
            return objIbr;


        }
        public InvestorBackerResponse GetBackerDetails(InvestorBackerProperties objIbpBackerDetails)
        {
            SqlParameter[] p = new SqlParameter[]
            {
                new SqlParameter("@userName", objIbpBackerDetails.UserName)
            };
            objIbr.GetMultipleTable = UseDatabaseElements.FetchMultipleTable("spDF_GETINVESTORDETAILS", p);
            return objIbr;


        }


    }
}


//Responces

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace GRMI.DiverseFund.SqlDBDiverseFundBal
{
    public class InvestorBackerResponse
    {
        private int _ResultCount;

        public int ResultCount
        {
            get { return _ResultCount; }
            set { _ResultCount = value; }
        }
        private string _SingleValue;

        public string SingleValue
        {
            get { return _SingleValue; }
            set { _SingleValue = value; }
        }
        private DataTable _GetTable;

        public DataTable GetTable
        {
            get { return _GetTable; }
            set { _GetTable = value; }
        }
        private DataSet _GetMultipleTable;

        public DataSet GetMultipleTable
        {
            get { return _GetMultipleTable; }
            set { _GetMultipleTable = value; }
        }

    }
}



No comments: