Exemple #1
0
        /// <summary>
        ///  更新一条数据
        /// </summary>
        public bool Update(ZhongLi.Model.PresentApplication model)
        {
            int rowsAffected = 0;

            SqlParameter[] parameters =
            {
                new SqlParameter("@ID",              SqlDbType.Int,        4),
                new SqlParameter("@UserID",          SqlDbType.Int,        4),
                new SqlParameter("@RealName",        SqlDbType.NVarChar,  50),
                new SqlParameter("@Money",           SqlDbType.Decimal,    9),
                new SqlParameter("@State",           SqlDbType.Int,        4),
                new SqlParameter("@AdminID",         SqlDbType.Int,        4),
                new SqlParameter("@AdminName",       SqlDbType.NVarChar,  50),
                new SqlParameter("@PassTime",        SqlDbType.DateTime),
                new SqlParameter("@UserType",        SqlDbType.Int,        4),
                new SqlParameter("@PayTime",         SqlDbType.DateTime),
                new SqlParameter("@CreateTime",      SqlDbType.DateTime),
                new SqlParameter("@PayAdminID",      SqlDbType.Int,        4),
                new SqlParameter("@PayAdminName",    SqlDbType.NVarChar,  50),
                new SqlParameter("@WxAccount",       SqlDbType.NVarChar,  50),
                new SqlParameter("@AliAccount",      SqlDbType.NVarChar,  50),
                new SqlParameter("@PreType",         SqlDbType.Int,        4),
                new SqlParameter("@WxAccountName",   SqlDbType.NVarChar,  50),
                new SqlParameter("@AliAccounttName", SqlDbType.NVarChar,  50),
                new SqlParameter("@PreNum",          SqlDbType.NVarChar,  50),
                new SqlParameter("@BatchID",         SqlDbType.Int, 4)
            };
            parameters[0].Value  = model.ID;
            parameters[1].Value  = model.UserID;
            parameters[2].Value  = model.RealName;
            parameters[3].Value  = model.Money;
            parameters[4].Value  = model.State;
            parameters[5].Value  = model.AdminID;
            parameters[6].Value  = model.AdminName;
            parameters[7].Value  = model.PassTime;
            parameters[8].Value  = model.UserType;
            parameters[9].Value  = model.PayTime;
            parameters[10].Value = model.CreateTime;
            parameters[11].Value = model.PayAdminID;
            parameters[12].Value = model.PayAdminName;
            parameters[13].Value = model.WxAccount;
            parameters[14].Value = model.AliAccount;
            parameters[15].Value = model.PreType;
            parameters[16].Value = model.WxAccountName;
            parameters[17].Value = model.AliAccounttName;
            parameters[18].Value = model.PreNum;
            parameters[19].Value = model.BatchID;

            DbHelperSQL.RunProcedure("PresentApplication_Update", parameters, out rowsAffected);
            if (rowsAffected > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #2
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ZhongLi.Model.PresentApplication GetModel(int ID)
        {
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            ZhongLi.Model.PresentApplication model = new ZhongLi.Model.PresentApplication();
            DataSet ds = DbHelperSQL.RunProcedure("PresentApplication_GetModel", parameters, "ds");

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Exemple #3
0
        protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            if (e.CommandName.Equals("payFail"))
            {
                int    ID        = Convert.ToInt32(e.CommandArgument);
                int    adminid   = Convert.ToInt32(Utils.GetCookie("UserID"));
                string adminname = new ZhongLi.BLL.User_Managers().GetModel(adminid).RealName;
                string realname  = ((Literal)e.Item.FindControl("ltlrealname")).Text;
                ZhongLi.Model.PresentApplication p = bll.GetModel(ID);
                if (bll.PayFail(adminid, adminname, ID, p.UserType.Value, p.UserID.Value, p.Money.Value))
                {
                    //推送通知
                    PushClass push = new PushClass();
                    push.title     = "优青通知:";
                    push.content   = "您的提现申请支付失败了,资金已退回到您的钱包,请检查您提现时填的资料是否正确";
                    push.type      = "1";
                    push.platform  = "0";
                    push.groupName = "";

                    if (p.UserType.Value == 0)//用户类型为人才
                    {
                        push.userIds = "p" + p.UserID;
                    }
                    else
                    {
                        push.userIds = "s" + p.UserID;
                    }
                    push.ts_01();
                    webHelper.addLog(adminname + "设置" + realname + "的提现申请支付失败");
                    Page.ClientScript.RegisterStartupScript(Page.GetType(), "set", "<script>window.onload=showmsg('审核提现申请','操作成功!','',1)</script>");
                    databind();
                }
                else
                {
                    Page.ClientScript.RegisterStartupScript(Page.GetType(), "set", "<script>window.onload=showmsg('审核提现申请','操作失败!','',2)</script>");
                }
            }
        }
Exemple #4
0
        protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            int    ID        = Convert.ToInt32(e.CommandArgument);
            int    adminid   = Convert.ToInt32(Utils.GetCookie("UserID"));
            string adminname = new ZhongLi.BLL.User_Managers().GetModel(adminid).RealName;
            string realname  = ((Literal)e.Item.FindControl("ltlrealname")).Text;

            ZhongLi.Model.PresentApplication p = bll.GetModel(ID);
            if (e.CommandName.Equals("auth"))
            {
                if (bll.authPass(adminid, adminname, ID, p.UserType.Value, p.UserID.Value))
                {
                    //推送通知
                    string UserID = "";
                    if (p.UserType.Value == 0)                    //用户类型为人才
                    {
                        UserID = "p" + p.UserID;
                    }
                    else
                    {
                        UserID = "s" + p.UserID;
                    }
                    JPushApiExample.ALERT       = "您的提现申请审核通过啦,优青将会在3个工作日之内将体现金额支付到您的账户";
                    JPushApiExample.MSG_CONTENT = "您的提现申请审核通过啦,优青将会在3个工作日之内将体现金额支付到您的账户";
                    PushPayload pushsms = JPushApiExample.PushObject_ios_audienceMore_messageWithExtras(UserID, "Present");
                    JPushApiExample.push(pushsms);
                    webHelper.addLog(adminname + "通过了:" + realname + "的提现申请");
                    Page.ClientScript.RegisterStartupScript(Page.GetType(), "set", "<script>window.onload=showmsg('审核提现申请','操作成功!','',1)</script>");
                    databind();
                }
                else
                {
                    Page.ClientScript.RegisterStartupScript(Page.GetType(), "set", "<script>window.onload=showmsg('审核提现申请','操作失败!','',2)</script>");
                }
            }
            if (e.CommandName.Equals("noauth"))
            {
                if (bll.noauthPass(adminid, adminname, ID, p.UserType.Value, p.UserID.Value))
                {
                    //推送通知
                    //推送通知
                    string UserID = "";
                    if (p.UserType.Value == 0)                    //用户类型为人才
                    {
                        UserID = "p" + p.UserID;
                    }
                    else
                    {
                        UserID = "s" + p.UserID;
                    }
                    JPushApiExample.ALERT       = "您的提现申请没有通过审核";
                    JPushApiExample.MSG_CONTENT = "您的提现申请没有通过审核";
                    PushPayload pushsms = JPushApiExample.PushObject_ios_audienceMore_messageWithExtras(UserID, "Present");
                    JPushApiExample.push(pushsms);
                    webHelper.addLog(adminname + "没通过:" + realname + "的提现申请");
                    Page.ClientScript.RegisterStartupScript(Page.GetType(), "set", "<script>window.onload=showmsg('审核提现申请','操作成功!','',1)</script>");
                    databind();
                }
                else
                {
                    Page.ClientScript.RegisterStartupScript(Page.GetType(), "set", "<script>window.onload=showmsg('审核提现申请','操作失败!','',2)</script>");
                }
            }
        }
Exemple #5
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public ZhongLi.Model.PresentApplication DataRowToModel(DataRow row)
 {
     ZhongLi.Model.PresentApplication model = new ZhongLi.Model.PresentApplication();
     if (row != null)
     {
         if (row["ID"] != null && row["ID"].ToString() != "")
         {
             model.ID = int.Parse(row["ID"].ToString());
         }
         if (row["UserID"] != null && row["UserID"].ToString() != "")
         {
             model.UserID = int.Parse(row["UserID"].ToString());
         }
         if (row["RealName"] != null)
         {
             model.RealName = row["RealName"].ToString();
         }
         if (row["Money"] != null && row["Money"].ToString() != "")
         {
             model.Money = decimal.Parse(row["Money"].ToString());
         }
         if (row["State"] != null && row["State"].ToString() != "")
         {
             model.State = int.Parse(row["State"].ToString());
         }
         if (row["AdminID"] != null && row["AdminID"].ToString() != "")
         {
             model.AdminID = int.Parse(row["AdminID"].ToString());
         }
         if (row["AdminName"] != null)
         {
             model.AdminName = row["AdminName"].ToString();
         }
         if (row["PassTime"] != null && row["PassTime"].ToString() != "")
         {
             model.PassTime = DateTime.Parse(row["PassTime"].ToString());
         }
         if (row["UserType"] != null && row["UserType"].ToString() != "")
         {
             model.UserType = int.Parse(row["UserType"].ToString());
         }
         if (row["PayTime"] != null && row["PayTime"].ToString() != "")
         {
             model.PayTime = DateTime.Parse(row["PayTime"].ToString());
         }
         if (row["CreateTime"] != null && row["CreateTime"].ToString() != "")
         {
             model.CreateTime = DateTime.Parse(row["CreateTime"].ToString());
         }
         if (row["PayAdminID"] != null && row["PayAdminID"].ToString() != "")
         {
             model.PayAdminID = int.Parse(row["PayAdminID"].ToString());
         }
         if (row["PayAdminName"] != null)
         {
             model.PayAdminName = row["PayAdminName"].ToString();
         }
         if (row["WxAccount"] != null)
         {
             model.WxAccount = row["WxAccount"].ToString();
         }
         if (row["AliAccount"] != null)
         {
             model.AliAccount = row["AliAccount"].ToString();
         }
         if (row["PreType"] != null && row["PreType"].ToString() != "")
         {
             model.PreType = int.Parse(row["PreType"].ToString());
         }
         if (row["WxAccountName"] != null)
         {
             model.WxAccountName = row["WxAccountName"].ToString();
         }
         if (row["AliAccounttName"] != null)
         {
             model.AliAccounttName = row["AliAccounttName"].ToString();
         }
         if (row["PreNum"] != null)
         {
             model.PreNum = row["PreNum"].ToString();
         }
         if (row["BatchID"] != null && row["BatchID"].ToString() != "")
         {
             model.BatchID = int.Parse(row["BatchID"].ToString());
         }
     }
     return(model);
 }