Esempio n. 1
0
        public JsonResult <Models.SBP_BlotterSetup> GetSetUpItem(int id)
        {
            EntityMapperBlotter <DataAccessLayer.SBP_BlotterSetup, Models.SBP_BlotterSetup> mapObj = new EntityMapperBlotter <DataAccessLayer.SBP_BlotterSetup, Models.SBP_BlotterSetup>();

            DataAccessLayer.SBP_BlotterSetup dalsetup = DAL.GetSetUpItem(id);
            Models.SBP_BlotterSetup          products = new Models.SBP_BlotterSetup();
            products = mapObj.Translate(dalsetup);
            return(Json <Models.SBP_BlotterSetup>(products));
        }
Esempio n. 2
0
        public bool UpdateSetUp(Models.SBP_BlotterSetup blottersetup)
        {
            EntityMapperBlotter <Models.SBP_BlotterSetup, DataAccessLayer.SBP_BlotterSetup> mapObj = new EntityMapperBlotter <Models.SBP_BlotterSetup, DataAccessLayer.SBP_BlotterSetup>();

            DataAccessLayer.SBP_BlotterSetup setupObj = new DataAccessLayer.SBP_BlotterSetup();
            setupObj = mapObj.Translate(blottersetup);
            var status = DAL.UpdateSetUp(setupObj);

            return(status);
        }
Esempio n. 3
0
        public bool InsertSetup(Models.SBP_BlotterSetup blottersetup)
        {
            bool status = false;

            if (ModelState.IsValid)
            {
                EntityMapperBlotter <Models.SBP_BlotterSetup, DataAccessLayer.SBP_BlotterSetup> mapObj = new EntityMapperBlotter <Models.SBP_BlotterSetup, DataAccessLayer.SBP_BlotterSetup>();
                DataAccessLayer.SBP_BlotterSetup setupObj = new DataAccessLayer.SBP_BlotterSetup();
                setupObj = mapObj.Translate(blottersetup);
                status   = DAL.InsertSetUp(setupObj);
            }
            return(status);
        }