Example #1
0
        /// <summary>
        /// 获取列表
        /// </summary>
        public ActionResult GetDataGridJsonV(string userID)
        {
            SplitPage s = new SplitPage()
            {
                Conditions = new Conditions[]
                {
                    new Conditions()
                    {
                        Key = "userID", Value = userID
                    }
                }
            };

            s.sort  = "CreateDate";
            s.order = "desc";
            int    total = 0;
            string sqlw  = SxSqlHelperBLL.getSqlw(s);

            System.Data.DataTable dt = new System.Data.DataTable();
            SxSqlHelperBLL.getPageDataEasyUi(sqlw, "Base_Person", s, ref total, ref dt);
            if (!TB.CheckTB(dt))
            {
                dt = new System.Data.DataTable();
            }
            var jsonData = new { rows = dt, total = total };

            return(ToJsonResult(jsonData));
        }
Example #2
0
        /// <summary>
        /// 获取列表
        /// </summary>
        public ActionResult GetDataGridJsonV(int?typeX)
        {
            SplitPage splitPage = new SplitPage()
            {
                Conditions = new Conditions[]
                {
                    new Conditions()
                    {
                        Key = "isnull(isOK,-1)", Value = typeX.ToStringV()
                    }
                }
            };

            splitPage.order = "desc";
            splitPage.sort  = "createDate";
            string sqlw  = SxSqlHelperBLL.getSqlw(splitPage);
            int    total = 0;

            System.Data.DataTable dt = new System.Data.DataTable();
            SxSqlHelperBLL.getPageDataEasyUi(sqlw, "CR_CreditMoney", splitPage, ref total, ref dt);
            if (!TB.CheckTB(dt))
            {
                dt = new System.Data.DataTable();
            }
            var jsonData = new { rows = dt, total = total };

            return(ToJsonResult(jsonData));
        }
Example #3
0
        /// <summary>
        /// 获取列表 信用报告
        /// </summary>
        public ActionResult GetDataGridJsonAll(string userID)
        {
            decimal   allFen = 0;
            DataTable dt     = creditwritebll.GetCurrentFen(userID, ref allFen);

            if (!TB.CheckTB(dt))
            {
                dt = new System.Data.DataTable();
            }
            var jsonData = new { rows = dt, total = dt.Rows.Count, allFen = allFen };

            return(ToJsonResult(jsonData));
        }
Example #4
0
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="splitPage">分页参数</param>
        /// <returns></returns>
        public ActionResult GetDataGridJson(SplitPage splitPage)
        {
            string sqlw  = SxSqlHelperBLL.getSqlw(splitPage);
            int    total = 0;

            System.Data.DataTable dt = new System.Data.DataTable();
            SxSqlHelperBLL.getPageDataEasyUi(sqlw, "Base_Person", splitPage, ref total, ref dt);
            if (!TB.CheckTB(dt))
            {
                dt = new System.Data.DataTable();
            }
            var jsonData = new { rows = dt, total = total };

            return(ToJsonResult(jsonData));
        }
Example #5
0
        public ActionResult SaveForm(string keyValue, CreditWriteEntity entity)
        {
            int iyear = entity.iYear.ToInt();

            if (iyear <= 0)
            {
                return(Error("年度录入不正确"));
            }
            string sql = "select id from CR_CreditWrite where userID='" + entity.userID + "' and iYear='" + iyear + "' ";

            if (keyValue.ToStringV() != Str.Empty)
            {
                sql += " and id!='" + keyValue + "'";
            }
            DataTable tt = SxSqlHelperBLL.FindTable(sql);

            if (TB.CheckTB(tt))
            {
                return(Error("用户[" + entity.userName + "]年度[" + iyear.ToString() + "]信息已经存在,不能重复录入"));
            }
            creditwritebll.SaveForm(keyValue, entity);
            return(Success("操作成功。"));
        }
Example #6
0
        public ActionResult CreditSumCount(string userID)
        {
            //SplitPage sp = new SplitPage();

            //List<CreditWriteEntity> list = creditwritebll.GetList(sp).ToList<CreditWriteEntity>()
            //if(list==null||list.Count<=0)
            //{

            //}

            string    sql = "select * from CR_CreditWrite where userID='" + userID + "'";
            DataTable tt  = SxSqlHelperBLL.GetIRepository().FindTable(sql);

            if (TB.CheckTB(tt))
            {
                System.Threading.Thread.Sleep(1 * 1000);
                return(Success("操作完成"));
            }
            else
            {
                return(Error("当前用户没有信用记录"));
            }
        }