Ejemplo n.º 1
0
        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/BlotterReconBreakups/GetBlotterReconBreakupsById?id=" + id.ToString());
            response.EnsureSuccessStatusCode();
            Models.SBP_BlotterReconBreakups BlotterReconBreakup = response.Content.ReadAsAsync <Models.SBP_BlotterReconBreakups>().Result;
            UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterReconBreakup), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString());
            ViewBag.ReconBreakupsBranches = GetAllBranches();
            ViewBag.RTGSTransactionTitles = GetAllRECONBrekupsTransactionTitles();
            var isDateChangable = Convert.ToBoolean(Session["CurrentPagesAccess"].ToString().Split('~')[2]);
            ViewData["isDateChangable"] = isDateChangable;
            return(PartialView("_Edit", BlotterReconBreakup));
        }
Ejemplo n.º 2
0
        public JsonResult <Models.SBP_BlotterReconBreakups> GetBlotterReconBreakupsById(int id)
        {
            EntityMapperBlotterReconBreakups <DataAccessLayer.SBP_BlotterReconBreakups, Models.SBP_BlotterReconBreakups>
            mapObj = new EntityMapperBlotterReconBreakups <DataAccessLayer.SBP_BlotterReconBreakups, Models.SBP_BlotterReconBreakups>();

            DataAccessLayer.SBP_BlotterReconBreakups dalBlotterRB = DAL.GetRBItem(id);
            Models.SBP_BlotterReconBreakups          products     = new Models.SBP_BlotterReconBreakups();
            products = mapObj.Translate(dalBlotterRB);
            return(Json <Models.SBP_BlotterReconBreakups>(products));
        }
Ejemplo n.º 3
0
        public bool UpdateReconBreakups(Models.SBP_BlotterReconBreakups blotterRB)
        {
            bool status = false;

            if (ModelState.IsValid)
            {
                EntityMapperBlotterReconBreakups <Models.SBP_BlotterReconBreakups, DataAccessLayer.SBP_BlotterReconBreakups> mapObj = new EntityMapperBlotterReconBreakups <Models.SBP_BlotterReconBreakups, DataAccessLayer.SBP_BlotterReconBreakups>();
                DataAccessLayer.SBP_BlotterReconBreakups RBObj = new DataAccessLayer.SBP_BlotterReconBreakups();
                RBObj  = mapObj.Translate(blotterRB);
                status = DAL.UpdateReconBreakups(RBObj);
            }
            return(status);
        }
Ejemplo n.º 4
0
        public ActionResult Update(Models.SBP_BlotterReconBreakups BlotterReconBreakups)
        {
            BlotterReconBreakups.RECON_OutFLow = UC.CheckNegativeValue(BlotterReconBreakups.RECON_OutFLow);
            BlotterReconBreakups.UpdateDate    = DateTime.Now;
            if (BlotterReconBreakups.RECON_Date == null)
            {
                BlotterReconBreakups.RECON_Date = DateTime.Now;
            }
            BlotterReconBreakups.CurID = Convert.ToInt16(Session["SelectedCurrency"].ToString());
            ServiceRepository   serviceObj = new ServiceRepository();
            HttpResponseMessage response   = serviceObj.PutResponse("api/BlotterReconBreakups/UpdateReconBreakups", BlotterReconBreakups);

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