コード例 #1
0
ファイル: AppController.cs プロジェクト: sunman001/dxpay
        /// <summary>
        /// 添加应用
        /// </summary>
        /// <returns></returns>

        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_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 userid               = UserInfo.UserId;
            var userlist             = _UserService.FindListBySql("relation_type=2 and relation_person_id='" + userid + "' and u_state=1", "");
            JMP.BLL.jmp_user userbll = new JMP.BLL.jmp_user();
            ViewBag.userlist = userlist;
            int appid = string.IsNullOrEmpty(Request["appid"]) ? 0 : Int32.Parse(Request["appid"]);

            #region 获取所有支付方式

            JMP.BLL.jmp_paymode        zfbll  = new JMP.BLL.jmp_paymode();
            DataTable                  zfdt   = new DataTable();
            List <JMP.MDL.jmp_paymode> zflist = new List <JMP.MDL.jmp_paymode>();
            zfdt          = zfbll.GetList(" 1=1 and p_state='1' ").Tables[0];//获取支付类型在用信息
            zflist        = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_paymode>(zfdt);
            ViewBag.appid = appid;
            ViewBag.list  = zflist;
            #endregion

            return(View());
        }
コード例 #2
0
ファイル: AppController.cs プロジェクト: dmhai/dxpay
        /// <summary>
        /// 添加应用基本
        /// </summary>
        /// <returns></returns>
        public ActionResult AppAdd()
        {
            #region 获取用户实名认证状态信息

            JMP.BLL.jmp_user sm_bll   = new JMP.BLL.jmp_user();
            JMP.MDL.jmp_user sm_model = new JMP.MDL.jmp_user();

            int u_ids = UserInfo.Uid;

            //查询登录信息
            sm_model = sm_bll.GetModel(u_ids);

            ViewBag.auditstate = sm_model.u_auditstate;
            ViewBag.linkEmail  = sm_model.u_email;

            #endregion

            #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_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 appid = string.IsNullOrEmpty(Request["appid"]) ? 0 : Int32.Parse(Request["appid"]);

            #region 获取所有支付方式

            JMP.BLL.jmp_paymode zfbll = new JMP.BLL.jmp_paymode();

            DataTable zfdt = new DataTable();
            List <JMP.MDL.jmp_paymode> zflist = new List <JMP.MDL.jmp_paymode>();
            zfdt          = zfbll.GetList(" 1=1 and p_state='1' ").Tables[0];//获取支付类型在用信息
            zflist        = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_paymode>(zfdt);
            ViewBag.appid = appid;
            ViewBag.list  = zflist;
            #endregion


            return(View());
        }
コード例 #3
0
ファイル: AppController.cs プロジェクト: dmhai/dxpay
        /// <summary>
        /// 应用列表
        /// </summary>
        /// <returns></returns>
        public ActionResult AppList()
        {
            #region 获取用户实名认证状态信息

            JMP.BLL.jmp_user sm_bll   = new JMP.BLL.jmp_user();
            JMP.MDL.jmp_user sm_model = new JMP.MDL.jmp_user();

            int u_ids = UserInfo.Uid;

            //查询登录信息
            sm_model = sm_bll.GetModel(u_ids);

            ViewBag.auditstate = sm_model.u_auditstate;
            ViewBag.linkEmail  = sm_model.u_email;

            #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"]);    //每页显示数量

            string searchname = string.IsNullOrEmpty(Request["searchname"]) ? "" : Request["searchname"];          //应用名称
            ViewBag.searchname = searchname;
            int terrace = string.IsNullOrEmpty(Request["terrace"]) ? 0 : int.Parse(Request["terrace"]);            //运行平台
            ViewBag.terrace = terrace;

            List <JMP.MDL.jmp_app> list = new List <JMP.MDL.jmp_app>();
            JMP.BLL.jmp_app        bll  = new JMP.BLL.jmp_app();
            list = bll.SelectUserList(UserInfo.UserId.ToString(), searchname, terrace, pageIndexs, PageSize, out pageCount);
            ViewBag.pageIndexs = pageIndexs;
            ViewBag.PageSize   = PageSize;
            ViewBag.pageCount  = pageCount;
            ViewBag.list       = list;

            #region =========获取应用平台在用信息=========
            JMP.BLL.jmp_platform        paybll = new JMP.BLL.jmp_platform();
            DataTable                   dt     = paybll.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

            return(View());
        }
コード例 #4
0
ファイル: AppController.cs プロジェクト: sunman001/dxpay
        public ActionResult UpdateApp()
        {
            int appid = string.IsNullOrEmpty(Request["appid"]) ? 0 : Int32.Parse(Request["appid"]);

            JMP.BLL.jmp_app appbll = new JMP.BLL.jmp_app();
            JMP.MDL.jmp_app model  = new JMP.MDL.jmp_app();

            string yy = "";

            if (appid > 0)
            {
                model = appbll.SelectId(appid);
                #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_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 = "";

                if (model.a_auditstate == 1)
                {
                    yy += "<select id='xzyylx' disabled ='disabled' > ";
                }
                else
                {
                    yy += "<select id='xzyylx' onclick='xzyylx()'> ";
                }

                for (int j = 0; j < yydt.Rows.Count; j++)
                {
                    yyid = yydt.Rows[j]["t_id"].ToString();
                    if (t_topid > 0)
                    {
                        if (Int32.Parse(yydt.Rows[j]["t_id"].ToString()) == models.t_topid)
                        {
                            yy += "<option value='" + yyid + "' selected=selected >" + yydt.Rows[j]["t_name"] + "</option>";
                        }
                        else
                        {
                            yy += "<option value='" + yyid + "' >" + yydt.Rows[j]["t_name"] + "</option>";
                        }
                    }
                    else
                    {
                        yy += "<option value='" + yyid + "' >" + yydt.Rows[j]["t_name"] + "</option>";
                    }
                }

                yy += "</select>";
                #endregion
            }
            int userid   = UserInfo.UserId;
            var userlist = _UserService.FindListBySql("relation_type='" + (int)Relationtype.Agent + "' and relation_person_id='" + userid + "' and u_state=1", "");

            ViewBag.userlist = userlist;

            #region 获取所有支付方式

            JMP.BLL.jmp_paymode zfbll = new JMP.BLL.jmp_paymode();

            DataTable zfdt = new DataTable();
            List <JMP.MDL.jmp_paymode> zflist = new List <JMP.MDL.jmp_paymode>();
            zfdt          = zfbll.GetList(" 1=1 and p_state='1' ").Tables[0];//获取支付类型在用信息
            zflist        = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_paymode>(zfdt);
            ViewBag.appid = appid;
            ViewBag.list  = zflist;
            #endregion

            ViewBag.yy    = yy;
            ViewBag.model = model;
            //支付方式
            string[] zffs = model.a_paymode_id.Split(',');
            ViewBag.zffs = zffs;
            return(View());
        }