Ejemplo n.º 1
0
        /// <summary>
        /// 查询企业单位数据集合
        /// </summary>
        /// <param name="searchEntity">企业单位查询条件对象</param>
        /// <returns></returns>
        public CompanyList GetCompanyList(ParamsCompanySearch searchEntity)
        {
            Dictionary <string, string> paramsList = new Dictionary <string, string>()
            {
                { "page", searchEntity.PageIndex.ToString() },
                { "rows", searchEntity.PageSize.ToString() },
                { "unitId", searchEntity.UnitId },
                { "unitName", searchEntity.UnitName },
                { "linkman", searchEntity.linkman }
            };
            CompanyList result = CallAPIHelper.CallAPIInPOST <CompanyList>(APIAddressSetting.API_POST_GETUnitList, paramsList);

            if (result != null && result.rows != null)
            {
                result.rows.ToList().ForEach(d =>
                {
                    d.setDate = DateTimeHelper.ConvertIntToDateTimeString(d.setDate);
                    if (!string.IsNullOrEmpty(d.notused))
                    {
                        d.State = d.notused == "0" ? "已停用" : "已启用";
                    }
                });
            }
            return(result);
        }
Ejemplo n.º 2
0
        public ActionResult LoadCompanyList(ParamsCompanySearch queryData)
        {
            queryData.PageIndex = 0;
            queryData.PageSize  = 0;
            var result = _cServices.GetCompanyList(queryData);

            return(Json(result, JsonRequestBehavior.AllowGet));
        }