//[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)); } }
//[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)); }
//[Route("api/{controller}")] public void Put([FromBody] object modelObj) { WebApiBasicBll bll = new WebApiBasicBll(); bll.UpdateByModel(ModelTool.ChangeObjectToList <Me_worker>(modelObj)); }
//[Route("api/{controller}")] public List <Me_worker> GetIndex() { WebApiBasicBll bll = new WebApiBasicBll(); return(bll.Index <Me_worker>()); }
//[Route("api/{controller}/getsingle?pmsStr={pmsStr}")] public Me_worker GetSingle(string pmsStr) { WebApiBasicBll bll = new WebApiBasicBll(); return(bll.ReadModelByPms <Me_worker>(ControllerTool.ConvertPms(pmsStr))); }
//[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)); }
//[Route("api/{controller}")] public void Delete([FromBody] object pmsObj) { WebApiBasicBll bll = new WebApiBasicBll(); bll.DeleteModelByPms <Me_worker>(ModelTool.ChangeObjectToList <Dictionary <string, object> >(pmsObj)); }
//[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))); }
//[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))); }
//[Route("api/{controller}")] public void Post([FromBody] object modelObj) { WebApiBasicBll bll = new WebApiBasicBll(); bll.CreateByModel(ModelTool.ChangeObjectToList <Mes_ua_submit>(modelObj)); }
//[Route("api/{controller}")] public List <Mes_ua_submit> GetIndex() { WebApiBasicBll bll = new WebApiBasicBll(); return(bll.Index <Mes_ua_submit>()); }
//[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)); }