Esempio n. 1
0
        private ModifyRequest CreateModifyRequest(RequestStatusDetail status)
        {
            var modifyRequest = new ModifyRequest();

            modifyRequest.RequestId      = txt_requestId.Text;
            modifyRequest.ApprovalStatus = (int)status;

            return(modifyRequest);
        }
Esempio n. 2
0
        public void ModifyRequestIdHttpPost(ModifyRequest modifyRequest)
        {
            try
            {
                // Prepare web request...
                var            modifyRequestUrl = ConfigurationManager.ConnectionStrings["ModifyRequestUrl"].ConnectionString;
                HttpWebRequest request          = (HttpWebRequest)WebRequest.Create(modifyRequestUrl); request.Method = "POST";
                request.ContentType      = "application/json";
                modifyRequest.UpdateUser = "******";
                string       modifyRequestjsontrans = JsonConvert.SerializeObject(modifyRequest);
                StreamWriter writer = new StreamWriter(request.GetRequestStream(), Encoding.ASCII);
                writer.Write(modifyRequestjsontrans);
                writer.Flush();

                // Get response
                HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            }
            catch (Exception)
            {
                throw;
            }
        }