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)); }
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); }