• Blog All
  • Linkblog

Action Pants

This site is here to make me look like I do things.

  • Home
  • Contact
  • Log in

Color picker and scheming site

April 22nd, 2009

Check out http://www.colr.org/ for help picking colors. I'm not very good at this so the site comes in very handy.

Tags: colors

Posted in Design | Send feedback »

Awesome Quote

February 21st, 2009

Read this great quote that is soo true and thought I would share.

Putt's Law

"Technology is dominated by two types of people: those who understand what they do not manage, and those who manage what they do not understand."

Posted in Rants | Send feedback »

Activity Count Workflow Variables

February 20th, 2009

In Dynamics CRM 4.0 workflows have the two internal variables of 'Activity Count' and 'Activity Count Including Workflow'. I found this really good post by Richard Knudson over at IMG about what the are actually for.

http://www.imginc.com/blogs/richardk/Lists/Posts/Post.aspx?List=2b3b40b9-8a6b-4fea-a42c-92b9e3d65a89&ID=97

Tags: crm 4.0, workflow

Posted in IT, Microsoft CRM | Send feedback »

Setting up DNN for two Countries and Regions

January 29th, 2009

By default DotNetNuke is setup for only one Country and Region field for user profiles. You can add a second and it will work out fine until you have a situation where the countries for one of the addresses is not the same as the other. The Region field slaves to the country field that has a value first. In order to get around this you need to create another data type and also change some of the logic in the DotNetNuke library. Since this is an open source project this isn't too painful to do.

First, if you don't already have it laying around, download the source for your version of DNN. You can find this on the DNN website.

After you get the Visual Studio project up get to the DotNetNuke.Library project and navigate to this file ...
\Controls\PropertyEditor\Edit Controls\DNN Edit Controls\DNNCountryEditControl.vb

Duplicate the file and name the duplicate DNNCountry2EditControl.vb

Next open up the file and rename the class to DNNCountry2EditControl as well as the ToolBox attribute.

Do the same thing for the Region control. The path for that is \Controls\PropertyEditor\Edit Controls\DNN Edit Controls\DNNRegionEditControl.vb

Duplicate the file and rename the Duplicate as DNNRegion2EditControl.vb and then open the file and update the Class name and ToolBox attribute.

The last major bit of code that we have to change is in \Controls\PropertyEditor\ProfileEditorControl.vb.

This file is what does the linking of the country to the region.

In the Protected Methods region there is the CreateEditor sub-routine. The condition we're looking for looks like this..

If TypeOf editor.Editor Is DNNRegionEditControl Then
Dim country As ListEntryInfo = Nothing

For Each checkEditor As FieldEditorControl In Fields
If TypeOf checkEditor.Editor Is DNNCountryEditControl Then
Dim countryEdit As DNNCountryEditControl = CType(checkEditor.Editor, DNNCountryEditControl)
Dim objListController As New ListController
Dim countries As ListEntryInfoCollection = objListController.GetListEntryInfoCollection("Country")
For Each checkCountry As ListEntryInfo In countries
If checkCountry.Text = CStr(countryEdit.Value) Then
country = checkCountry
Exit For
End If
Next
End If
Next

'Create a ListAttribute for the Region
Dim countryKey As String
If Not country Is Nothing Then
countryKey = "Country." & country.Value
Else
countryKey = "Country.Unknown"
End If

Dim attributes(-1) As Object
ReDim attributes(0)
attributes(0) = New ListAttribute("Region", countryKey, ListBoundField.Text, ListBoundField.Text)
editor.Editor.CustomAttributes = attributes

End If

Duplicate this section of code and paste it below the original. Go through and change the references of DNNCountryEditControl to DNNCountry2EditControl and DNNRegionEditControl to DNNRegion2EditControl. This just looks for our new types that we setup and links them together.

With those changes done compile the assembly and take the DotNetNuke.dll file and move it to your production site in the bin folder.

With the types available to us now we just have to tell DNN how to use them. Go to Host>List and click on the DataType list. You're going to add two types. One for Country2 and one for Region two. Just make them look like the existing Country and Region but with the different names.

Now were ready to use our two DataTypes. Add a country2 and region2 property to the profile using you're two new datatypes. If all goes well when you go to use them the region will be slaved to the country and you'll have two independent sets of county/region controls.

Tags: customization, dotnetnuke 4.x.x, vb

Posted in DotNetNuke, VB | Send feedback »

SSIS 2008 Script Component lets you write in C#

January 29th, 2009

I'm pretty new SQL Server and it's family of products so when I first started playing around with SSIS in 2005 it was hard for me to grasp the whole Data Transformation thing as well as writing scripts for the Script Component, especially when I was forced write them in VB when I'm a C# guy.
Well now I have nothing more to complain about because in SSIS 2008 you can write your scripts for the script component in either VB or C#!!! And just so I could try it out I went and found some VB code someone wrote for SSIS and changed it over to C#.


Regex r;
Match m;
string pattern = string.Empty;
string returnValue;


pattern = "^[A-Z][A-Z]?[0-9][0-9]?[A-Z]? ?[0-9][A-Z][A-Z]$";
r = new Regex(pattern, RegexOptions.Compiled);
m = r.Match(input);

if (m.Success)
{
// YIPPEE
}
else
{
// NOT GOOD
}

That felt good!!

Tags: c#, script component, ssis 2008

Posted in IT, SSIS, C# | Send feedback »

1 2 3 4 >>
  • July 2009
    Sun Mon Tue Wed Thu Fri Sat
     << <   > >>
          1 2 3 4
    5 6 7 8 9 10 11
    12 13 14 15 16 17 18
    19 20 21 22 23 24 25
    26 27 28 29 30 31  
  • Action Pants

  • I will ramble about random helpful things that I find here was well as things that i think everyone should know about.

    • Recently
    • Archives
    • Categories
    • Latest comments
  • Search




  • Categories

    • All
    • Announcements
    • Applications
    • Background
    • Design
    • IT
      • DotNetNuke
      • Microsoft CRM
      • SharePoint
      • SQL Server
        • SSIS
    • News
    • Programming
      • C#
      • CSS
      • JScript
      • T-SQL
      • Tools
      • VB
    • Rants
    • Troubleshooting
  • The requested Blog doesn't exist any more!
  • XML Feeds

    • RSS 2.0: Posts, Comments
    • Atom: Posts, Comments
    What is RSS?

powered by b2evolution free blog software


©2009 by Ray FLOWERS | Contact | Design by Michael | Credits: blog software | web hosting | monetize