public JsonResult Inserkl() { object retJson = new { success = 0, msg = "操作失败!" }; string str = string.IsNullOrEmpty(Request["str"]) ? "" : Request["str"]; int userid = string.IsNullOrEmpty(Request["userid"]) ? 0 : Int32.Parse(Request["userid"]); JMP.BLL.jmp_rate bll = new jmp_rate(); if (userid > 0 && !string.IsNullOrEmpty(str)) { string sql = " delete from jmp_rate where r_userid=" + userid; string[] sxf = str.Split('|'); string[] lis = new string[sxf.Length + 1]; lis[0] = sql; int a = 1; for (int i = 0; i < sxf.Length; i++) { string[] bl = sxf[i].Split(','); lis[a] = " insert into jmp_rate(r_userid,r_paymodeid,r_proportion,r_klproportion,r_state,r_time,r_name) values(" + userid + "," + bl[0] + "," + bl[1] + "," + bl[2] + ",0,GETDATE(),'" + UserInfo.UserName + "') "; sql += " insert into jmp_rate(r_userid,r_paymodeid,r_proportion,r_klproportion,r_state,r_time,r_name) values(" + userid + "," + bl[0] + "," + bl[1] + "," + bl[2] + ",0,GETDATE(),'" + UserInfo.UserName + "'); "; a = a + 1; } int cg = bll.InserSxF(lis); if (cg > 0) { retJson = new { success = 1, msg = "设置成功!" }; Logger.OperateLog("设置扣量比例", "操作数据:" + sql); } else { retJson = new { success = 0, msg = "设置失败!" }; } } return(Json(retJson)); }
/// <summary> /// 用户扣量设置 /// </summary> /// <returns></returns> public ActionResult UserKl() { int userid = string.IsNullOrEmpty(Request["userid"]) ? 0 : Int32.Parse(Request["userid"]); List <JMP.MDL.jmp_rate> list = new List <JMP.MDL.jmp_rate>(); JMP.BLL.jmp_rate bll = new jmp_rate(); if (userid > 0) { list = bll.SelectListUserid(userid); } ViewBag.list = list; ViewBag.userid = userid; return(View()); }
public JsonResult InserSxf() { object retJson = new { success = 0, msg = "操作失败!" }; int str = string.IsNullOrEmpty(Request["s_type"]) ? 0 : int.Parse(Request["s_type"]); int userid = string.IsNullOrEmpty(Request["userid"]) ? 0 : Int32.Parse(Request["userid"]); JMP.BLL.jmp_rate bll = new jmp_rate(); if (userid > 0 && str > 0) { if (bll_user.UpdateServiceFeeRatioGradeId(userid, str)) { retJson = new { success = 1, msg = "设置成功!" }; Logger.OperateLog("设置手续费比例", "设置开发者(" + userid + ")手续费为:" + str); } else { retJson = new { success = 0, msg = "设置失败!" }; } } return(Json(retJson)); }