Wednesday, April 15, 2015

Custom Software Can Free You

Businesses outgrow data management by paper and spreadsheets.  At some point, you start to replace your time enjoying your entrepreneurial passion with the mundane task of managing the business data.  

Check out this article by Jeff Hayden in Inc.com. 

This quote from Jeff's article nails one of the best reasons to consider custom software to manage your business -- "Leveraging software actually lets you get back to doing more of what you love, because not only does it streamline and automate your processes, it streamlines and automates processes for your customers--and frees you up to think of creative ways that doing what you love can better serve your customers."

Contact Blue Canyon Software Consulting, Inc if you need custom software for your business.

Get back to what you love.

Wednesday, March 25, 2015

Get Assigned Roles With LINQ

Here's one way of creating a RadGrid with assigned roles for users. 

   <telerik:RadGrid runat="server" ID="gridUsers" AllowSorting="True"
                   AutoGenerateColumns="False" GroupPanelPosition="Top" 
                   ResolvedRenderMode="Classic"
                   onneeddatasource="gridUsers_NeedDataSource"                     onitemdatabound="gridUsers_ItemDataBound">         <MasterTableView>             <Columns>                 <telerik:GridBoundColumn DataField="userName"                      HeaderText="User Name"                      UniqueName="colUserName">                 </telerik:GridBoundColumn>                 <telerik:GridBoundColumn DataField="roles"                      HeaderText="Roles"                      UniqueName="colRoles">                 </telerik:GridBoundColumn>                 <telerik:GridBoundColumn DataField="isApproved"                      HeaderText="Active User?"                      UniqueName="colIsApproved">                 </telerik:GridBoundColumn>             </Columns>         </MasterTableView>     </telerik:RadGrid>

using System;
using System.Linq;
using System.Web.Security;
using Telerik.Web.UI;

    protected void gridUsers_NeedDataSource(object sender, 
                     Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        try 
        { 
            using (var dc = new  MyModel.EntitiesModel())
            {
                var u = dc.Aspnet_Users.Select(a => new
                {
                    userName = a.UserName,
                    roles = string.Join(","Roles.GetRolesForUser(a.UserName)),
                    isApproved = (Membership.GetUser(a.UserName)).IsApproved
                });
                if (null != u)
                {
                    this.gridUsers.DataSource = u.ToList();
                }
            }
        }
        catch (Exception)
        {
            throw;
        }
    }

    protected void gridUsers_ItemDataBound(object sender, 
                              Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem dataItem = (GridDataItem)e.Item;
            if (dataItem["colIsApproved"].Text != null &&
dataItem["colIsApproved"].Text == "False")
            {
                dataItem["colIsApproved"].BackColor = System.Drawing.Color.Red;
                dataItem["colIsApproved"].ToolTip = "This person cannot login.";
            }
        }
    }

Tuesday, March 24, 2015




Hiding a Telerik Menu Choice Based on Role

I have my menu in the site master page. I used the Page_Load() function to make the "Admin" menu item only visible to users with an Admin role.

using System;
using System.Linq;
using Telerik.Web.UI;
using System.Web.Security;



<telerik:RadMenu ID="menu" runat="server" RenderMode="Auto"  >
    <Items>
       <telerik:RadMenuItem    Text="Admin"  Visible="true" />
    </Items>
 </telerik:RadMenu>

protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        RadMenuItem item = this.menu.FindItemByText("Admin");
        if (null != item)
        {
            if (Roles.IsUserInRole("Admin"))
            {
                item.Visible = true;
            }
            else
            {
                item.Visible = false;
            }
        }
    }
}

Thursday, January 1, 2015

Is 2015 the year?

The New Year brings a time to reflect on the possible. Is 2015 the year you’ll take your business and profession to the next level?

Your greatest success may be around the next bend in the road.

Visit Blue Canyon Software if your ready to create custom software to improve your business in 2015.

Here’s to the success of the entrepreneur and to all others waking up each morning ready to make a difference!

Tuesday, December 16, 2014


Pool Service Online is Live!

I just completed a new web site for www.PoolServiceOnline.com . Check it out.   There is great information for pool owners to include informative video tutorials about pool maintenance.The owner is extremely knowledgeable and experienced.

Pool Service Online also has an online Pool Prescription Software  if you create a free profile identifying your pool size, filter type, etc.  

Contact me through my website at www.BlueCanyonSoftware.com if you need a website or custom software to manage your data.

Tuesday, October 21, 2014

Custom Software Is Your Competitive Advantage


Entrepreneurs are a passionate group that love what they're doing.   They use  their skills and ideas to start businesses.  Long hours and intense focus can be the norm.

Pressures rising from competitors and the escalating need to "run" the business  potentially pulls entrepreneurs away from their passion of doing the work and implementing their ideas.

You started your business on an idea that is unique.  Managing the business involves unique processes and data management requirements.   Custom software can be provide the data management advantage you need to run your business and provide unique services to your customers.

Contact Blue Canyon Software to create the custom software data system you need to manage repetitive processes, provide insight into your business, and bring innovative interaction to your customers.

Wednesday, October 15, 2014

Set Cursor To Image From Code Behind

Changing the cursor to something unexpected is not a good idea most of the time because it may confuse your users. However, there may be times when it fits the situation well.

This is how I do it using ASP.NET and C#.   The basic idea is to create a class with the cursor property set to an image and then add that class to a div from code behind.

In this example,  I'm using FormsAuthentication and I want to change the cursor only when "chuck" is logged in.

CSS

Create a class definition for chuck like the following.

 .chuck{ cursor: url(../images/littleChuck.png), auto; }

A couple of things to note here:
  • Use a small image. Don't exceed 32px in length or width
  • Use a url path relative to the page using the image, not relative to the css file.
  • Always follow the url() with auto. Just two values --> cursor: url(), auto;

Identify the div to Apply Cursor

You need something to apply the css class to in the code behind. Let's use a div for this example.

Don't forget to use the runat="server" on the div so we can access the div from the code behind.

<div id="wrapper"   runat="server" > 

</div>

C# in Code Behind

Add the "chuck" class to the wrapper div if the logged in user name is "chuck".

if(HttpContext.Current.User.Identity.Name.ToLower() == "chuck" )
{
       wrapper.Attributes.Add("class", "chuck");
}


Summary

Changing the cursor to image is only one of many values that can be applied.  Check out this link at w3schools to experiment with the 30+ values.

Visit Blue Canyon Software if you need a Senior Software Developer for your custom software project.