[WebMethod]
public string SaveGrid(List<BerthApp> myberthapps)
{
string mystatus = "Waiting";
if (myberthapps[0].newStatus.ToString().Contains("grdFrom"))
{
mystatus = "Ongoing";
}
else if(myberthapps[0].newStatus.ToString().Contains("grdTo"))
{
mystatus = "Waiting";
}
//call saving operation
System.Threading.Thread.Sleep(1000);//remove this in live
return "Oh Yeah. This is web service. Got your request to save the following:"
+ "<br />" + "Berth ID: " + myberthapps[0].BerthID
+ "<br />" + "Vessel: " + myberthapps[0].Vessel
+ "<br />" + "ETA: " + myberthapps[0].ETA
+ "<br />" + "newStatus: " + mystatus;
}
Friday, May 17, 2013
Part 2: Drag And Drop Between GridViews (And Save It Using Web Service) In ASP.NET
This is a followup article on my previous one Drag And Drop Between GridViews In ASP.NET. I decided to add the saving function on the project. With this update, you will learn how to use web service to save the item you have drag from the source gridview and drop into the destination gridvew. One new item which is "WebService1.asmx" is added on the solution. The web service accepts a list with custom type.
Android App Development Using PhoneGap
We just recently started extending our in-house systems to mobile devices. At first, we stepped into mobile web development and now we are planning to convert these web apps in to android native apps. The first logical choice before is to use Android Development Tools (ADT) SDK and build our apps from scratch but time and resources are things that we lacked of. This is when we met PhoneGap. A framework which allows web developers to use Javascript, CSS and HTML to develop native android apps. After several weeks of research and studying, I came up with a training material for my team. This document targets, web developers who are new to mobile app or android app development. If your interested, download it from the link after the jump.


Labels:
JavaScript,
Mobile Device,
PhoneGap
Thursday, May 16, 2013
How to edit Hosts File in Mac OS X - Mountain Lion
Recently I switched from PC to Mac. I also started to setup my development environment on Mac and as I do, I learn lot of new things everyday. One new thing I learned is how to edit Hosts File in Mac to map hostnames to IP addresses. I've already touched similar topic before but it is for Windows which you can back read from here. Now lets go back to Mac. To edit the hosts file, just follow these steps.
1. Open the Terminal app, either by using Sportlight or by going to your Applications > Utilities > Terminal.

1. Open the Terminal app, either by using Sportlight or by going to your Applications > Utilities > Terminal.

Labels:
Mac,
Mountain Lion
Wednesday, April 03, 2013
Drag And Drop Between GridViews In ASP.NET
A new project of ours require us to use drag and drop functionality between multiple GridView controls. User should be able to drag any row from one grid and drop it to a destination grid. Once the user is already satisfied with the changes, clicking Save button should trigger the update in the database. To achieve this, we used JQuery for the client-side interactions.

Sample project source is available for download after the jump.
Sample project source is available for download after the jump.
Labels:
ASP .NET,
C#,
Coding Tips and Tricks,
jQuery
Wednesday, March 27, 2013
Reduce Tab Clutter and Save Memory in Google Chrome
It is not a secret that I rarely use Internet Explorer. I know IE is much stable and secure nowadays but it is already my habit to use either Chrome or Firefox over it. If there is one thing I hate about Google Chrome, it would be memory hogging specially when your opening too many tabs. You can verify this by launching your Task Manager and there you will see multiple chrome.exe processes running. OneTab chrome extension can solve this little problem. According to their product page at Chrome webstore, it can save up to 95% memory and ofcourse reduce tab clutter. I tried it myself and the result is pretty good.
Wednesday, March 06, 2013
Leaflet JavaScript Library Basics
I've been busy for a while so please excuse me if I haven't posted for a long time. My dev team has been working with Leaflet JavaScript lately for our geo mapping project. For starters, Leaflet is a open-source and mobile friendly JavaScript library for dealing with interactive maps. It is light-weight but fullpacked JS code which makes it perfect for developers who want to use online maps in their project. It supports open maps such as Google Maps and OpenStreetMap. To help you learn the basics, I'm sharing my training material on Leaflet Geo Mapping. Get the PowerPoint presentation and the sample projects after the jump.
Labels:
ASP .NET,
JavaScript
Monday, February 18, 2013
Windows Communication Foundation Basics
Do you want learn WCF (Windows Communication Foundation) programming? Are you lost with the available tutorials in the internet? if you nod YES then give my free presentation material a try. I have written this PowerPoint presentation for our development team who are just starting to learn the basics of WCF. The presentation includes the following topics:

- Introduction to WCF
- Comparison of WCF against other .NET tech acrnoyms
- WCF Vs. Web Services
- When to use WCF?
- Hello World Example
You can download the full PowerPoint presentation from the links posted after the jump.

- Introduction to WCF
- Comparison of WCF against other .NET tech acrnoyms
- WCF Vs. Web Services
- When to use WCF?
- Hello World Example
You can download the full PowerPoint presentation from the links posted after the jump.
Tuesday, February 05, 2013
Change the default browser of Visual Studio
I hate using Internet Explorer when surfing and honestly I never used it in years until I started coding for a startup project again. Yeah it is not unusual that Microsoft Visual Studio uses IE to preview web projects. I tried living with it but I lost patience so I decided to change the default browser. Don't try to look for that option at Tools > Options because you'll just get frustrated. Continue reading to learn the very easy way to switch browser.
Labels:
Visual Studio 2010
Tuesday, December 25, 2012
Avoid Accidentally Replying To All In Outlook
No matter how careful you are, sometimes bad luck can win over you. Replying to all if you intend not to is unprofessional and sometimes can get you in trouble. One story you might already heard of is about a woman who got fired after she accidentally sent a snarky email about how she disliked her supervisor. The email was sent to all instead to a few close colleagues. Fortunately you can prevent this from happening by removing the reply to all button. It can be done in Outlook by following the steps described after the jump.
Labels:
MS Outlook
Thursday, November 29, 2012
Crystal Report Client Side Printing in ASP.NET
To those who are looking for solution to list all local printers or printers installed on client machine in ASP.NET application, the answer is none. This is because of security concerns when running web apps. Operating system can't just allow web apps to sneak into the computer's resources. If your deploying your web app as intranet application, you can add your shared printers on your web server and then explicitly list all printers. Sample code is available after the jump.
Labels:
ASP .NET,
Common Problem Fixed
Subscribe to:
Posts (Atom)
