public ActionResult AppList() { #region ========获取应用类型在用信息====== JMP.BLL.jmp_apptype yybll = new JMP.BLL.jmp_apptype(); string where = " t_id in (select DISTINCT(t_topid) from jmp_apptype where t_topid in( select t_id from jmp_apptype where t_topid='0' )) and t_state='1' order by t_sort desc"; DataTable yydt = yybll.GetList(where).Tables[0];//获取应用类型在用信息 List <JMP.MDL.jmp_apptype> yylist = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_apptype>(yydt); ViewBag.yylist = yylist; #endregion 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 SelectState = string.IsNullOrEmpty(Request["SelectState"]) ? 1 : Int32.Parse(Request["SelectState"]); //状态 int auditstate = string.IsNullOrEmpty(Request["auditstate"]) ? -1 : Int32.Parse(Request["auditstate"]); //审核状态 int type = string.IsNullOrEmpty(Request["type"]) ? 0 : Int32.Parse(Request["type"]); //查询条件选择 string sea_name = string.IsNullOrEmpty(Request["sea_name"]) ? "" : Request["sea_name"]; //查询条件内容 int platformid = string.IsNullOrEmpty(Request["platformid"]) ? 0 : Int32.Parse(Request["platformid"]); //关联平台 int appType = string.IsNullOrEmpty(Request["appType"]) ? 0 : int.Parse(Request["appType"]); //所属应用类型 int r_id = string.IsNullOrEmpty(Request["r_id"]) ? 0 : int.Parse(Request["r_id"]); //风险等级 int paytype = string.IsNullOrEmpty(Request["paytype"]) ? 0 : int.Parse(Request["paytype"]); //支付类型 List <JMP.MDL.jmp_app> list = new List <JMP.MDL.jmp_app>(); JMP.BLL.jmp_app bll = new JMP.BLL.jmp_app(); list = bll.SelectList(paytype, r_id, platformid, auditstate, sea_name, type, SelectState, appType, searchDesc, pageIndexs, PageSize, out pageCount); string wherepay = " p_state=1"; JMP.BLL.jmp_paymode yybllt = new JMP.BLL.jmp_paymode(); DataTable yydtt = yybllt.GetList(wherepay).Tables[0];//获取支付方式 List <JMP.MDL.jmp_paymode> yylistt = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_paymode>(yydtt); ViewBag.yylistt = yylistt; ViewBag.searchDesc = searchDesc; ViewBag.paytype = paytype; ViewBag.SelectState = SelectState; ViewBag.r_id = r_id; ViewBag.type = type; ViewBag.sea_name = sea_name; ViewBag.pageIndexs = pageIndexs; ViewBag.PageSize = PageSize; ViewBag.pageCount = pageCount; ViewBag.list = list; ViewBag.auditstate = auditstate; ViewBag.platformid = platformid; ViewBag.locUrl = GetVoidHtml(); ViewBag.appType = appType; return(View()); }
public ActionResult APPAdd() { #region =========获取应用平台在用信息========= JMP.BLL.jmp_platform bll = new JMP.BLL.jmp_platform(); DataTable dt = bll.GetList(" 1=1 and p_state='1' ").Tables[0];//获取应用平台在用信息 List <JMP.MDL.jmp_platform> yypt = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_platform>(dt); ViewBag.glptdt = yypt; #endregion #region =====获取支付类型在用信息====== JMP.BLL.jmp_paymode zfbll = new JMP.BLL.jmp_paymode(); DataTable zfdt = zfbll.GetList(" 1=1 and p_state='1' ").Tables[0];//获取支付类型在用信息 List <JMP.MDL.jmp_paymode> zflist = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_paymode>(zfdt); ViewBag.zflist = zflist; #endregion #region ========获取应用类型在用信息====== JMP.BLL.jmp_apptype yybll = new JMP.BLL.jmp_apptype(); string where = " t_id in (select DISTINCT(t_topid) from jmp_apptype where t_topid in( select t_id from jmp_apptype where t_topid='0' )) and t_state='1' order by t_sort desc"; DataTable yydt = yybll.GetList(where).Tables[0];//获取应用类型在用信息 List <JMP.MDL.jmp_apptype> yylist = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_apptype>(yydt); ViewBag.yylist = yylist; #endregion return(View()); }
/// <summary> /// 修改应用 /// </summary> /// <returns></returns> public ActionResult UpdateAPP(int a_id) { JMP.BLL.jmp_app bll = new JMP.BLL.jmp_app(); JMP.MDL.jmp_app model = new JMP.MDL.jmp_app(); string glpt = ""; string zf = ""; string szmrdj = ""; string yy = ""; if (a_id > 0) { model = bll.SelectId(a_id); #region =========获取应用平台在用信息========= JMP.BLL.jmp_platform bllpl = new JMP.BLL.jmp_platform(); DataTable dt = bllpl.GetList(" 1=1 and p_state='1' ").Tables[0];//获取应用平台在用信息 for (int i = 0; i < dt.Rows.Count; i++) { if (Int32.Parse(dt.Rows[i]["p_id"].ToString()) == model.a_platform_id) { glpt += "<option value=\"" + dt.Rows[i]["p_id"] + "\" selected=\"selected\" >" + dt.Rows[i]["p_name"] + "</option>"; } else { glpt += "<option value=\"" + dt.Rows[i]["p_id"] + "\">" + dt.Rows[i]["p_name"] + "</option>"; } } #endregion #region =====获取支付类型在用信息====== JMP.BLL.jmp_paymode zfbll = new JMP.BLL.jmp_paymode(); DataTable zfdt = zfbll.GetList(" 1=1 and p_state='1' ").Tables[0];//获取支付类型在用信息 string[] a_paymode = model.a_paymode_id.Split(','); for (int k = 0; k < zfdt.Rows.Count; k++) { bool check = true; for (int i = 0; i < a_paymode.Length; i++) { if (zfdt.Rows[k]["p_id"].ToString() == a_paymode[i]) { zf += " <input type=\"checkbox\" name=\"zflx\" class=\"inputChck\" id=paytype_" + zfdt.Rows[k]["p_id"] + " data-stat=" + zfdt.Rows[k]["p_islocked"] + " value=" + zfdt.Rows[k]["p_id"] + " checked=\"checked\" /> " + zfdt.Rows[k]["p_name"]; check = false; break; } } if (check) { zf += " <input type=\"checkbox\" name=\"zflx\" class=\"inputChck\" id=paytype_" + zfdt.Rows[k]["p_id"] + " data-stat=" + zfdt.Rows[k]["p_islocked"] + " value=" + zfdt.Rows[k]["p_id"] + " /> " + zfdt.Rows[k]["p_name"]; } } #endregion #region ========获取应用类型在用信息====== JMP.BLL.jmp_apptype yybll = new JMP.BLL.jmp_apptype(); string where = " t_id in (select DISTINCT(t_topid) from jmp_apptype where t_topid in( select t_id from jmp_apptype where t_topid='0' )) and t_state='1' order by t_sort desc"; DataTable yydt = yybll.GetList(where).Tables[0];//获取应用类型在用信息 JMP.MDL.jmp_apptype models = new JMP.MDL.jmp_apptype(); int t_topid = 0; if (model.a_apptype_id > 0) { models = yybll.GetModel(model.a_apptype_id);//查询单条信息 t_topid = models.t_topid; } string yyid = ""; for (int j = 0; j < yydt.Rows.Count; j++) { yyid = "yy" + yydt.Rows[j]["t_id"].ToString(); if (t_topid > 0) { if (Int32.Parse(yydt.Rows[j]["t_id"].ToString()) == models.t_topid) { szmrdj = yyid; yy += "<input type=\"button\" id='" + yyid + "' name=\"yyname\" onclick=\"xzyylx(this.id,0)\" class=\"xzinput\" value=" + yydt.Rows[j]["t_name"] + " />"; } else { yy += "<input type=\"button\" id='" + yyid + "' name=\"yyname\" onclick=\"xzyylx(this.id,0)\" class=\"inpuwxz\" value=" + yydt.Rows[j]["t_name"] + " />"; } } else { yy += "<input type=\"button\" id='" + yyid + "' name=\"yyname\" onclick=\"xzyylx(this.id,0)\" class=\"inpuwxz\" value=" + yydt.Rows[j]["t_name"] + " />"; } } #endregion #region 根据应用子类型获取风险等级 JMP.BLL.jmp_risklevelallocation ribll = new JMP.BLL.jmp_risklevelallocation(); List <JMP.MDL.jmp_risklevelallocation> rilist = new List <JMP.MDL.jmp_risklevelallocation>(); rilist = ribll.SelectAppType(model.a_apptype_id); ViewBag.rilist = rilist; #endregion } ViewBag.model = model; ViewBag.glpt = glpt; ViewBag.zf = zf; ViewBag.yy = yy; ViewBag.szmrdj = szmrdj; return(View()); }