Sivish Web Solutions

Navigation Menu

Creating Indexed Product Listings in ASP.Net MVC

Posted by on Sep 24, 2013 in ASP.NET, Microsoft | 0 comments

In my recent project my client wanted to have index options for authors / manufacturers. Like the following A B C D.. E I just wanted to make changes in my cshtml itself and dont want to change anything in the controllers or dont want to make it complicated. I may be very lazy ;-). So I came up with this idea. As you aware, MVC binds Model to view. I am using IList<Authors>. So I used the following code in my view. <div id=”pagination-bottom” class=”pagination pagination-centered”> @if (Model.Count > 0) { List<string> alpha = Model.Select(u => u.Name.Substring(0, 1)).Distinct().ToList<String>(); alpha.Sort(); <ul class=’unstyled’> @foreach (string al in alpha) { <li><a href=”@Request.Url.Scheme://@Request.Url.Authority@Request.Url.LocalPath?filter=@al”> @al</a></li> } </ul> } </div>   IList<ManufacturerModel> filteredModel; filteredModel = Model; var filter = Request.QueryString[“filter”]; if (filter != null) { filteredModel = Model.Where(m => m.Name.StartsWith(filter)).ToList<ManufacturerModel>(); }   Hope this helps some one in need…...

Read More

Extracting all the column names with User descriptive from HP Quality Center.

Posted by on Jun 28, 2013 in Blog, HPQC | 2 comments

I was struggling hard to find out the column names to extract values from HP Quality Center database.  Most of us know the user defined name that is available in the HP QC application. But in order to extract data or to write custom reports using vb script or any other information  we need database field names. Some time there will be names like “Custom 1” or “User 1” are there in HP QC application and people specifically need that field in the report. I was going crazy for a while to find those names. After some research, I wrote the following piece of code which extracts all the user  defined fields from HP QC database. Hope this helps some one in need..   TDAPIOLELib.Command cmd = (TDAPIOLELib.Command)td.Command; cmd.CommandText = "SELECT SF_COLUMN_NAME, SF_USER_LABEL FROM SYSTEM_FIELD where SF_TABLE_NAME='BUG' order by SF_COLUMN_NAME"; TDAPIOLELib.Recordset rs = (TDAPIOLELib.Recordset)cmd.Execute(); using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\qccolumnmapping.txt")) { while (!rs.EOR) { file.WriteLine(rs["SF_COLUMN_NAME"] + "," + rs["SF_USER_LABEL"]); rs.Next(); } }...

Read More

Setting up payment gateway in India

Posted by on Dec 16, 2012 in ASP.NET, Blog | 1 comment

Recently one of my client required have an e-commerce set up. So I have started inquiring about various online payment options. As I am a free lancer from US, I have very little idea about payment gateways in India. When I have started gathering information about it, I shocked about the formalities they have and the cost they are asking to set up and AMC.    In US, the leading payment providers such as Paypal,  and Google are following simple and straight forward processes which will take only less than a day to set up. But in India it is very difficult and most of the payment gate way service providers are not transparent. They are not ready to reveal about their service fees. Why is that? Whenever a person needs to have such service, he should be able to compare the services provided by them. finally I found a good document available in the internet. Thanks to the person who put together this information. ...

Read More

Windows 7 – Lenovo 510 Intermittent freezing, hang and resumes automatically…

Posted by on Jun 14, 2012 in Blog, Windows 7, Windows 8 | 0 comments

I am having Lenovo 510 which I bought for $1500 and for the past 2 months I was facing strange problem. While I was using the system, The system got freezed, mouse cursor wont move, the key boards wont work, the hard drive stops rotating (temporary death 🙂 ) and it resumed automatically.  It was very annoying especially for a web developer and designer who is using the system for more than 10 hours per day.  I was not able to find any single solution for this issues. Every forum I visited, they asked me to check recently installed drivers and uninstall one by one.. Come on. Are you kidding? Finally today, The system started hanging more frequently and I about to broke my key board but I resisted my angry and started searching in google and the first result which I got is from neowin and they have given me the clue.. Yes… The have provided me with Microsoft HOTFIX.. and I have installed.. voila… The problem disappeared.   Thanks Neowin…   Now, I am back with normal mode.   Happy...

Read More