public string AssociateSupport(int associateID, string message, string uname) { int associateId = associateID; string sMsg = message; HttpResponseMessage resp = new HttpResponseMessage(System.Net.HttpStatusCode.BadRequest); using (WcrHttpClient client = new WcrHttpClient(uname)) { resp = client.PutAsJsonAsync(string.Format("api/EmailServices/WcrAssociateSupport?inAssociateId={0}&inMessage={1}", associateId, sMsg), string.Empty).Result; int Id = JsonConvert.DeserializeObject <int>(resp.Content.ReadAsStringAsync().Result); if (Id == 0) { return(Id.ToString()); } else { return(ClsCommon.InactiveValue.ToString()); } } }
/// <summary> /// This Method is used to Post data into tbl_sale table /// </summary> /// <param name="objAssociateRegistration"></param> /// <returns>1 for success and -1 for fail</returns> public string ResendActivationCode(string _Email) { WcrCryptography crypto = new WcrCryptography(); HttpResponseMessage resp = new HttpResponseMessage(System.Net.HttpStatusCode.BadRequest); WcrClassLibrary.DataObjects.EmailAddress sqlParams = new WcrClassLibrary.DataObjects.EmailAddress(); sqlParams.Email = crypto.WcrSimpleEncrypt(_Email); using (WcrHttpClient client = new WcrHttpClient(WcrVault.Gateway.getwcrusername, WcrVault.Gateway.getwcrpassword)) { resp = client.PutAsJsonAsync("api/AccountCreation/ResendActivationCode", sqlParams).Result; int Id = JsonConvert.DeserializeObject <int>(resp.Content.ReadAsStringAsync().Result); if (Id > 0) { return(Id.ToString()); } else { return(ClsCommon.InactiveValue.ToString()); } } }