Пример #1
0
        public JsonResult UpdatePayRart()
        {
            JMP.BLL.jmp_paymode bll   = new JMP.BLL.jmp_paymode();
            JMP.MDL.jmp_paymode model = new JMP.MDL.jmp_paymode();

            object retJson = new { success = 0, msg = "操作失败" };

            int    pid    = string.IsNullOrEmpty(Request["pid"]) ? 0 : int.Parse(Request["pid"]);
            string p_rate = string.IsNullOrEmpty(Request["p_rate"]) ? "0" : Request["p_rate"];

            //获取一个实体对象
            model = bll.GetModel(pid);

            if (bll.Update_rate(pid, p_rate))
            {
                //记录日志(会定期清理)
                Logger.OperateLog("修改接口费率", "操作数据ID:" + pid + ",接口费率由:" + model.p_rate + ",改为:" + p_rate + "。");
                //记录日志(不会清理)
                RateLogger.OperateLog("修改接口费率", "操作数据ID:" + pid + ",接口费率由:" + model.p_rate + ",改为:" + p_rate + "。");

                retJson = new { success = 1, msg = "设置接口费率成功" };
            }

            else
            {
                retJson = new { success = 0, msg = "设置接口费率失败" };
            }

            return(Json(retJson));
        }
Пример #2
0
        public ActionResult PaymodeAddOrUpdate()
        {
            int p_id = string.IsNullOrEmpty(Request["p_id"]) ? 0 : Int32.Parse(Request["p_id"]);

            JMP.BLL.jmp_paymode bll  = new JMP.BLL.jmp_paymode();
            JMP.MDL.jmp_paymode mode = new JMP.MDL.jmp_paymode();
            if (p_id > 0)
            {
                mode = bll.GetModel(p_id);
            }
            ViewBag.mode = mode;
            return(View());
        }
Пример #3
0
        /// <summary>
        /// 设置接口费率
        /// </summary>
        /// <returns></returns>
        public ActionResult PaymodeRartAdd()
        {
            int id = string.IsNullOrEmpty(Request["pid"]) ? 0 : int.Parse(Request["pid"]);

            JMP.MDL.jmp_paymode model = new JMP.MDL.jmp_paymode();
            JMP.BLL.jmp_paymode bll   = new JMP.BLL.jmp_paymode();

            //查询
            model = bll.GetModel(id);

            ViewBag.model = model;

            return(View());
        }