TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Web Services Using C#
Husain Ahmedabadwala
May 09
2015
Code
1.4
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.Services;
using
EntityLayer;
using
BusinessLayer;
namespace
WebApplication1
{
/// <summary>
/// Summary description for WebService1
/// </summary>
[WebService(Namespace =
"http://tempuri.org/"
)]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(
false
)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public
class
WebService1: System.Web.Services.WebService
{
[WebMethod]
public
PurchaseEntity item(PurchaseEntity Vp)
{
PurchaseBusiness ObjectPurchaseOrder =
new
PurchaseBusiness();
return
ObjectPurchaseOrder.item(Vp);
}
[WebMethod]
public
PurchaseEntity Insert(PurchaseEntity obj1)
{
PurchaseBusiness ObjectPurchaseOrder =
new
PurchaseBusiness();
return
ObjectPurchaseOrder.Insert(obj1);
}
[WebMethod]
public
PurchaseEntity Delete(PurchaseEntity obj2)
{
PurchaseBusiness ObjectPurchaseOrder =
new
PurchaseBusiness();
return
ObjectPurchaseOrder.Delete(obj2);
}
[WebMethod]
public
PurchaseEntity Update(PurchaseEntity pe)
{
PurchaseBusiness ObjectPurchaseOrder =
new
PurchaseBusiness();
return
ObjectPurchaseOrder.Update(pe);
}
}
}
WCF Service
Service Communicate with server