Exemplo n.º 1
0
        public void SaveClaimantDetail(ClaimRegisterModel ClaimModel)
        {
            bool successmsg = false;

            // loader display

            successmsg = SavePolicy(ClaimModel);

            // loader hide

            if (successmsg == true)
            {
                pnlClaimNotification.Visible = false;
                pnlClamantDetail.Visible     = false;
                PnlMsg.Visible = true;
                EmptyAlltext();
            }
            //Thread.Sleep(10000);   //1sec=1000ms

            //pnlClaimNotification.Visible = true;
            //pnlClamantDetail.Visible = false;
            //PnlMsg.Visible = false;
        }
Exemplo n.º 2
0
        private bool SavePolicy(ClaimRegisterModel ClaimModel)
        {
            try
            {
                var LocalIceCashReqUrl = "http://localhost:6220/api/Claimant/";
                var client             = new RestClient(LocalIceCashReqUrl + "SaveClaimDetails");

                //var client = new RestClient(ApiURL + "SaveClaimDetails");
                var request = new RestRequest(Method.POST);
                request.AddHeader("content-type", "application/json");
                request.AddHeader("password", Pwd);
                request.AddHeader("username", username);
                request.RequestFormat = DataFormat.Json;
                request.AddJsonBody(ClaimModel);
                IRestResponse response = client.Execute(request);
                var           result   = JsonConvert.DeserializeObject <Messages>(response.Content);
                return(result.Suceess);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Exemplo n.º 3
0
 private void txtSearchVrnPolicy_TextChanged(object sender, EventArgs e)
 {
     objClaimModel = new ClaimRegisterModel();
 }