Inspiring: My Secret of Success and Some Pointers or What’s the Deal about Dale?

My History

The back story.

Growing up in Southern California seems like it was a lifetime ago. Like looking into a pond and seeing a reflection, you see things around you, but they seem like a shadow. They are real but untouchable.

My early 20’s I spent working as a Union employee for the service industry. My work ethic was always strong and I tried to take on every task like I was doing it for God. I always excelled in my positions. Then after a store closing and a layoff, I got a job sweeping floors and preparing shipping labels for a precision sheet metal fabrication company.

After just a year I had worked my way from that position to run a precision sheet metal sheer then as an NC punch press operator. I went to school at nights to study basic engineering and worked my way to the office where I did order entry, learned job design, planning, and NC programming. On my off hours for a hobby I studied computer programming, it was new at the time and the only PC’s were TRS-80’s, K-Pro, or Commodore 64’s.

Old Faithful in the 80’s, I wrote my first stock graphing software entering the stock share price from the WSJ every day.

The one thing about learning computers (the hardware and software) was it came very easy. It felt like I knew things already and was eager to learn more.

The owners of the precision sheet metal company had me develop a new work order entry program, which traced jobs from the time of the initial start all the way to shipping. It was a very exhilarating  feeling to see something you created actually being used. My ex-wife had a job as a medical biller and through her I got a consulting job creating an admitting and billing program for the Home Health agency she worked for. I remember charging them just $500.00, but eventually, they wanted to resell the application and asked me to come on board to work onsite for updates and selling the software.

After a few years, I met the marketing director for a home health IV Pharmacy, and we became partners in a company to create a new Home Health, IV Therapy, and private nursing admitting and billing application. Once developed we sold it to a few companies. When one of the companies offered to hire me full-time I jumped at the chance and relocated to Texas.

Through a chance meeting, I met the financial secretary of a local Labor Union and began doing computer hardware maintenance for their office which eventually ended up with me creating a complete dues collection program for them.

As word got out I started creating a program application for the self-insured benefit offices to process medical claims for the Union members, and then a pension application that would calculate and process pension checks to Union pensioners and created an application for keeping track of students for the apprenticeship schools.

Several other consulting and computer applications were written along the way, you can see my LinkedIn page for a thorough history. But, the story isn’t over and to this point, It has been an amazing and exciting trek.

So What is the Secret?

Work for the right person.

The number one thing is to do your work as you would to the Lord, this takes the sometimes disappointment and misunderstanding of why things happen out of the way and insulates you from developing a bad attitude, especially when you might have a boss that’s less than kind or very demanding. Trusting God and working in the correct spirit is the most important. I’m not saying you have to be a fanatic, I’m saying you have to have a good attitude and trust what your doing has a higher consequence than what you may see. Even the most seemingly insignificant task is important and if you’re good at it, having the right attitude will make all the difference. This will also enable you to find your correct path, many times I’ve had to center myself back to this truth and once I do, things work out or develop into something even better.

Concentrate on what you are good at.

Sometimes we find ourselves doing a lot of different jobs, and there is usually something we enjoy doing instead of something else. Like the saying “If you are doing a job you enjoy, you’ll never work a day in your life”.

Forgive yourself.

Just as important as forgiving others. When we don’t forgive someone we make an imaginary bond with that person that will grow in intensity and distance. It’s the inverse square law (1/r²). It will eventually take over our thoughts, it can keep us from achieving our goals, happiness and clear thinking. It will rub off on others and our work. Until we don’t have a breath in our lungs we must forgive each other and ourselves. If we’re striving to be better, the journey is the education and we’re not finished.

I have a definite separation from work and personal life, NOT!

Be careful of fear, it lies.

It is easy to have self-doubt, to be timid in doing something we’re not immediately comfortable with. I’m sure there’s a lot of books written on this. But, what I would convey is this thought; every month when the house payment or rent roles around, I get anxious because of being self-employed and not having a steady income that I won’t be able to pay my house payment or rent. The reality is that I’ve been a consultant for 30+ years and in that time never failed to pay my house payment or rent. But, I have that fear. So, I have to trust that when I’m sticking to my basic rules that my goals will work out and they do. I know it’s easier said than done, but I have to put it on the list.

Having a life partner is important.

I’ve always been that type of person that tells everything about my day when I’m home (In fact, I’m often told I talk too much!). It’s important for me to share my experiences and get that comfort and caring that having someone who Loves you can give. It completes the package of going through everything day to day. Sometimes I get things wrong and having someone who cares to bounce an idea off of can make a difference and gives confidence.

My Personal Life.

Well, I can’t skip this topic with all the history. I have a definite separation from work and personal life, NOT!

I can say that I spend a lot of my time inside my head. I’m either working out a solution to a program, thinking about business development, or being silly crazy with ideas and nonsense.

Traveling I kept seeing Amish Jam, and Amish Furniture, so I thought “What about”…

I’m not an easy person sometimes and sometimes I blow off too much steam in unconstructive ways. I have issues like everyone else and I’m thankful to have my girl (KC) who has become a part of my life and me. She stays beside me and not behind me. Like programming, computers, technology, and living, things are ever changing and I hope that we can keep striving for better, keep changing and turning the tarnished areas into bright and shinning things. I have faith and with the help of God and her, anything can be possible.

 

Easy method for doing a Copy and Paste that works in all browsers using ASP.Net

The Task

I recently had a task for users to easily copy information displayed in a Gridview, then paste it into another application. They only needed a few pieces of information from the GridView to be copied. I searched Google for some quick code that I could plug in and make it possible. I quickly found some solutions, but, they only worked for Internet Explorer. That’s a problem because my customer only uses Google Chrome. I tested what I thought were the top 5 of the solutions, but I could not get them to work with Google Chrome, I did eventually solve the problem, but, it was easy 10+ hours later with trial and error. I thought my solution might help others, so here goes.

The HTML Page

In my ASPX page I added a LinkButton and a Hidden field inside my GridView’s TemplateField where I also had my existing checkbox to make a row selection. I placed the LinkButton just below it so it would be easy for the user’s to click right away and not have to scroll right, just click, go to their other application and paste. Just a note about security, there is a security issue because you really don’t want a website you visit to have control of your computers clipboard (where the information is temporarily stored during a copy and paste). For that reason a user interaction has to be performed (in this case a LinkButton), which signals that the operation is OK to do.


                        <asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" AutoGenerateColumns="False" DataKeyNames="ReportID" HorizontalAlign="Left" ShowFooter="True" AllowSorting="True" OnSorting="GridView1_Sorting">
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="CB1" runat="server" onclick="Check_Click(this)" ClientIDMode="Static" />
                                        <asp:LinkButton ID="lbCopyClipboard" ClientIDMode="Static" runat="server"><span style="font-size:12px;background-color:paleturquoise;">CB</span></asp:LinkButton>
                                        <asp:HiddenField ID="CBData" ClientIDMode="Static" runat="server" Value='<%# GatherCB(Eval("Project"), Eval("Job_No"), Eval("Service1"), Eval("Service2"), Eval("Service3"), Eval("Service4"), Eval("Time"), Eval("Technician"))%>'/>
                                    </ItemTemplate>
                                    <ItemStyle Width="20px" />
                                </asp:TemplateField>
... (rest of the gridview specification)...

Looking at the code you can see that the actual clipboard data I’m going to send is in the HiddenField I created a “GatherCB” function to format the data I’m going to send to the clipboard.

Add this Javascript to your documents Head section

     <script>
        function copyToClipboard(thistext) {

            // Create a "hidden" input
            var aux = document.createElement("input");

            // Assign it the value of the specified element
            aux.setAttribute("value", thistext);

            // Append it to the body
            document.body.appendChild(aux);

            // Highlight its content
            aux.select();

            // Copy the highlighted text
            document.execCommand("copy");

            // Remove it from the body
            document.body.removeChild(aux);

        }

    </script>

Now the Codebehind…

First I’ll start with my “GatherCB” function, so you can see how I assembled the data that I’m going to copy to the clipboard, then the actual function that copies the text from the LinkButton, this code is vb, but you can easily convert it to c# with an online converter there is one available from telerix here.



    Protected Function GatherCB(PJName As String, PJNo As String, Svc1 As String, Svc2 As String, Svc3 As String, Svc4 As String, Tme As String, Tch As String) As String
        Dim Ret As String = ""
        Dim MyServices As String = ""
        If Svc1.Trim <> "" Then
            MyServices = " " & Svc1.Trim
        End If
        If Svc2.Trim <> "" Then
            MyServices &= ", " & Svc2.Trim
        End If
        If Svc3.Trim <> "" Then
            MyServices &= ", " & Svc3.Trim
        End If
        If Svc4.Trim <> "" Then
            MyServices &= ", " & Svc4.Trim
        End If
        If Tch.Trim = "" Then
            Ret = PJName.Trim & " " & PJNo.Trim & MyServices & " / " & Tme.Trim & " No tech has been assigned yet "
        Else
            Ret = PJName.Trim & " " & PJNo.Trim & MyServices & " / " & Tme.Trim & " " & Tch.Trim
        End If
        Return Ret
    End Function

in the GridView Row databound event...

    Private Sub GridView1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GridView1.RowDataBound
        If e.Row.RowType = DataControlRowType.DataRow Then
            ' Copy to Clipboard
            Dim button As LinkButton = DirectCast(e.Row.FindControl("lbCopyClipboard"), LinkButton)
            Dim CBData As HiddenField = TryCast(e.Row.FindControl("CBData"), HiddenField)
            button.Attributes.Add("onclick", "copyToClipboard('" & CBData.Value & "');")
        End If
    End Sub

That’s it, a cool and simple way, it works with most browsers. Need something unique for your business computing? Give me a call 972.571.4808.