Friday, April 11, 2008

Ab Identical BAL using above DAL

#region mahesh kumar sharma
//
// All rights are reserved. Reproduction or transmission in whole or in part, in
// any form or by any means, electronic, mechanical or otherwise, is prohibited
// without the prior written permission of the copyright owner.
//
// Class Name : userProfile.cs
//
// Functionality : This class contains all those properties and methods which are required for Editing user profile,
// saving user profile info, showing user profile info

//

#endregion
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

///
/// Summary description for userProfile
///

public class userProfile
{
#region Constructor of userProfile Class
public userProfile()
{
//
// TODO: Add constructor logic here
//
}
#endregion

#region Private Properties of class userProfile

private string _clientId;
private string _screenName;
private string _firstName;
private string _lastName;
private string _school;
private string _neighborhood;
private string _city;
private string _state;
private string _yourWebsite;
private string _YLURL;
private string _hometown;
private string _MyTags;

private string _purposeId;

//for user profile1

private string _profileViewStatus;
private string _gender;
private string _dateOfBirth;

private int _picPickId;
//for user profile 2

private string _occupation;
private string _purpose;
private int _maritialStatusId;
private int _sexualOrientationId;

private string _aboutMe;
private string _whoILikeToMeet;
private string _whatILike;
private string _moviesILove;
private string _booksILove;
private string _myFavBands;
private string _myFavPeople;
private string _smoke;
private string _drink;
private string _kids;

private string _picName;

private string _picType;
//for user profile page
private string _friendId;
private int _friendStatus;

//for Home Mail Page

private int _pendingId;

//for sending Mail
//private string _FirstName;
private string _Sender;
private string _From;
private string _Subject;
private string _To;
//For User Track list
private string _trackClientId;
private string _trackActivity;
private string _trackActivityId;
private string _UserID;
private DateTime _trackDateTime;
public string username = string.Empty;



#endregion

#region Public Properties of class userProfile

//For User Track list
public String trackClientId
{
get { return _trackClientId; }
set { _trackClientId=value; }
}
public string trackActivity
{
get { return _trackActivity; }
set { _trackActivity = value; }
}
public string trackActivityId
{
get { return _trackActivityId; }
set { _trackActivityId = value; }
}
public DateTime trackDateTime
{
get { return _trackDateTime; }
set { _trackDateTime = value; }
}
//for sending mail
public string To
{
get
{
return _To;
}
set
{
_To = value;
}
}
public string Sender
{
get
{
return _Sender;
}
set
{
_Sender = value;
}
}
public string From
{
get
{
return _From;
}
set
{
_From = value;
}
}
public string Subject
{
get
{
return _Subject;
}
set
{
_Subject = value;
}
}

//for user profile page
public int friendStatus
{
get
{
return _friendStatus;
}
set
{
_friendStatus = value;
}
}
public string friendId
{
get
{
return _friendId;
}
set
{
_friendId = value;
}
}
//for user profile 2

public string picType
{
get
{
return _picType;
}
set
{
_picType = value;
}
}

public string picName
{
get
{
return _picName;
}
set
{
_picName = value;
}
}
public string firstName
{
get
{
return _firstName;
}
set
{
_firstName = value;
}
}
public string lastName
{
get
{
return _lastName;
}
set
{
_lastName = value;
}
}

public string drink
{
get
{
return _drink;
}
set
{
_drink = value;
}
}

public string kids
{
get
{
return _kids;
}
set
{
_kids = value;
}
}


public string smoke
{
get
{
return _smoke;
}
set
{
_smoke = value;
}
}

public string aboutMe
{
get
{
return _aboutMe;
}
set
{
_aboutMe = value;
}
}
public string whoILikeToMeet
{
get
{
return _whoILikeToMeet;
}
set
{
_whoILikeToMeet = value;
}
}

public string whatILike
{
get
{
return _whatILike;
}
set
{
_whatILike = value;
}
}

public string moviesILove
{
get
{
return _moviesILove;
}
set
{
_moviesILove = value;
}
}

public string booksILove
{
get
{
return _booksILove;
}
set
{
_booksILove = value;
}
}
public string myFavBands
{
get
{
return _myFavBands;
}
set
{
_myFavBands = value;
}
}
public string myFavPeople
{
get
{
return _myFavPeople;
}
set
{
_myFavPeople = value;
}
}
public int sexualOrientationId
{
get
{
return _sexualOrientationId;
}
set
{
_sexualOrientationId = value;
}
}
public int maritialStatusId
{
get
{
return _maritialStatusId;
}
set
{
_maritialStatusId = value;
}
}
public string purpose
{
get
{
return _purpose;
}
set
{
_purpose = value;
}
}
public string occupation
{
get
{
return _occupation;
}
set
{
_occupation = value;
}
}
//for userprofile 1
public string profileViewStatus
{
get
{
return _profileViewStatus;
}
set
{
_profileViewStatus = value;
}
}
public string gender
{
get
{
return _gender;
}
set
{
_gender = value;
}
}
public int picPickId
{
get
{
return _picPickId;
}
set
{
_picPickId = value;
}
}

public string dateOfBirth
{
get
{
return _dateOfBirth;
}
set
{
_dateOfBirth = value;
}
}

public string purposeId
{
get
{
return _purposeId;
}
set
{
_purposeId = value;
}
}

public string clientId
{
get
{
return _clientId;
}
set
{
_clientId = value;
}
}


public string screenName
{
get
{
return _screenName;
}
set
{
_screenName = value;
}
}

public string school
{
get
{
return _school;
}
set
{
_school = value;
}
}


public string neighborhood
{
get
{
return _neighborhood;
}
set
{
_neighborhood = value;
}
}


public string city
{
get
{
return _city;
}
set
{
_city = value;
}
}


public string state
{
get
{
return _state;
}
set
{
_state = value;
}
}


public string yourWebsite
{
get
{
return _yourWebsite;
}
set
{
_yourWebsite = value;
}
}


public string YLURL
{
get
{
return _YLURL;
}
set
{
_YLURL = value;
}
}

public string hometown
{
get
{
return _hometown;
}
set
{
_hometown = value;
}
}
//for my tags
public string MyTags
{
get
{
return _MyTags ;
}

set {
_MyTags =value ;
}
}
public string UserID
{
get
{
return _UserID;
}
set
{
_UserID = value;
}
}

//for Home Mail Page
public int pendingId
{
get
{
return _pendingId;
}
set
{
_pendingId = value;
}
}

#endregion

#region ---------- Edit My Profile ------


#region Public Methods of class userProfile
// To add all the tags into eventTagList table and calculate total tag rating
public void bindTotalRating()
{
userProfileDAL profile = new userProfileDAL();
profile.bindTotalRating(this);
}
// To add all the tags into placeTagList table and calculate total tag rating
public void bindTotalPlaceRating()
{
userProfileDAL profile = new userProfileDAL();
profile.bindTotalPlaceRating(this);
}

public DataSet getSexualOrientations()
{
//create the object of Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.getSexualOrientationInfo();
}
public DataSet getUserProfileDetails()
{
//create the object of Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.getUserProfileDetails(this);
}
public DataSet getMaritalStatus()
{
//create the object of Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.getMaritalStatusInfo();
}

public DataSet getUserPurposeList()
{
//create the object of Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.getUserPurposeList(this);
}
public DataSet getPurposeList()
{
//create the object of Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.getProfilePurposeList();
}

public DataSet getUserPicDetails()
{
//create the object of Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.getUserPicDetails(this);
}
public string updateUserProfile()
{
//create the object of Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.updateUserProfile(this);
}
#endregion

#region for uploading User Image from Edit Profile Page ----->
public bool addUserImagePhoto()
{
//create the object of Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.addUserImagePhoto(this);
}
public bool DeleteUserImage()
{
userProfileDAL profile = new userProfileDAL ();
return profile.DeleteUserImage(this);
}

#endregion
#endregion

#region -----------User Profile-----------
//Function to add as friend

public string AddToPendingFriendList_YL()
{
//create the object of Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.AddToPendingFriendList_YL(this);
}

//THIS FUNCTION IS USED CHECK WETHER USER HAS RECENTLY REVIEW WHETHER PLACE OR EVENT
public int CheckUserLatestReview()
{
//create the object of Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.CheckUserLatestReview(this);
}
//Update User profile Counter
public bool UpdateProfileHitCounter()
{
//create the object of Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.UpdateProfileHitCounter(this);
}
#endregion

#region -----------HomeMail-----------

//function to accept the the user add as friend request
public string AcceptFriendRequest()
{
//create the object for Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.AcceptFriendRequest(this);
}
public string AddAdminAsFriend()
{
//create the object for Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.AddAdminAsFriend(this);
}
//function to reject the the user add as friend request
public bool RejectFriendRequest()
{
//create the object for Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.RejectFriendRequest(this);
}

//function to send mail for reject
public bool SendMailMessage()
{
//create the object for Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.SendMailMessage(this);
}
//function to send mail for accepting
public bool SendConfirmMailMessage()
{
//create the object for Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.SendConfirmMailMessage(this);
}
//function to send mail for adding as friend
public bool SendAddRequestMailMessage()
{
//create the object for Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.SendAddRequestMailMessage(this);

}
//function to send mail for adding as favorite friend
public void SendAddFavRequestMailMessage()
{
//create the object for Data Access Layer
userProfileDAL profile = new userProfileDAL();
//Commented due to changes in 10 April requiremetns Origanaly it retuens bool
//return profile.SendAddFavRequestMailMessage(this);

}

//function to send mail for comment a friend
public bool SendCommentMailMessage()
{
//create the object for Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.SendCommentMailMessage(this);
}

//function to send mail for Message a friend
public bool sendMessageMail()
{
//create the object for Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.sendMessageMail(this);
}

//function to send mail for Smile a friend
public bool sendSmileMail()
{
//create the object for Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.sendSmileMail(this);
}

#endregion

#region---------------UserTrackList---------
public string AddUserTrackList()
{
//create the object of Data Access Layer
userProfileDAL profile = new userProfileDAL();
return profile.AddUserTrackList(this);
}
#endregion
}

No comments: