using Swift.DAL.BL.Remit.Transaction;
using Swift.DAL.BL.Remit.Transaction.ThirdParty;
using Swift.DAL.BL.Transaction.ThirdParty.GlobalBank;
using Swift.DAL.SwiftDAL;
using System.Data;
using System.Web.Services;
namespace Swift.web.INTAPI
{
///
/// Summary description for SchedularHelper
///
[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 SchedularHelper : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
///
///
///
/// No of trancaction to be processed from reprocess list
///
///
/// Agent Code
///
///
/// User Name
///
///
/// Password
///
///
///
[WebMethod]
public DbResult ReprocessGiblTransaction(string count, string agentCode, string user, string pass)
{
var dbRes = new DbResult();
var atd = new ApproveTransactionDao();
dbRes = atd.ReprocessBySchedular(count, agentCode, user, pass);
return dbRes;
}
[WebMethod]
public DbResult SyncTransactionStatus(string agentCode, string user, string pass)
{
var dr = new DbResult();
dr.SetError("1", "No data found to sync", "");
var tu = new TransactionUtilityDao();
var dt = tu.GetSyncDateList(agentCode, user, pass);
if (dt == null) return dr;
foreach (DataRow row in dt.Rows)
{
var gbl = new GlobalBankDao();
dr = gbl.SynchronizePinStatus(user, row["date"].ToString());
}
return dr;
}
}
}