Ejemplo n.º 1
0
        public JsonResult <Models.SBP_BlotterBreakups> GetBlotterBreakups(int id)
        {
            EntityMapperBlotterBreakups <DataAccessLayer.SBP_BlotterBreakups, Models.SBP_BlotterBreakups> mapObj = new EntityMapperBlotterBreakups <DataAccessLayer.SBP_BlotterBreakups, Models.SBP_BlotterBreakups>();

            DataAccessLayer.SBP_BlotterBreakups dalBlotterBreakups = DAL.GetBlotterBreakups(id);
            Models.SBP_BlotterBreakups          products           = new Models.SBP_BlotterBreakups();
            products = mapObj.Translate(dalBlotterBreakups);
            return(Json <Models.SBP_BlotterBreakups>(products));
        }
Ejemplo n.º 2
0
        public bool UpdateBlotterBreakups(Models.SBP_BlotterBreakups item)
        {
            bool status = false;

            if (ModelState.IsValid)
            {
                EntityMapperBlotterBreakups <Models.SBP_BlotterBreakups, DataAccessLayer.SBP_BlotterBreakups> mapObj = new EntityMapperBlotterBreakups <Models.SBP_BlotterBreakups, DataAccessLayer.SBP_BlotterBreakups>();
                DataAccessLayer.SBP_BlotterBreakups SBP_BlotterBreakupsObj = new DataAccessLayer.SBP_BlotterBreakups();
                SBP_BlotterBreakupsObj = mapObj.Translate(item);
                status = DAL.UpdateBlotterBreakups(SBP_BlotterBreakupsObj);
            }
            return(status);
        }
        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/BlotterBreakups/GetBlotterBreakups?id=" + id.ToString());
            response.EnsureSuccessStatusCode();
            Models.SBP_BlotterBreakups BlotterBreakups = response.Content.ReadAsAsync <Models.SBP_BlotterBreakups>().Result;
            UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(BlotterBreakups), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString());
            return(PartialView("_Edit", BlotterBreakups));
        }