Hello Sir ,
I have created one API but i want to consume response from Other API Parameter in Json format.
I have Pass User Id and Password these Uerd id password match in my side than fetch some Parameter to other API execute by Client.
{ "UserId":'Ashish', "Password":'Ashish@123' }
Than receiving some parameter whose send by Client. I have sharing the code with Controller in Asp.net kindly help me how to change this code and how to get response parameter than i will update table data value in those parameter base.
[Route("api/PMSDMSResponce/UpdatePMISToDMSStatus")]
[HttpPost]
public WebserviceResponce UpdatePMISToDMSStatus(DocsInfo PMISToDMSResponce)
{
try
{
WebserviceResponce objWebserviceResponce = new WebserviceResponce();
if (PMISToDMSResponce.UserId == "Ashish" && PMISToDMSResponce.Password == "Ashish@123")
{
long Updateresponce = ObjWebServiceBLL.GetDMSresponceDetails(PMISToDMSResponce.DMSDocumentID, PMISToDMSResponce.ProjectID, PMISToDMSResponce.Version);
if (Updateresponce > 0)
{
objWebserviceResponce.ResponseId = 1;
objWebserviceResponce.ResponseMessage = "Success";
}
else
{
objWebserviceResponce.ResponseId = 0;
objWebserviceResponce.ResponseMessage = "Fail";
}
}
else
{
objWebserviceResponce.ResponseId = 2;
objWebserviceResponce.ResponseMessage = "user authentication failed";
}
return objWebserviceResponce;
}
catch (Exception ex)
{
throw ex;
}
}