using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using Entity_Card;
using BAL_Card;
namespace WebService1
{
/// <summary>
/// Summary description for Service1
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[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 Service1 : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
[WebMethod]
public string Add(DataSet ds)
{
string result ="false";
Entity_Card_Input objEntity = new Entity_Card_Input();
BL_Card_Input objBL = new BL_Card_Input();
for(int i=0;i<ds.Tables[0].Rows.Count;i++)
{
objEntity.PONo = Convert.ToInt64(ds.Tables[0].Rows[i]["EBELN"].ToString());
objEntity.PRNo = Convert.ToInt64(ds.Tables[0].Rows[i]["BANFN"].ToString());
objEntity.Amt_PO = Convert.ToInt64(ds.Tables[0].Rows[i]["NETPR"].ToString());
result = objBL.Insert_PO_WebService(objEntity).ToString();
}
return result;
}
}
}
Additional information: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt64(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Convert.ToInt64(String value)
at WebService1.Service1.Add(DataSet ds) in asmx.cs file line 46
--- End of inner exception stack trace ---
i dont understand why i am getting this kind of error,when i run my windows application..Please Help!
Thanks and Regards,
Hoosha Boosha
ANU_DGR8, if this helps please login to Mark As Answer. | Alert Moderator