コード例 #1
0
        public JsonResult <Models.SBP_BlotterCRD> GetblotterCRD(int id)
        {
            EntitiyMapperBlotterCRD <DataAccessLayer.SBP_BlotterCRD, Models.SBP_BlotterCRD> mapObj = new EntitiyMapperBlotterCRD <DataAccessLayer.SBP_BlotterCRD, Models.SBP_BlotterCRD>();

            DataAccessLayer.SBP_BlotterCRD dalblotterCRD = DAL.GetCRDItem(id);
            Models.SBP_BlotterCRD          products      = new Models.SBP_BlotterCRD();
            products = mapObj.Translate(dalblotterCRD);
            return(Json <Models.SBP_BlotterCRD>(products));
        }
コード例 #2
0
        public bool UpdateCRD(Models.SBP_BlotterCRD blotterCRD)
        {
            bool status = false;

            if (ModelState.IsValid)
            {
                EntitiyMapperBlotterCRD <Models.SBP_BlotterCRD, DataAccessLayer.SBP_BlotterCRD> mapObj = new EntitiyMapperBlotterCRD <Models.SBP_BlotterCRD, DataAccessLayer.SBP_BlotterCRD>();
                DataAccessLayer.SBP_BlotterCRD CRDObj = new DataAccessLayer.SBP_BlotterCRD();
                CRDObj = mapObj.Translate(blotterCRD);
                status = DAL.UpdateCRD(CRDObj);
            }
            return(status);
        }