Beispiel #1
0
        public JsonResult <Models.SBP_BlotterBreakups> GetBlotterBreakups(int id)
        {
            EntityMapperBlotterBreakups <DataAccessLayer.SBP_BlotterBreakups, Models.SBP_BlotterBreakups> mapObj = new EntityMapperBlotterBreakups <DataAccessLayer.SBP_BlotterBreakups, Models.SBP_BlotterBreakups>();

            DataAccessLayer.SBP_BlotterBreakups dalBlotterBreakups = DAL.GetBlotterBreakups(id);
            Models.SBP_BlotterBreakups          products           = new Models.SBP_BlotterBreakups();
            products = mapObj.Translate(dalBlotterBreakups);
            return(Json <Models.SBP_BlotterBreakups>(products));
        }
Beispiel #2
0
        public JsonResult <Models.SP_GetLatestBreakup_Result> GetAllBlotterBreakups(int UserID, int BranchID, int CurID, int BR)
        {
            EntityMapperBlotterBreakups <DataAccessLayer.SP_GetLatestBreakup_Result, Models.SP_GetLatestBreakup_Result> mapObj = new EntityMapperBlotterBreakups <DataAccessLayer.SP_GetLatestBreakup_Result, Models.SP_GetLatestBreakup_Result>();

            DataAccessLayer.SP_GetLatestBreakup_Result SBP_BlotterBreakupsList    = DAL.GetAllBlotterBreakups(UserID, BranchID, CurID, BR);
            Models.SP_GetLatestBreakup_Result          blotterSBP_BlotterBreakups = new Models.SP_GetLatestBreakup_Result();
            //foreach (var item in SBP_BlotterBreakupsList)
            //{
            blotterSBP_BlotterBreakups = mapObj.Translate(SBP_BlotterBreakupsList);
            //}
            return(Json <Models.SP_GetLatestBreakup_Result>(blotterSBP_BlotterBreakups));
        }
Beispiel #3
0
        public bool UpdateBlotterBreakups(Models.SBP_BlotterBreakups item)
        {
            bool status = false;

            if (ModelState.IsValid)
            {
                EntityMapperBlotterBreakups <Models.SBP_BlotterBreakups, DataAccessLayer.SBP_BlotterBreakups> mapObj = new EntityMapperBlotterBreakups <Models.SBP_BlotterBreakups, DataAccessLayer.SBP_BlotterBreakups>();
                DataAccessLayer.SBP_BlotterBreakups SBP_BlotterBreakupsObj = new DataAccessLayer.SBP_BlotterBreakups();
                SBP_BlotterBreakupsObj = mapObj.Translate(item);
                status = DAL.UpdateBlotterBreakups(SBP_BlotterBreakupsObj);
            }
            return(status);
        }