/***********Method InsertFormFields Added by:Zeeshan*******/ public bool InsertFormFields(FormFields formField) { try { string strJSON = JsonConvert.SerializeObject(formField); //build URI string strURI = Product.BaseProductUri + "/pdf/" + FileName + "/fields"; string signedURI = Utils.Sign(strURI); StreamReader reader = new StreamReader(Utils.ProcessCommand(signedURI, "PUT", strJSON)); //further process JSON response strJSON = reader.ReadToEnd(); //Parse the json string to JObject JObject parsedJSON = JObject.Parse(strJSON); BaseResponse stream = JsonConvert.DeserializeObject <BaseResponse>(parsedJSON.ToString()); if (stream.Code == "200" && stream.Status == "OK") { return(true); } else { return(false); } } catch (Exception ex) { throw new Exception(ex.Message); } }
/***********Method InsertFormFields Added by:Zeeshan*******/ public bool InsertFormFields(FormFields formField) { try { string strJSON = JsonConvert.SerializeObject(formField); //build URI string strURI = Product.BaseProductUri + "/pdf/" + FileName + "/fields"; string signedURI = Utils.Sign(strURI); StreamReader reader = new StreamReader(Utils.ProcessCommand(signedURI, "PUT", strJSON)); //further process JSON response strJSON = reader.ReadToEnd(); //Parse the json string to JObject JObject parsedJSON = JObject.Parse(strJSON); BaseResponse stream = JsonConvert.DeserializeObject<BaseResponse>(parsedJSON.ToString()); if (stream.Code == "200" && stream.Status == "OK") return true; else return false; } catch (Exception ex) { throw new Exception(ex.Message); } }