public ActionResult Create(Models.SBP_BlotterOpening setup) { ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.PostResponse("/api/BlotterOpening/Insert", setup); response.EnsureSuccessStatusCode(); ViewData["SysCurrentDt"] = GetCurrentDT().ToString("dd-MMM-yyyy"); ViewData["BrCode"] = BrCode; return(RedirectToAction("GetAllOpeningAmt")); }
public bool Update(Models.SBP_BlotterOpening blotterDeal) { EntityMapperBlotter <Models.SBP_BlotterOpening, DataAccessLayer.SBP_BlotterOpening> mapObj = new EntityMapperBlotter <Models.SBP_BlotterOpening, DataAccessLayer.SBP_BlotterOpening>(); DataAccessLayer.SBP_BlotterOpening OpeningDealObj = new DataAccessLayer.SBP_BlotterOpening(); OpeningDealObj = mapObj.Translate(blotterDeal); var status = DAL.UpdateOpeningDeals(OpeningDealObj); return(status); }
public JsonResult <Models.SBP_BlotterOpening> GetOpeningDeal(int id) { EntityMapperBlotter <DataAccessLayer.SBP_BlotterOpening, Models.SBP_BlotterOpening> mapObj = new EntityMapperBlotter <DataAccessLayer.SBP_BlotterOpening, Models.SBP_BlotterOpening>(); DataAccessLayer.SBP_BlotterOpening dalOpeningDeal = DAL.GetOpeningDeal(id); Models.SBP_BlotterOpening products = new Models.SBP_BlotterOpening(); products = mapObj.Translate(dalOpeningDeal); return(Json <Models.SBP_BlotterOpening>(products)); }
//[HttpGet] public ActionResult Edit(int id) { ServiceRepository serviceObj = new ServiceRepository(); HttpResponseMessage response = serviceObj.GetResponse("/api/BlotterOpening/GetOpeningDeal?id=" + id.ToString()); response.EnsureSuccessStatusCode(); Models.SBP_BlotterOpening blotterOpening = response.Content.ReadAsAsync <Models.SBP_BlotterOpening>().Result; ViewBag.Title = "All Products"; ViewData["SysCurrentDt"] = GetCurrentDT().ToString("dd-MMM-yyyy"); ViewData["BrCode"] = BrCode; return(View(blotterOpening)); }
public bool Insert(Models.SBP_BlotterOpening blotterDeal) { bool status = false; if (ModelState.IsValid) { EntityMapperBlotter <Models.SBP_BlotterOpening, DataAccessLayer.SBP_BlotterOpening> mapObj = new EntityMapperBlotter <Models.SBP_BlotterOpening, DataAccessLayer.SBP_BlotterOpening>(); DataAccessLayer.SBP_BlotterOpening OpeningDealObj = new DataAccessLayer.SBP_BlotterOpening(); OpeningDealObj = mapObj.Translate(blotterDeal); status = DAL.InsertOpeningDeals(OpeningDealObj); } return(status); }