using System;
使用System. Web;
使用System.Collections;
使用System.Web.Services;
使用System.Web.Services.Protocols;
使用System.Web.Script.Services;
使用StoreHouse. Common;
使用StoreHouse.IDAL;
使用StoreHouse.Model;
使用System.Data.SqlClient;
使用System.Data;
使用System.Xml;
使用System.Data;
使用System.Xml;
使用System. Collections.Generic;
使用System.Runtime.InteropServices;
使用System.Net.NetworkInformation;
///
/// PageService 的摘要說明
///
/// PageService 的摘要說明
/// ;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
公共類別PageService : System.Web。 Services.WebService
{
ArrayList al = new ArrayList();
public PageService()
{
//如果使用設計的元件,請取消註解以下行
//InitializeComponent();
}
/// ;
/// 新增收藏
/// ;
///
產品ID
///
用戶ID;
///
(標識產品收藏、企業收藏、電子樣本收藏、圖庫收藏)
///
回傳收藏狀態;
[WebMethod]
public int AddCollect(int fid,int sid, int flag)
{
IProductDataProvider ipdp = ProviderManager.Create
();
IEnterpriseDataProvider iedp = ProviderManager.CreateIEnterpriseDataProvider iedp = ProviderManager.CreateProductCollect pc = new ProductCollect();
pc.ProductID = fid;
pc.UserID = sid;
pc.AddDatetime = DateTime.Now; pc.pc. Now;
return ipdp.AddProductCollect(pc);
}
else if (flag == 2)
{
EnterpriseCollect ec = new EnterpriseCollect();
ec. fid;
ec.UserID = sid;
ec.AddDatetime = DateTime.Now;
ec.UpdateDatetime = DateTime.Now;
返回iedp.AddEnterpriseCollect(ec);
}
返回iedp.AddEnterpriseCollect(ec);
}
返回iedp.AddEnterpriseCollect(ec);
}
返回iedp.AddEnterpriseCollect(ec);
}
返回iedp.AddEnterpriseCollect(ec);
}
回>else if (flag == 3)
{
EElecSampleCollect epesc = new EElecSampleCollect();
epesc.EElecSampleID = fid;
epesc.UserID = sid; .Now;
epesc.UpdateDatetime = DateTime.Now;
回傳ipdp.AddEElecSampleCollect(epesc);
}
elseColif (flag == 4)
{ EPA new EPAtlasCollect ();
epac.EPAtlasID= fid;
epac.UserID = sid;
epac.AddDatetime = DateTime.Now; epac.UpdateDatetime = Datetime = DateTime.Now; epac.UpdateDatetime = Datetime.Nowre; .AddEPAtlasCollect(epac); } 回傳000000; }