public JsonResult <Models.NostroBank> GetNostroBank(int id) { EntityMapperNostroBank <DataAccessLayer.NostroBank, Models.NostroBank> mapObj = new EntityMapperNostroBank <DataAccessLayer.NostroBank, Models.NostroBank>(); DataAccessLayer.NostroBank dalBlotterTBO = DAL.GetNostroBank(id); Models.NostroBank products = new Models.NostroBank(); products = mapObj.Translate(dalBlotterTBO); return(Json <Models.NostroBank>(products)); }
public bool UpdateNostroBank(Models.NostroBank item) { bool status = false; if (ModelState.IsValid) { EntityMapperNostroBank <Models.NostroBank, DataAccessLayer.NostroBank> mapObj = new EntityMapperNostroBank <Models.NostroBank, DataAccessLayer.NostroBank>(); DataAccessLayer.NostroBank NostroBankObj = new DataAccessLayer.NostroBank(); NostroBankObj = mapObj.Translate(item); status = DAL.UpdateNostroBank(NostroBankObj); } 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/NostroBank/GetNostroBank?id=" + id.ToString()); response.EnsureSuccessStatusCode(); Models.NostroBank NostroBank = response.Content.ReadAsAsync <Models.NostroBank>().Result; UtilityClass.ActivityMonitor(Convert.ToInt32(Session["UserID"]), Session.SessionID, Request.UserHostAddress.ToString(), new Guid().ToString(), JsonConvert.SerializeObject(NostroBank), this.RouteData.Values["action"].ToString(), Request.RawUrl.ToString()); return(PartialView("_Edit", NostroBank)); }