public ActionResult ServiceFeeRatioGradeList() { JMP.BLL.CoServiceFeeRatioGrade bll = new JMP.BLL.CoServiceFeeRatioGrade(); JMP.MDL.CoServiceFeeRatioGrade model = new JMP.MDL.CoServiceFeeRatioGrade(); int pageCount = 0; int pageIndexs = string.IsNullOrEmpty(Request["pageIndexs"]) ? 1 : Int32.Parse(Request["pageIndexs"]); //当前页 int PageSize = string.IsNullOrEmpty(Request["PageSize"]) ? 20 : Int32.Parse(Request["PageSize"]); //每页显示数量 int searchDesc = string.IsNullOrEmpty(Request["searchDesc"]) ? 0 : Int32.Parse(Request["searchDesc"]); //排序方式 string status = string.IsNullOrEmpty(Request["status"]) ? "" : Request["status"]; //工单状态 string progress = string.IsNullOrEmpty(Request["progress"]) ? "" : Request["progress"]; //工单进度 int type = string.IsNullOrEmpty(Request["type"]) ? 0 : Int32.Parse(Request["type"]); //查询条件选择 string stime = string.IsNullOrEmpty(Request["r_begin"]) ? DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd") : Request["r_begin"]; string etime = string.IsNullOrEmpty(Request["r_end"]) ? DateTime.Now.ToString("yyyy-MM-dd") : Request["r_end"]; string sea_name = string.IsNullOrEmpty(Request["sea_name"]) ? "" : Request["sea_name"];//查询条件内容 List <JMP.MDL.CoServiceFeeRatioGrade> list = new List <JMP.MDL.CoServiceFeeRatioGrade>(); list = bll.SelectList(sea_name, type, searchDesc, pageIndexs, PageSize, out pageCount); ViewBag.searchDesc = searchDesc; ViewBag.type = type; ViewBag.sea_name = sea_name; ViewBag.stime = stime; ViewBag.etime = etime; ViewBag.pageIndexs = pageIndexs; ViewBag.PageSize = PageSize; ViewBag.pageCount = pageCount; ViewBag.list = list; ViewBag.status = status; ViewBag.progress = progress; ViewBag.locUrl = GetVoidHtml(); return(View()); }
public ActionResult CoServiceList() { JMP.BLL.CoServiceFeeRatioGrade bll = new JMP.BLL.CoServiceFeeRatioGrade(); JMP.MDL.CoServiceFeeRatioGrade model = new JMP.MDL.CoServiceFeeRatioGrade(); int pageCount = 0; int pageIndexs = string.IsNullOrEmpty(Request["pageIndexs"]) ? 1 : Int32.Parse(Request["pageIndexs"]); //当前页 int PageSize = string.IsNullOrEmpty(Request["PageSize"]) ? 20 : Int32.Parse(Request["PageSize"]); //每页显示数量 int searchDesc = string.IsNullOrEmpty(Request["searchDesc"]) ? 0 : Int32.Parse(Request["searchDesc"]); //排序方式 int type = string.IsNullOrEmpty(Request["type"]) ? 0 : Int32.Parse(Request["type"]); //查询条件选择 string sea_name = string.IsNullOrEmpty(Request["sea_name"]) ? "" : Request["sea_name"]; //查询条件内容 List <JMP.MDL.CoServiceFeeRatioGrade> list = new List <JMP.MDL.CoServiceFeeRatioGrade>(); list = bll.SelectList(sea_name, type, searchDesc, pageIndexs, PageSize, out pageCount); ViewBag.searchDesc = searchDesc; ViewBag.type = type; ViewBag.sea_name = sea_name; ViewBag.pageIndexs = pageIndexs; ViewBag.PageSize = PageSize; ViewBag.pageCount = pageCount; ViewBag.list = list; return(View()); }
public ActionResult ServiceChargeAdd() { int id = string.IsNullOrEmpty(Request["id"]) ? 0 : int.Parse(Request["id"]); var user = _coAgentService.FindById(id); JMP.BLL.CoServiceFeeRatioGrade bll = new JMP.BLL.CoServiceFeeRatioGrade(); DataTable dt = bll.GetList(" ").Tables[0];//获取应用平台在用信息 List <JMP.MDL.CoServiceFeeRatioGrade> yypt = JMP.TOOL.MdlList.ToList <JMP.MDL.CoServiceFeeRatioGrade>(dt); ViewBag.glptdt = yypt; ViewBag.user = user; ViewBag.id = id; return(View()); }
public ActionResult SerViceFeeRationGradeAdd() { int id = string.IsNullOrEmpty(Request["id"]) ? 0 : Int32.Parse(Request["id"]); JMP.BLL.CoServiceFeeRatioGrade bll = new JMP.BLL.CoServiceFeeRatioGrade(); JMP.MDL.CoServiceFeeRatioGrade model = new JMP.MDL.CoServiceFeeRatioGrade(); if (id > 0) { model = bll.SelectId(id); model.AgentPushMoneyRatio = decimal.Parse((model.AgentPushMoneyRatio * 100).ToString("f2")); model.BusinessPersonnelAgentRatio = decimal.Parse((model.BusinessPersonnelAgentRatio * 100).ToString("f2")); model.CustomerWithoutAgentRatio = decimal.Parse((model.CustomerWithoutAgentRatio * 100).ToString("f2")); model.ServiceFeeRatio = decimal.Parse((model.ServiceFeeRatio * 100).ToString("f2")); } ViewBag.model = model == null ? new JMP.MDL.CoServiceFeeRatioGrade() : model; return(View()); }
/// <summary> /// 添加或修改服务费等级信息 /// </summary> /// <returns></returns> public JsonResult InsertUpdateSerViceFeeRationGrade(JMP.MDL.CoServiceFeeRatioGrade model) { object retJson = new { success = 0, msg = "操作失败" }; JMP.BLL.CoServiceFeeRatioGrade bll = new JMP.BLL.CoServiceFeeRatioGrade(); model.AgentPushMoneyRatio = model.AgentPushMoneyRatio / 100; model.BusinessPersonnelAgentRatio = model.BusinessPersonnelAgentRatio / 100; model.CustomerWithoutAgentRatio = model.CustomerWithoutAgentRatio / 100; model.ServiceFeeRatio = model.ServiceFeeRatio / 100; var exists = bll.GetModelByName(model.Name); if (model.Id > 0) { // 修改 JMP.MDL.CoServiceFeeRatioGrade oldmodel = new JMP.MDL.CoServiceFeeRatioGrade(); oldmodel = bll.GetModel(model.Id); var oldmodelConle = oldmodel.Clone(); oldmodel.Name = model.Name; oldmodel.ServiceFeeRatio = model.ServiceFeeRatio; oldmodel.BusinessPersonnelAgentRatio = model.BusinessPersonnelAgentRatio; oldmodel.CustomerWithoutAgentRatio = model.CustomerWithoutAgentRatio; oldmodel.AgentPushMoneyRatio = model.AgentPushMoneyRatio; oldmodel.Description = model.Description; if (exists != null && model.Id != exists.Id) { retJson = new { success = 0, msg = "此服务费级别名称已存在" }; return(Json(retJson)); } if (bll.Update(oldmodel)) { Logger.ModifyLog("修改服务费等级信息", oldmodelConle, model); RateLogger.ModifyLog("修改服务费等级信息", oldmodelConle, model); retJson = new { success = 1, msg = "修改成功" }; } else { retJson = new { success = 0, msg = "修改失败" }; } } else { model.CreatedOn = DateTime.Now; model.CreatedById = UserInfo.UserId; model.CreatedByName = UserInfo.UserName; if (exists != null) { retJson = new { success = 0, msg = "此服务费级别名称已存在" }; return(Json(retJson)); } int cg = bll.Add(model); if (cg > 0) { Logger.CreateLog("添加服务费等级信息", model); RateLogger.CreateLog("添加服务费等级信息", model); retJson = new { success = 1, msg = "添加成功" }; } else { retJson = new { success = 1, msg = "添加失败" }; } } return(Json(retJson)); }