Exemple #1
0
        public JsonResult <Models.SBP_BlotterDMMO> GetblotterDMMO(int id)
        {
            EntitiyMapperBlotterDMMO <DataAccessLayer.SBP_BlotterDMMO, Models.SBP_BlotterDMMO> mapObj = new EntitiyMapperBlotterDMMO <DataAccessLayer.SBP_BlotterDMMO, Models.SBP_BlotterDMMO>();

            DataAccessLayer.SBP_BlotterDMMO dalblotterDMMO = DAL.GetDMMOItem(id);
            Models.SBP_BlotterDMMO          products       = new Models.SBP_BlotterDMMO();
            products = mapObj.Translate(dalblotterDMMO);
            return(Json <Models.SBP_BlotterDMMO>(products));
        }
Exemple #2
0
        public bool UpdateDMMO(Models.SBP_BlotterDMMO blotterDMMO)
        {
            bool status = false;

            if (ModelState.IsValid)
            {
                EntitiyMapperBlotterDMMO <Models.SBP_BlotterDMMO, DataAccessLayer.SBP_BlotterDMMO> mapObj = new EntitiyMapperBlotterDMMO <Models.SBP_BlotterDMMO, DataAccessLayer.SBP_BlotterDMMO>();
                DataAccessLayer.SBP_BlotterDMMO DMMOObj = new DataAccessLayer.SBP_BlotterDMMO();
                DMMOObj = mapObj.Translate(blotterDMMO);
                status  = DAL.UpdateDMMO(DMMOObj);
            }
            return(status);
        }
Exemple #3
0
        public JsonResult <List <Models.SP_GetSBP_DMMO_Result> > GetAllblotterDMMO(int UserID, int BranchID, int CurID, int BR, string DateVal)
        {
            EntitiyMapperBlotterDMMO <DataAccessLayer.SP_GetSBP_DMMO_Result, Models.SP_GetSBP_DMMO_Result> mapObj = new EntitiyMapperBlotterDMMO <DataAccessLayer.SP_GetSBP_DMMO_Result, Models.SP_GetSBP_DMMO_Result>();

            List <DataAccessLayer.SP_GetSBP_DMMO_Result> blotterDMMOList = DAL.GetAllBlotterDMMO(UserID, BranchID, BR, DateVal);
            List <Models.SP_GetSBP_DMMO_Result>          blotterDMMO     = new List <Models.SP_GetSBP_DMMO_Result>();

            foreach (var item in blotterDMMOList)
            {
                blotterDMMO.Add(mapObj.Translate(item));
            }
            return(Json <List <Models.SP_GetSBP_DMMO_Result> >(blotterDMMO));
        }