Example #1
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(JMP.MDL.jmp_appcount model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into jmp_appcount(");
            strSql.Append("a_successratio,a_alipay,a_wechat,a_curr,a_arpur,a_datetime,a_unionpay,a_money,a_qqwallet,a_appname,a_appid,a_uerid,a_equipment,a_count,a_success,a_notpay,a_request");
            strSql.Append(") values (");
            strSql.Append("@a_successratio,@a_alipay,@a_wechat,@a_curr,@a_arpur,@a_datetime,@a_unionpay,@a_money,@a_qqwallet,@a_appname,@a_appid,@a_uerid,@a_equipment,@a_count,@a_success,@a_notpay,@a_request");
            strSql.Append(") ");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters =
            {
                new SqlParameter("@a_successratio", SqlDbType.Decimal,    9),
                new SqlParameter("@a_alipay",       SqlDbType.Decimal,    9),
                new SqlParameter("@a_wechat",       SqlDbType.Decimal,    9),
                new SqlParameter("@a_curr",         SqlDbType.Decimal,    9),
                new SqlParameter("@a_arpur",        SqlDbType.Decimal,    9),
                new SqlParameter("@a_datetime",     SqlDbType.DateTime),
                new SqlParameter("@a_unionpay",     SqlDbType.Decimal,    9),
                new SqlParameter("@a_money",        SqlDbType.Decimal,    9),
                new SqlParameter("@a_qqwallet",     SqlDbType.Decimal,    9),
                new SqlParameter("@a_appname",      SqlDbType.NVarChar,  -1),
                new SqlParameter("@a_appid",        SqlDbType.Int,        4),
                new SqlParameter("@a_uerid",        SqlDbType.Int,        4),
                new SqlParameter("@a_equipment",    SqlDbType.Decimal,    9),
                new SqlParameter("@a_count",        SqlDbType.Decimal,    9),
                new SqlParameter("@a_success",      SqlDbType.Decimal,    9),
                new SqlParameter("@a_notpay",       SqlDbType.Decimal,    9),
                new SqlParameter("@a_request",      SqlDbType.Decimal, 9)
            };

            parameters[0].Value  = model.a_successratio;
            parameters[1].Value  = model.a_alipay;
            parameters[2].Value  = model.a_wechat;
            parameters[3].Value  = model.a_curr;
            parameters[4].Value  = model.a_arpur;
            parameters[5].Value  = model.a_datetime;
            parameters[6].Value  = model.a_unionpay;
            parameters[7].Value  = model.a_money;
            parameters[8].Value  = model.a_qqwallet;
            parameters[9].Value  = model.a_appname;
            parameters[10].Value = model.a_appid;
            parameters[11].Value = model.a_uerid;
            parameters[12].Value = model.a_equipment;
            parameters[13].Value = model.a_count;
            parameters[14].Value = model.a_success;
            parameters[15].Value = model.a_notpay;
            parameters[16].Value = model.a_request;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);

            if (obj == null)
            {
                return(0);
            }
            else
            {
                return(Convert.ToInt32(obj));
            }
        }
Example #2
0
        public ActionResult Index()
        {
            //每日应用汇总
            JMP.BLL.jmp_appcount bll      = new JMP.BLL.jmp_appcount();
            JMP.MDL.jmp_appcount model    = new JMP.MDL.jmp_appcount();
            JMP.MDL.jmp_user     sm_model = new JMP.MDL.jmp_user();
            //开发者每日结算详情
            JMP.BLL.CoSettlementDeveloperAppDetails cobll                   = new JMP.BLL.CoSettlementDeveloperAppDetails();
            JMP.MDL.CoSettlementDeveloperAppDetails comodel_yesterday       = new JMP.MDL.CoSettlementDeveloperAppDetails();
            JMP.MDL.CoSettlementDeveloperAppDetails comodel_month           = new JMP.MDL.CoSettlementDeveloperAppDetails();
            JMP.MDL.CoSettlementDeveloperAppDetails comodel_preceding_month = new JMP.MDL.CoSettlementDeveloperAppDetails();

            int u_id = UserInfo.UserId;

            JMP.BLL.jmp_user sm_bll = new JMP.BLL.jmp_user();
            sm_model            = sm_bll.GetModel(u_id);
            ViewBag.FrozenMoney = sm_model.FrozenMoney.ToString("f0");
            //今天
            string u_time = DateTime.Now.ToString("yyyy-MM-dd");
            //昨天
            string u_time_yesterday = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
            //本月
            string u_time_month = DateTime.Now.ToString("yyyy-MM");
            //上月
            string u_time_preceding_month = DateTime.Now.AddMonths(-1).ToString("yyyy-MM");

            //根据日期查询交易金额和笔数(今天)
            model = bll.DataAppcountAdy(u_time, u_id, 0);


            //根据不同日期统计查询(昨天)
            comodel_yesterday = cobll.GetModelKFZ_total(u_id, u_time_yesterday, 0);
            //根据不同日期统计查询(本月)
            comodel_month = cobll.GetModelKFZ_total(u_id, u_time_month, 1);
            //根据不同日期统计查询(上月)
            comodel_preceding_month = cobll.GetModelKFZ_total(u_id, u_time_preceding_month, 1);

            //流水及收入金额
            ViewBag.comodel_yesterday       = comodel_yesterday;
            ViewBag.comodel_month           = comodel_month;
            ViewBag.comodel_preceding_month = comodel_preceding_month;

            ViewBag.AppCount = model;
            return(View());
        }
Example #3
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public JMP.MDL.jmp_appcount GetModel(int a_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select a_id, a_successratio, a_alipay, a_wechat, a_curr, a_arpur, a_datetime, a_unionpay, a_money, a_qqwallet, a_appname, a_appid, a_uerid, a_equipment, a_count, a_success, a_notpay, a_request  ");
            strSql.Append("  from jmp_appcount ");
            strSql.Append(" where a_id=@a_id");
            SqlParameter[] parameters =
            {
                new SqlParameter("@a_id", SqlDbType.Int, 4)
            };
            parameters[0].Value = a_id;


            JMP.MDL.jmp_appcount model = new JMP.MDL.jmp_appcount();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["a_id"].ToString() != "")
                {
                    model.a_id = int.Parse(ds.Tables[0].Rows[0]["a_id"].ToString());
                }
                if (ds.Tables[0].Rows[0]["a_successratio"].ToString() != "")
                {
                    model.a_successratio = decimal.Parse(ds.Tables[0].Rows[0]["a_successratio"].ToString());
                }
                if (ds.Tables[0].Rows[0]["a_alipay"].ToString() != "")
                {
                    model.a_alipay = decimal.Parse(ds.Tables[0].Rows[0]["a_alipay"].ToString());
                }
                if (ds.Tables[0].Rows[0]["a_wechat"].ToString() != "")
                {
                    model.a_wechat = decimal.Parse(ds.Tables[0].Rows[0]["a_wechat"].ToString());
                }
                if (ds.Tables[0].Rows[0]["a_curr"].ToString() != "")
                {
                    model.a_curr = decimal.Parse(ds.Tables[0].Rows[0]["a_curr"].ToString());
                }
                if (ds.Tables[0].Rows[0]["a_arpur"].ToString() != "")
                {
                    model.a_arpur = decimal.Parse(ds.Tables[0].Rows[0]["a_arpur"].ToString());
                }
                if (ds.Tables[0].Rows[0]["a_datetime"].ToString() != "")
                {
                    model.a_datetime = DateTime.Parse(ds.Tables[0].Rows[0]["a_datetime"].ToString());
                }
                if (ds.Tables[0].Rows[0]["a_unionpay"].ToString() != "")
                {
                    model.a_unionpay = decimal.Parse(ds.Tables[0].Rows[0]["a_unionpay"].ToString());
                }
                if (ds.Tables[0].Rows[0]["a_money"].ToString() != "")
                {
                    model.a_money = decimal.Parse(ds.Tables[0].Rows[0]["a_money"].ToString());
                }
                if (ds.Tables[0].Rows[0]["a_qqwallet"].ToString() != "")
                {
                    model.a_qqwallet = decimal.Parse(ds.Tables[0].Rows[0]["a_qqwallet"].ToString());
                }
                model.a_appname = ds.Tables[0].Rows[0]["a_appname"].ToString();
                if (ds.Tables[0].Rows[0]["a_appid"].ToString() != "")
                {
                    model.a_appid = int.Parse(ds.Tables[0].Rows[0]["a_appid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["a_uerid"].ToString() != "")
                {
                    model.a_uerid = int.Parse(ds.Tables[0].Rows[0]["a_uerid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["a_equipment"].ToString() != "")
                {
                    model.a_equipment = decimal.Parse(ds.Tables[0].Rows[0]["a_equipment"].ToString());
                }
                if (ds.Tables[0].Rows[0]["a_count"].ToString() != "")
                {
                    model.a_count = decimal.Parse(ds.Tables[0].Rows[0]["a_count"].ToString());
                }
                if (ds.Tables[0].Rows[0]["a_success"].ToString() != "")
                {
                    model.a_success = decimal.Parse(ds.Tables[0].Rows[0]["a_success"].ToString());
                }
                if (ds.Tables[0].Rows[0]["a_notpay"].ToString() != "")
                {
                    model.a_notpay = decimal.Parse(ds.Tables[0].Rows[0]["a_notpay"].ToString());
                }
                if (ds.Tables[0].Rows[0]["a_request"].ToString() != "")
                {
                    model.a_request = decimal.Parse(ds.Tables[0].Rows[0]["a_request"].ToString());
                }

                return(model);
            }
            else
            {
                return(null);
            }
        }
Example #4
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(JMP.MDL.jmp_appcount model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update jmp_appcount set ");

            strSql.Append(" a_successratio = @a_successratio , ");
            strSql.Append(" a_alipay = @a_alipay , ");
            strSql.Append(" a_wechat = @a_wechat , ");
            strSql.Append(" a_curr = @a_curr , ");
            strSql.Append(" a_arpur = @a_arpur , ");
            strSql.Append(" a_datetime = @a_datetime , ");
            strSql.Append(" a_unionpay = @a_unionpay , ");
            strSql.Append(" a_money = @a_money , ");
            strSql.Append(" a_qqwallet = @a_qqwallet , ");
            strSql.Append(" a_appname = @a_appname , ");
            strSql.Append(" a_appid = @a_appid , ");
            strSql.Append(" a_uerid = @a_uerid , ");
            strSql.Append(" a_equipment = @a_equipment , ");
            strSql.Append(" a_count = @a_count , ");
            strSql.Append(" a_success = @a_success , ");
            strSql.Append(" a_notpay = @a_notpay , ");
            strSql.Append(" a_request = @a_request  ");
            strSql.Append(" where a_id=@a_id ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@a_id",           SqlDbType.Int,        4),
                new SqlParameter("@a_successratio", SqlDbType.Decimal,    9),
                new SqlParameter("@a_alipay",       SqlDbType.Decimal,    9),
                new SqlParameter("@a_wechat",       SqlDbType.Decimal,    9),
                new SqlParameter("@a_curr",         SqlDbType.Decimal,    9),
                new SqlParameter("@a_arpur",        SqlDbType.Decimal,    9),
                new SqlParameter("@a_datetime",     SqlDbType.DateTime),
                new SqlParameter("@a_unionpay",     SqlDbType.Decimal,    9),
                new SqlParameter("@a_money",        SqlDbType.Decimal,    9),
                new SqlParameter("@a_qqwallet",     SqlDbType.Decimal,    9),
                new SqlParameter("@a_appname",      SqlDbType.NVarChar,  -1),
                new SqlParameter("@a_appid",        SqlDbType.Int,        4),
                new SqlParameter("@a_uerid",        SqlDbType.Int,        4),
                new SqlParameter("@a_equipment",    SqlDbType.Decimal,    9),
                new SqlParameter("@a_count",        SqlDbType.Decimal,    9),
                new SqlParameter("@a_success",      SqlDbType.Decimal,    9),
                new SqlParameter("@a_notpay",       SqlDbType.Decimal,    9),
                new SqlParameter("@a_request",      SqlDbType.Decimal, 9)
            };

            parameters[0].Value  = model.a_id;
            parameters[1].Value  = model.a_successratio;
            parameters[2].Value  = model.a_alipay;
            parameters[3].Value  = model.a_wechat;
            parameters[4].Value  = model.a_curr;
            parameters[5].Value  = model.a_arpur;
            parameters[6].Value  = model.a_datetime;
            parameters[7].Value  = model.a_unionpay;
            parameters[8].Value  = model.a_money;
            parameters[9].Value  = model.a_qqwallet;
            parameters[10].Value = model.a_appname;
            parameters[11].Value = model.a_appid;
            parameters[12].Value = model.a_uerid;
            parameters[13].Value = model.a_equipment;
            parameters[14].Value = model.a_count;
            parameters[15].Value = model.a_success;
            parameters[16].Value = model.a_notpay;
            parameters[17].Value = model.a_request;
            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #5
0
        public ActionResult Default()
        {
            #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 r_id = UserInfo.UserRid;

            string menuStr = GetMenStr(u_ids, r_id);
            ViewBag.UserName   = UserInfo.UserNo;
            ViewBag.MsgCount   = sm_bll.GetUserMsgCount(u_ids);
            ViewBag.MenuTopStr = menuStr;
            ViewBag.QQ         = ConfigurationManager.AppSettings["linkqq"];
            ViewBag.Tel        = ConfigurationManager.AppSettings["linkphone"];

            //每日应用汇总
            JMP.BLL.jmp_appcount bllapp   = new JMP.BLL.jmp_appcount();
            JMP.MDL.jmp_appcount modelapp = new JMP.MDL.jmp_appcount();
            //开发者每日结算详情
            JMP.BLL.CoSettlementDeveloperAppDetails cobll                   = new JMP.BLL.CoSettlementDeveloperAppDetails();
            JMP.MDL.CoSettlementDeveloperAppDetails comodel_yesterday       = new JMP.MDL.CoSettlementDeveloperAppDetails();
            JMP.MDL.CoSettlementDeveloperAppDetails comodel_month           = new JMP.MDL.CoSettlementDeveloperAppDetails();
            JMP.MDL.CoSettlementDeveloperAppDetails comodel_preceding_month = new JMP.MDL.CoSettlementDeveloperAppDetails();

            int u_id = UserInfo.UserId;
            //今天
            string u_time = DateTime.Now.ToString("yyyy-MM-dd");
            //昨天
            string u_time_yesterday = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
            //本月
            string u_time_month = DateTime.Now.ToString("yyyy-MM");
            //上月
            string u_time_preceding_month = DateTime.Now.AddMonths(-1).ToString("yyyy-MM");

            //根据日期查询交易金额和笔数(今天)
            modelapp = bllapp.DataAppcountAdy(u_time, u_id, 0);


            //根据不同日期统计查询(昨天)
            comodel_yesterday = cobll.GetModelKFZ_total(u_id, u_time_yesterday, 0);
            //根据不同日期统计查询(本月)
            comodel_month = cobll.GetModelKFZ_total(u_id, u_time_month, 1);
            //根据不同日期统计查询(上月)
            comodel_preceding_month = cobll.GetModelKFZ_total(u_id, u_time_preceding_month, 1);

            //流水及收入金额
            ViewBag.comodel_yesterday       = comodel_yesterday;
            ViewBag.comodel_month           = comodel_month;
            ViewBag.comodel_preceding_month = comodel_preceding_month;

            ViewBag.AppCount = modelapp;

            return(View());
        }