private UserRegistrationModel GetUserDetailsFromDataReader(IDataReader datareader) { objUserRegistrationModel = new UserRegistrationModel(); objUserRegistrationModel.Id = SafeTypeHandling.ConvertStringToInt32(datareader["Id"]); objUserRegistrationModel.UserCode = SafeTypeHandling.ConvertToString(datareader["UserCode"]); objUserRegistrationModel.UserEmail = SafeTypeHandling.ConvertToString(datareader["UserEmail"]); objUserRegistrationModel.UserName = SafeTypeHandling.ConvertToString(datareader["UserName"]); objUserRegistrationModel.UserNTID = SafeTypeHandling.ConvertToString(datareader["UserNTID"]); objUserRegistrationModel.ManagerCode = SafeTypeHandling.ConvertToString(datareader["ManagerCode"]); objUserRegistrationModel.ManagerEmail = SafeTypeHandling.ConvertToString(datareader["ManagerEmail"]); objUserRegistrationModel.ManagerName = SafeTypeHandling.ConvertToString(datareader["ManagerName"]); objUserRegistrationModel.ManagerNTID = SafeTypeHandling.ConvertToString(datareader["ManagerNTID"]); objUserRegistrationModel.RoleId = SafeTypeHandling.ConvertStringToInt32(datareader["RoleId"]); objUserRegistrationModel.LOBId = SafeTypeHandling.ConvertStringToInt32(datareader["LOBId"]); objUserRegistrationModel.Status = SafeTypeHandling.ConvertStringToInt32(datareader["UserStatus"]); objUserRegistrationModel.StatusType = SafeTypeHandling.ConvertToString(datareader["StatusType"]); objUserRegistrationModel.RoleName = SafeTypeHandling.ConvertToString(datareader["RoleName"]); objUserRegistrationModel.LOBName = SafeTypeHandling.ConvertToString(datareader["LOBName"]); objUserRegistrationModel.BusinessSegmentName = SafeTypeHandling.ConvertToString(datareader["BsName"]); objUserRegistrationModel.CapabilitiesName = SafeTypeHandling.ConvertToString(datareader["CapName"]); objUserRegistrationModel.IsActive = SafeTypeHandling.ConvertStringToBoolean(datareader["IsActive"]); objUserRegistrationModel.AboutMe = SafeTypeHandling.ConvertToString(datareader["AboutMe"]); objUserRegistrationModel.CapabilitiesId = SafeTypeHandling.ConvertStringToInt32(datareader["CapabilitiesId"]); objUserRegistrationModel.BusinessSegmentId = SafeTypeHandling.ConvertStringToInt32(datareader["BusinessSegmentId"]); objUserRegistrationModel.UserPhoto = (byte[])datareader["UserPhoto"]; objUserRegistrationModel.ImgStatus = SafeTypeHandling.ConvertStringToInt32(datareader["ImgStatus"]); objUserRegistrationModel.IsAdmin = SafeTypeHandling.ConvertStringToBoolean(datareader["IsAdmin"]); return(objUserRegistrationModel); }
private posts GetListOfPostFromDataReader(IDataReader datareader) { objPost = new posts(); objPost.PostId = SafeTypeHandling.ConvertStringToInt32(datareader["PostId"]); objPost.PostedBy = SafeTypeHandling.ConvertToString(datareader["Postedby"]); return(objPost); }
private posts GetLikeCountFromDataReader(IDataReader datareader) { objPost = new posts(); objPost.PostId = SafeTypeHandling.ConvertStringToInt32(datareader["PostId"]); objPost.LikeBy = SafeTypeHandling.ConvertToString(datareader["LikeBy"]); objPost.Identifier = SafeTypeHandling.ConvertToString(datareader["Identifier"]); return(objPost); }
private UserRegistrationModel GetUserRegistrationDetailsFromDataReader(IDataReader datareader) { objUserRegistrationModel = new UserRegistrationModel(); objUserRegistrationModel.UserID = SafeTypeHandling.ConvertStringToInt32(datareader["Id"]); objUserRegistrationModel.UserPassword = SafeTypeHandling.ConvertToString(datareader["Password"]); objUserRegistrationModel.UserEmail = SafeTypeHandling.ConvertToString(datareader["Email"]); return(objUserRegistrationModel); }
private posts GetCommentListOnPostFromDataReader(IDataReader datareader) { objPost = new posts(); objPost.CommentId = SafeTypeHandling.ConvertStringToInt32(datareader["CommentId"]); objPost.PostId = SafeTypeHandling.ConvertStringToInt32(datareader["PostId"]); objPost.Message = SafeTypeHandling.ConvertToString(datareader["Message"]); objPost.UserCode = SafeTypeHandling.ConvertToString(datareader["UserCode"]); objPost.CommentedBy = SafeTypeHandling.ConvertToString(datareader["CommentedBy"]); objPost.CommentedByName = SafeTypeHandling.ConvertToString(datareader["CommentedByName"]); objPost.CommentedDate = SafeTypeHandling.ConvertToString(datareader["CommentedDate"]); objPost.Identifier = SafeTypeHandling.ConvertToString(datareader["Identifier"]); return(objPost); }
private posts GetPostFromDataReader(IDataReader datareader) { objPost = new posts(); objPost.PostId = SafeTypeHandling.ConvertStringToInt32(datareader["PostId"]); objPost.Message = SafeTypeHandling.ConvertToString(datareader["Message"]); objPost.PostedBy = SafeTypeHandling.ConvertToString(datareader["Postedby"]); objPost.UserCode = SafeTypeHandling.ConvertToString(datareader["UserCode"]); objPost.PostedByName = SafeTypeHandling.ConvertToString(datareader["PostedByName"]); objPost.PostedDate = SafeTypeHandling.ConvertToString(datareader["PostedDate"]); objPost.Status = SafeTypeHandling.ConvertToString(datareader["Status"]); objPost.Remarks = SafeTypeHandling.ConvertToString(datareader["Remarks"]); return(objPost); }
private RSSFeed GetRssFeedListFromDataReader(IDataReader datareader) { RSSFeed RSSFeed = new RSSFeed(); RSSFeed.Id = Convert.ToInt32(datareader["Id"]); RSSFeed.Title = SafeTypeHandling.ConvertToString(datareader["Title"]); RSSFeed.Url = SafeTypeHandling.ConvertToString(datareader["Url"]); RSSFeed.IsActive = SafeTypeHandling.ConvertStringToBoolean(datareader["IsActive"]); RSSFeed.CreatedBy = SafeTypeHandling.ConvertToString(datareader["CreatedBy"]); RSSFeed.CreatedOn = SafeTypeHandling.ConvertToDateTime(datareader["CreatedOn"]); RSSFeed.ModifiedBy = SafeTypeHandling.ConvertToString(datareader["ModifiedBy"]); RSSFeed.ModifiedOn = SafeTypeHandling.ConvertToDateTime(datareader["ModifiedOn"]); return(RSSFeed); }
public int GetUserExist(string UserEmail) { int success = 0; using (DbCommand dbCommand = m_Database.GetStoredProcCommand(DBConstants.PROCCHECKUSEREXISTS)) { m_Database.AddInParameter(dbCommand, "@Email", DbType.String, UserEmail); using (IDataReader dataReader = m_Database.ExecuteReader(dbCommand)) { while (dataReader.Read()) { success = SafeTypeHandling.ConvertStringToInt32(dataReader["tot"]); } } } return(success); }