Esempio n. 1
0
        public ActionResult MaintainLimitFeeIBMB([FromBody] MaintainLimitFeeIBMB model)
        {
            bool   blnResult     = false;
            string ErrMsg        = "";
            string EffectiveDate = "";

            try
            {
                model.NIK    = _intNIK;
                model.Module = strModule;
                var Content = new StringContent(JsonConvert.SerializeObject(model));
                using (HttpClient client = new HttpClient())
                {
                    client.BaseAddress          = new Uri(_strAPIUrl);
                    Content.Headers.ContentType = new MediaTypeWithQualityHeaderValue("application/json");
                    var     request   = client.PostAsync("/api/IBMB/MaintainLimitFeeIBMB", Content);
                    var     response  = request.Result.Content.ReadAsStringAsync().Result;
                    JObject strObject = JObject.Parse(response);
                    blnResult     = strObject.SelectToken("blnResult").Value <bool>();
                    ErrMsg        = strObject.SelectToken("errMsg").Value <string>();
                    EffectiveDate = strObject.SelectToken("effectiveDate").Value <string>();
                }
            }
            catch (Exception e)
            {
                ErrMsg = e.Message;
            }
            return(Json(new { blnResult, ErrMsg, EffectiveDate }));
        }
Esempio n. 2
0
        public JsonResult MaintainLimitFeeIBMB([FromBody] MaintainLimitFeeIBMB model)
        {
            bool   blnResult     = false;
            string ErrMsg        = "";
            string EffectiveDate = "";

            blnResult = cls.ReksaMaintainLimitFeeIBMB(model, out EffectiveDate, out ErrMsg);
            ErrMsg    = ErrMsg.Replace("ReksaMaintainLimitFeeIBMB - Core .Net SqlClient Data Provider\n", "");
            return(Json(new { blnResult, ErrMsg, EffectiveDate }));
        }