Exemplo n.º 1
0
        //[Route("api/{controller}/getlist?pmsStr={pmsStr}")]
        public List <Me_worker> GetList(string pmsStr)
        {
            Dictionary <string, object> pms = ControllerTool.ConvertPms(pmsStr);
            WebApiBasicBll bll = new WebApiBasicBll();

            if (pms == null || pms.Count <= 0)
            {
                return(null);
            }
            else
            {
                return(bll.ReadModelListByPms <Me_worker>(pms));
            }
        }
Exemplo n.º 2
0
        //[Route("api/ado/post/{sqlFileName}/{sqlId}")]
        public int Post(string sqlFileName, string sqlId, [FromBody] object pmsObj)
        {
            List <Dictionary <string, object> > pmsList = pmsObj as List <Dictionary <string, object> >;

            if (pmsList == null || pmsList.Count <= 0)
            {
                Dictionary <string, object> pms = pmsObj as Dictionary <string, object>;
                if (pms != null && pms.Count > 0)
                {
                    pmsList.Add(pms);
                }
                else
                {
                    return(-200);
                }
            }
            WebApiBasicBll bll = new WebApiBasicBll();

            return(bll.QueryInt(sqlFileName, sqlId, pmsList));
        }
Exemplo n.º 3
0
        //[Route("api/{controller}")]
        public void Put([FromBody] object modelObj)
        {
            WebApiBasicBll bll = new WebApiBasicBll();

            bll.UpdateByModel(ModelTool.ChangeObjectToList <Me_worker>(modelObj));
        }
Exemplo n.º 4
0
        //[Route("api/{controller}")]
        public List <Me_worker> GetIndex()
        {
            WebApiBasicBll bll = new WebApiBasicBll();

            return(bll.Index <Me_worker>());
        }
Exemplo n.º 5
0
        //[Route("api/{controller}/getsingle?pmsStr={pmsStr}")]
        public Me_worker GetSingle(string pmsStr)
        {
            WebApiBasicBll bll = new WebApiBasicBll();

            return(bll.ReadModelByPms <Me_worker>(ControllerTool.ConvertPms(pmsStr)));
        }
Exemplo n.º 6
0
        //[Route("api/{controller}?pageIndex={pageIndex}&pageSize={pageSize}")]
        public Tuple <int, List <Me_worker> > Get(int pageIndex, int pageSize)
        {
            WebApiBasicBll bll = new WebApiBasicBll();

            return(bll.Page <Me_worker>(pageIndex, pageSize));
        }
Exemplo n.º 7
0
        //[Route("api/{controller}")]
        public void Delete([FromBody] object pmsObj)
        {
            WebApiBasicBll bll = new WebApiBasicBll();

            bll.DeleteModelByPms <Me_worker>(ModelTool.ChangeObjectToList <Dictionary <string, object> >(pmsObj));
        }
Exemplo n.º 8
0
        //[Route("api/ado/getobj/{sqlFileName}/{sqlId}?pmsStr={pmsStr}")]
        public object GetObj(string sqlFileName, string sqlId, string pmsStr)
        {
            WebApiBasicBll bll = new WebApiBasicBll();

            return(bll.QueryObj(sqlFileName, sqlId, ControllerTool.ConvertPms(pmsStr)));
        }
Exemplo n.º 9
0
        //[Route("api/ado/getdictlist/{sqlFileName}/{sqlId}?pmsStr={pmsStr}")]
        public List <Dictionary <string, object> > GetDictList(string sqlFileName, string sqlId, string pmsStr)
        {
            WebApiBasicBll bll = new WebApiBasicBll();

            return(bll.QueryRecordList(sqlFileName, sqlId, ControllerTool.ConvertPms(pmsStr)));
        }
Exemplo n.º 10
0
        //[Route("api/{controller}")]
        public void Post([FromBody] object modelObj)
        {
            WebApiBasicBll bll = new WebApiBasicBll();

            bll.CreateByModel(ModelTool.ChangeObjectToList <Mes_ua_submit>(modelObj));
        }
Exemplo n.º 11
0
        //[Route("api/{controller}")]
        public List <Mes_ua_submit> GetIndex()
        {
            WebApiBasicBll bll = new WebApiBasicBll();

            return(bll.Index <Mes_ua_submit>());
        }
Exemplo n.º 12
0
        //[Route("api/{controller}?pageIndex={pageIndex}&pageSize={pageSize}")]
        public Tuple <int, List <Mes_ua_submit> > Get(int pageIndex, int pageSize)
        {
            WebApiBasicBll bll = new WebApiBasicBll();

            return(bll.Page <Mes_ua_submit>(pageIndex, pageSize));
        }