public ActionResult Edit(int id, FormCollection form)
        {
            #region Added by shakir (Currency parameter)
            var selectCurrency = (dynamic)null;
            if (form["selectCurrency"] != null)
            {
                selectCurrency = Convert.ToInt32(form["selectCurrency"].ToString());
            }
            else
            {
                selectCurrency = Convert.ToInt32(Session["SelectedCurrency"].ToString());
            }

            UtilityClass.GetSelectedCurrecy(selectCurrency);
            #endregion


            ServiceRepository   serviceObj = new ServiceRepository();
            HttpResponseMessage response   = serviceObj.GetResponse("/api/BlotterRTGS/GetBlotterRTGS?id=" + id.ToString());
            response.EnsureSuccessStatusCode();
            Models.SBP_BlotterRTGS BlotterRTGS = response.Content.ReadAsAsync <Models.SBP_BlotterRTGS>().Result;
            UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterRTGS), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString());
            ViewBag.RTGSTransactionTitles = GetAllRTGSTransactionTitles();
            var isDateChangable = Convert.ToBoolean(Session["CurrentPagesAccess"].ToString().Split('~')[2]);
            ViewData["isDateChangable"] = isDateChangable;
            return(PartialView("_Edit", BlotterRTGS));
        }
Example #2
0
        public JsonResult <Models.SBP_BlotterRTGS> GetBlotterRTGS(int id)
        {
            EntityMapperBlotterRTGS <DataAccessLayer.SBP_BlotterRTGS, Models.SBP_BlotterRTGS>
            mapObj = new EntityMapperBlotterRTGS <DataAccessLayer.SBP_BlotterRTGS, Models.SBP_BlotterRTGS>();

            DataAccessLayer.SBP_BlotterRTGS dalBlotterRTGS = DAL.GetRTGSItem(id);
            Models.SBP_BlotterRTGS          products       = new Models.SBP_BlotterRTGS();
            products = mapObj.Translate(dalBlotterRTGS);
            return(Json <Models.SBP_BlotterRTGS>(products));
        }
Example #3
0
        public bool UpdateRTGS(Models.SBP_BlotterRTGS blotterRTGS)
        {
            bool status = false;

            if (ModelState.IsValid)
            {
                EntityMapperBlotterRTGS <Models.SBP_BlotterRTGS, DataAccessLayer.SBP_BlotterRTGS> mapObj = new EntityMapperBlotterRTGS <Models.SBP_BlotterRTGS, DataAccessLayer.SBP_BlotterRTGS>();
                DataAccessLayer.SBP_BlotterRTGS RTGSObj = new DataAccessLayer.SBP_BlotterRTGS();
                RTGSObj = mapObj.Translate(blotterRTGS);
                status  = DAL.UpdateRTGS(RTGSObj);
            }
            return(status);
        }
        public ActionResult Update(Models.SBP_BlotterRTGS BlotterRTGS)
        {
            BlotterRTGS.RTGS_OutFLow = UC.CheckNegativeValue(BlotterRTGS.RTGS_OutFLow);
            BlotterRTGS.UpdateDate   = DateTime.Now;
            if (BlotterRTGS.RTGS_Date == null)
            {
                BlotterRTGS.RTGS_Date = DateTime.Now;
            }
            BlotterRTGS.CurID = Convert.ToInt16(Session["SelectedCurrency"].ToString());
            ServiceRepository   serviceObj = new ServiceRepository();
            HttpResponseMessage response   = serviceObj.PutResponse("api/BlotterRTGS/UpdateRTGS", BlotterRTGS);

            response.EnsureSuccessStatusCode();
            UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterRTGS), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString());
            return(RedirectToAction("BlotterRTGS"));
        }