Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

Jaime Premy

@Jaime Premy
About
Posts
7
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • To ORM or not to ORM
    J Jaime Premy

    Not if you want to stay in control

    The perfect woman: cooks good food and never says no in the middle of the night.

    The Lounge database performance csharp postgresql

  • webhosting for dotnet applications
    J Jaime Premy

    Smarterasp.net. Been using it for several clients for years now. Very affordable, easy to use and decent support.

    The perfect woman: cooks good food and never says no in the middle of the night.

    The Lounge csharp css sysadmin business question

  • What to start learning?
    J Jaime Premy

    I would recommend you download: [Jobs Site Starter Kit for ASP.NET 3.5 | BinaryIntellect Knowledge Base](http://www.binaryintellect.net/articles/a203c824-aec1-41b7-b3ec-49a15d5c9ebb.aspx) It is very well organized and allows you to quickly learn about Business and Data Object Layers, as well as persisting data to a SQL Server Database. It's VB.NET so would be more familiar to you. At this point I think it's more importante to learn about concepts and technologies, like OOP, Layered Arcitecture, ADO.NET, SQL Server etc. Once you master this, it will be relatively easy to learn C# as well. Having said that VB.NET is far from being dead or inferior to C#. Read up about it on Google. There may be other Starter Kits where you can learn about what I pointed out above, but this is one I checked out myself years ago and it helped me a lot to see how things work in real (programming) life.

    The perfect woman: cooks good food and never says no in the middle of the night.

    The Lounge csharp database graphics design

  • Need help understanding this piece of code
    J Jaime Premy

    Humm..., this is the code for finding the toolbar. My problem is how to ADD the javascript generated button to the toolbar...

    The perfect woman: cooks good food and never says no in the middle of the night.

    JavaScript

  • Need help understanding this piece of code
    J Jaime Premy

    Well my problem at this point is really how to add the js generated button to the toolbar. This hack is necessary since ms simply did not update reportviewer for compatibility with modern browsers, not even IE.

    The perfect woman: cooks good food and never says no in the middle of the night.

    JavaScript

  • Need help understanding this piece of code
    J Jaime Premy

    Hi there, new on this forum and looking for help with some code I found at Cross Browser RDLC Printing - CodeProject. The author didn't include source or demo files and does not reply to my comments either, so I turned to this forum for help. The author supposedly shows a tip on how to create a print button for rdlc reportviewer for non IE browsers: **...If not, we should create a client-side print icon button on the fly. How to create one that exactly looks like the original print button? The answer is so straightforward, by copying the markup for the original button. Here is what RDLC uses for creating the print icon:

    $print = $('

    ');

    * Notice that we created a JavaScript object which represents the markup.

    This icon must be added to the RDLC viewer toolbar and this is how to find the toolbar object on the client-side:

    var findtoolbar = function () {
    var $all = $('table div');
    for (var i = 0, len = $all.length; i < len; i++) {
    if ($($all[i]).css('background-image').toLowerCase().indexOf('toolbar_bk.png') != -1)
    return $($all[i]);
    }
    return null;
    }

    As you see, there is no solid identification method for the toolbar, so we used a combination of certain properties like background image along with the order of objects in the DOM...

    Well he does not show WHERE and HOW to actually add the icon to the toolbar. I tried to do

    $(document).ready(function () {
    findtoolbar.add($print);
    });

    and it threw an error (of course?), but with my limited knowledge of javascript and jquery, that's all I could come up with. So I was hoping someone here could help me make some sense out of this ;-). Thanks in advance.

    The perfect woman: cooks good food and never says no in the middle of the night.**

    JavaScript

  • Need lowdown on my custom CacheDependency implementation [modified]
    J Jaime Premy

    :sigh: I've been using Data CacheDependency for a while now for my XML File based data. But then I suddenly had the need to use a data cache for my SQL Server based Products table and started looking around for some help. Then I found this: http://www.asp.net/data-access/tutorials/using-sql-cache-dependencies-vb After taking a look at this tutorial, I said "Wow, there goes my sunday afternoon!". But being lazy as I am, I started wondering if there wouldn't be an easier way for achieving what I wanted, and this is what I came up with. 1. I created a Table named TableChanged with 2 columns: - TableName varchar(20) - Changed bit The idea is to track changes made to other tables; for the time being there is only 1 row in it: TableName Changed Products True 2. I created a trigger in the Products table:

    CREATE TRIGGER Changed

    ON dbo.Products

    AFTER INSERT, UPDATE, DELETE

    AS

    Update TableChanged Set Changed = 1 WHERE TableName='Products'

    So everytime something changes in Products, the value of Changed becomes True, in TableChanged. I created the same trigger in table Categories, since it's related to Products. 3. In PageLoad I did:

    If Not IsPostBack Then
    Dim dv As DataView
    Dim changed As Boolean = Global.CheckChanged("Products")
    If changed Then
    dv = LoadDV()
    Else
    dv = Cache("cachedDV")
    If dv Is Nothing Then 'in case application restarts, changed will be false and dv null
    LoadDV()
    dv = Cache("cachedDV")
    End If
    End If

    Protected Function LoadDV() As DataView
    Dim dt As DataTable = Product.GetDiscounted
    Dim dv As DataView = New DataView(dt)
    Global.UpdateChanged("Products")
    Cache("cachedDV") = dv
    Return dv
    End Function

    Global and Product are classes in my BOL which handles the dataconnection thru my DAL. The sprocs used for CheckChanged and UpdateChanged are the following:

    ALTER PROCEDURE dbo.TableChangedCheck
    @sTable varchar(20)
    AS
    SET NOCOUNT ON
    Select Changed From TableChanged WHERE TableName=@sTable
    RETURN

    ALTER PROCEDURE dbo.TableChangedUpdate
    @sTable varchar(20)
    AS
    SET NOCOUNT ON
    UPDATE TableChanged SET Changed = 0 WHERE TableName=@sTable
    RETURN

    So, on Pageload, if changed = true the dataview gets populated from the db and

    ASP.NET database csharp asp-net sql-server sysadmin
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups