Ejemplo n.º 1
0
        protected void ShowInfo(string order)
        {
            lgk.Model.tb_Order orderInfo = orderBLL.GetModelByCode(order);
            if (orderInfo != null)
            {
                int iSendType = orderInfo.IsSend;

                lgk.Model.tb_user user = userBLL.GetModel(" UserID=" + orderInfo.UserID);

                ltOrderCode.Text = orderInfo.OrderCode;//订单号
                ltAddTime.Text   = orderInfo.OrderDate.ToString();
                ltStateName.Text = OrderStateName(iSendType);

                hdoid.Value        = orderInfo.OrderID.ToString();
                hdsend.Value       = iSendType.ToString();
                ltPhone.Text       = orderInfo.Order6 == null ? "" : orderInfo.Order6;                               //手机号码
                ltUserName.Text    = orderInfo.Order7 == null ? "" : orderInfo.Order7;                               //收货人姓名
                ltAddress.Text     = orderInfo.UserAddr == null ? "" : orderInfo.UserAddr;                           //收货地址
                ltTotalAmount.Text = orderInfo.OrderTotal.ToString() == null ? "" : orderInfo.OrderTotal.ToString(); //总额
                ltGongsi.Text      = orderInfo.Order3 == null ? "" : orderInfo.Order3;                               //快递公司
                ltDanhao.Text      = orderInfo.Order4 == null ? "" : orderInfo.Order4;                               //快递单号
                if (orderInfo.Order5 == "")
                {
                    orderInfo.Order5 = "1";
                }
                var model = agent1BLL.GetModel(agent1BLL.GetAgentsIDByUserCode(userBLL.GetModel(long.Parse(orderInfo.Order5)).UserCode));
                Literal1.Text = model.AgentCode;
                Literal2.Text = model.PicLink;
            }

            bind_repeater(orderDetailBLL.GetGoodsListAll(" d.OrderCode=" + order), Repeater1, "OrderDate desc", tr1);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 判断给定用户编号的会员直推奖金是否大于投资资金。
        /// </summary>
        /// <param name="iUserID">给定用户编号</param>
        /// <returns></returns>
        private bool GetBonus(int iUserID)
        {
            bool    bFalg  = false;
            decimal dBonus = Convert.ToDecimal(0.00);

            lgk.Model.tb_user          userInfo = userBLL.GetModel(iUserID);
            IList <lgk.Model.tb_bonus> list     = bonusBLL.GetModelList("[UserID] = " + iUserID + " AND TypeID = 1");

            if (list != null)
            {
                foreach (lgk.Model.tb_bonus item in list)
                {
                    dBonus += item.Amount;
                }

                if (dBonus > userInfo.RegMoney)
                {
                    bFalg = true;
                }
                else
                {
                    bFalg = false;
                }
            }

            return(bFalg);
        }
Ejemplo n.º 3
0
        protected void BindData()
        {
            lgk.Model.tb_Order model      = ob.GetModel("OrderCode='" + getStringRequest("oid") + "'");
            lgk.Model.tb_user  user       = userBLL.GetModel(" UserID=" + model.UserID);
            string             orderID    = getStringRequest("oid") == null ? "" : getStringRequest("oid");
            string             UserCode   = user.UserCode == null ? "" : user.UserCode;
            string             TrueName   = user.TrueName == null ? "" : user.TrueName;
            string             UserAddr   = model.UserAddr == null ? "" : model.UserAddr;
            string             OrderTotal = model.OrderTotal.ToString() == null ? "" : model.OrderTotal.ToString();
            string             order3     = model.Order3 == null ? "" : model.Order3;
            string             order4     = model.Order4 == null ? "" : model.Order4;

            Label1.Text = orderID;      //订单号
            Label2.Text = UserCode;     //代理编号
            Label3.Text = model.Order7; //代理姓名
            Label4.Text = UserAddr;     //收货地址
            // Label5.Text = OrderTotal;//总额
            Label6.Text = order3;       //快递公司
            Label7.Text = order4;       //快递单号
                                        // bind_repeater(GetDetail(getStringRequest("oid")), rptOrder, "OrderDate desc", null, AspNetPager1);
            //int typeid = 0;
            //var pmodel = produceTypeBLL.GetModel("Type02 = 1");
            //if (pmodel != null)
            //    typeid = pmodel.ID;

            if (model.TypeID == 0) //如果等于促销类
            {
                bind_repeater(GetDetail(getStringRequest("oid")), Repeater1, "OrderDate desc", null, AspNetPager1);
            }
            else
            {
                bind_repeater(GetDetail(getStringRequest("oid"), 5), Repeater1, "OrderDate desc", null, AspNetPager1);
            }
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                // var emResult = JsonConvert.DeserializeObject<data>(data);
                arry.Value = Request["arry"].ToString();
                DateTime dt = DateTime.ParseExact(Request["piaodate"].ToString(), "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture);
                piaodatetxt.Value         = piaodate = Convert.ToDateTime(dt).ToString("yyyy-MM-dd");
                trancodetxt.Value         = trancode = Request["trancode"].ToString();
                starttimetxt.Value        = starttime = Request["starttime"].ToString();
                startstationnametxt.Value = startstationname = Request["startstationname"].ToString();
                arrivetimetxt.Value       = arrivetime = Request["arrivetime"].ToString();
                endstationnametxt.Value   = endstationname = Request["endstationname"].ToString();
                runtimetxt.Value          = runtime = Request["runtime"].ToString();
                zwpricetxt.Value          = zwprice = Request["zwprice"].ToString();
                formcode.Value            = Request["formcode"].ToString();
                endcode.Value             = Request["endcode"].ToString();

                if (Session["UserID"] == null)
                {
                    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('请登录后再操作');", true);//没有这个用户
                    // Response.Redirect("/Login.aspx");
                }
                else
                {
                    uid.Value = Session["UserID"].ToString();
                }
                lgk.Model.tb_user model = user.GetModel(long.Parse(Session["UserID"].ToString()));
                money.Value = model.Emoney.ToString();

                isbaoxian.Value = getParamInt().ToString();
            }
        }
Ejemplo n.º 5
0
 public bool Appeal(long userid, int type, string content, string picpath, out string message)
 {
     lgk.Model.tb_user     userInfo = userBLL.GetModel(userid);
     lgk.Model.tb_leaveMsg leaveMsg = new lgk.Model.tb_leaveMsg()
     {
         MsgTitle     = "",
         MsgContent   = content.Trim(),
         LeaveTime    = DateTime.Now,
         IsRead       = 0,
         IsReply      = 0,
         FromUserType = 1,
         UserID       = userid,
         UserCode     = userInfo.UserCode,
         FromIDIsDel  = 0,
         ToIDIsDel    = 0,
         ToUserID     = 1,
         ToUserType   = 2,
         ToUserCode   = "admin",
         MsgType      = type,
         Pic          = picpath
     };
     if (leaveMsgBLL.Add(leaveMsg) > 0)
     {
         message = "发送成功";
         return(true);
     }
     else
     {
         message = "发送失败";
         return(false);
     }
 }
Ejemplo n.º 6
0
        /// <summary>
        /// 取消订单
        /// </summary>
        /// <param name="dic"></param>
        /// <returns></returns>
        public string Cancel(Dictionary <string, object> dic)
        {
            string respon = RequestSumit(dic, "ordercancel");

            if (respon != "error")
            {
                var Result = JsonConvert.DeserializeObject <respondTicketResult>(respon);
                if (Result.successcode == "T")
                {
                    lgk.Model.tb_TicketOrder tickmodel = ordermodel.GetModel("OrdeID='" + dic["orderno"].ToString() + "'");
                    if (tickmodel.PayStatus == 1)
                    {
                        //取消订单返还账户金额
                        lgk.Model.tb_user model = userBLL.GetModel(tickmodel.UserID);
                        model.Emoney += tickmodel.TicketPrice + 20;
                        userBLL.Update(model);
                        string bramk = "取消订单" + tickmodel.OrdeID + ",返回注册分:" + tickmodel.TicketPrice;
                        JournalAdd(tickmodel.UserID, bramk, 1, tickmodel.TicketPrice);
                    }
                    //更新订单状态
                    ordermodel.UpdateStatus(10, 2, dic["orderno"].ToString());
                    return(respon);
                }
                return(respon);
            }
            else
            {
                return("{\"successcode\":\"F\",\"errorcode\":\"1\",\"info\":\"请求接口异常,请重试或联系接口商\"}");
            }
        }
Ejemplo n.º 7
0
        protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            long UserID = long.Parse(e.CommandArgument.ToString());

            lgk.Model.tb_user model = userBLL.GetModel(UserID);
            if (model == null)
            {
                MessageBox.MyShow(this, "该会员已删除,无法再进行此操作!");
                return;
            }
            if (model.IsOpend == 2)
            {
                MessageBox.MyShow(this, "该会员已开通,无法再进行此操作!");
                return;
            }
            if (userBLL.Delete(UserID))
            {
                MessageBox.MyShow(this, "删除成功!");
                BindData();
            }
            else
            {
                MessageBox.MyShow(this, "删除失败!");
            }
        }
Ejemplo n.º 8
0
        //发表动态
        public bool Friends(long userid, string dynamic, string path, out string message)
        {
            if (FriendsValidate(userid, dynamic, path, out message))
            {
                lgk.Model.tb_user userInfo = userBLL.GetModel(userid);

                lgk.Model.tb_FriendDynamic friend = new lgk.Model.tb_FriendDynamic()

                {
                    UserID     = userid,
                    Content    = dynamic.Trim(),
                    Pic        = path.Trim(),
                    AddTime    = DateTime.Now,
                    GoodNum    = 0,
                    CommentNum = 0,
                };

                if (friendBLL.Add(friend) > 0)
                {
                    message = "发送成功";
                    return(true);
                }
                else
                {
                    message = "发送失败";
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 9
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (RegValidate())
            {
                lgk.Model.tb_user m_user = userBLL.GetModel(getID());
                m_user.BankAccount     = this.txtBankAccount.Value.Trim();     // "銀行賬號";
                m_user.BankAccountUser = this.txtBankAccountUser.Value.Trim(); // "開户姓名";
                m_user.BankName        = this.ddlBank.SelectedValue;           // "開户銀行";
                m_user.BankBranch      = this.txtBankBranch.Value.Trim();      // "支行名稱";
                m_user.BankInProvince  = DropDownList3.SelectedItem.Text;      // "銀行所在省份";
                //m_user.BankInCity = DropDownList1.SelectedItem.Text;// "銀行所在城市";

                m_user.NiceName = this.txtNickName.Value.Trim(); // "姓名";
                m_user.TrueName = this.txtTrueName.Value.Trim(); // "姓名";
                m_user.IdenCode = this.txtIdenCode.Value.Trim(); // "身份证號";
                m_user.PhoneNum = this.txtPhoneNum.Value;        // "手机號碼";
                //m_user.SafetyCodeQuestion = DropDownList4.SelectedItem.Text;
                //m_user.SafetyCodeAnswer = DropDownList5.SelectedItem.Text;
                m_user.Address = txtAddress.Value; //聯系地址
                m_user.User005 = "";               //txtEmail.Value;//郵編號碼

                if (userBLL.Update(m_user))
                {
                    MessageBox.MyShow(this, "修改资料成功!");
                }
                else
                {
                    MessageBox.MyShow(this, "修改资料失败!");
                }
                bind_member();
            }
        }
Ejemplo n.º 10
0
        protected void btnSumit_Click(object sender, EventArgs e)
        {
            lgk.Model.tb_userPro upModel  = new lgk.Model.tb_userPro();
            lgk.Model.tb_user    userInfo = userBLL.GetModelByUserCode(TxtCode.Text.Trim());
            if (userInfo == null)
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('会员不存在!');", true);
                return;
            }
            upModel.ProMoney = 0;//Convert.ToInt32(txtMoney.Text);
            int endLevl = Convert.ToInt32(dropLevel.SelectedValue);

            if (endLevl == userInfo.LevelID)
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('选择与当前不同的等级!');", true);
                return;
            }

            if (flag_pro(userInfo.UserID, endLevl, 1))
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('操作成功!');", true);
                bind_pro();
            }
            else
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('操作失败!');", true);
                return;
            }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// 荣誉奖
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void LinkButton2_Click(object sender, EventArgs e)
        {
            string strUserCode = txtUserCode.Text.Trim();

            lgk.Model.tb_user userModel = userBLL.GetModelByUserCode(strUserCode);
            if (userModel == null)
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('此用户编号不存在!');", true);
                return;
            }
            if (userModel.LevelID != 6)
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('您输入的会员不是荣誉股东!');", true);
                return;
            }
            decimal iMoney;

            if (!decimal.TryParse(txtMoney.Text.Trim(), out iMoney))
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('您输入的金额格式错误!');", true);
                return;
            }
            if (iMoney <= 0)
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('您输入的金额必须大于0!');", true);
                return;
            }
            MySQL(string.Format(" exec proc_Award_Rongyu " + userModel.UserID + "," + iMoney));
            //  MySQL(string.Format(" exec proc_datebonus"));
            ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('发放成功!');", true);
        }
Ejemplo n.º 12
0
        public string GetNiceName(string strName)
        {
            string str = "";

            if (strName.Trim() != "")
            {
                if (strName.Trim() == "admin")
                {
                    str = "admin";
                }
                else
                {
                    lgk.Model.tb_user userModel = userBLL.GetModel(" UserCode='" + strName + "'");
                    if (userModel != null)
                    {
                        if (userModel.RecommendCode == "admin")
                        {
                            str = "";
                        }
                        else
                        {
                            str = userModel.NiceName;
                        }
                    }
                }
            }

            return(str);
        }
Ejemplo n.º 13
0
        protected void LinkButton3_Click(object sender, EventArgs e)
        {
            if (txtCode.Text.Trim() == "")
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('会员编号不能为空!');", true);
                return;
            }
            lgk.Model.tb_user model_user = userBLL.GetModel(" UserCode='" + txtCode.Text.Trim() + "'");
            if (model_user == null)
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('会员不存在!');", true);
                return;
            }
            if (model_user.AgentsID != agentBLL.GetIDByIDUser(getLoginID()))
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('所属报单中心不正确!');", true);
                return;
            }
            if (txtMoney.Value.Trim() == "")
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('消费金额不能为空!');", true);
                return;
            }
            decimal money = 0;

            try
            {
                money = Convert.ToDecimal(txtMoney.Value.Trim());
            }
            catch
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('消费金额格式不正确!');", true);
                return;
            }
            if (money <= 0)
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('消费金额要大于零!');", true);
                return;
            }
            if (money > model_user.StockAccount)
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('重复消费账户余额不足!');", true);
                return;
            }
            lgk.Model.tb_mix model = new lgk.Model.tb_mix();
            model.UserID  = model_user.UserID;
            model.Amount  = money;
            model.AddTime = DateTime.Now;
            model.Source  = "报单中心消费";
            if (mixBLL.Add(model) > 0)
            {
                AllCore acore = new AllCore();//1收入2支出
                acore.add_userRecord(new lgk.BLL.tb_user().GetModel(model.UserID).UserCode, DateTime.Now, money, 2);
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('操作成功!');window.location.href='agent_xf.aspx';", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('错误!');", true);
            }
        }
Ejemplo n.º 14
0
        private void ajax()
        {
            string tid = Request.QueryString["tid"];

            string[] tids = tid.Split(',');
            if (tids.Count() == 0)
            {
                return;
            }
            Response.Clear(); //清除所有之前生成的Response内容

            foreach (var t in tids)
            {
                lgk.Model.tb_takeMoney cModel = takeBLL.GetModel(Convert.ToInt32(t));
                lgk.Model.tb_user      user   = userBLL.GetModel(Convert.ToInt32(cModel.UserID));
                if (cModel.Flag == 0)
                {
                    cModel.Flag    = 1;
                    cModel.Take006 = DateTime.Now;
                    if (takeBLL.Update(cModel) && UpdateSystemAccount("MoneyAccount", Convert.ToDecimal(cModel.RealityMoney), 0) > 0)
                    {
                        if (cModel.Take001 == 6)
                        {
                            user.Batch = 0;
                            userBLL.Update(user);
                        }
                    }
                }
            }

            Response.Write("ok");
            Response.End(); //停止Response后续写入动作,保证Response内只有我们写入内容
        }
Ejemplo n.º 15
0
        //取消会员提现
        public bool ItemCommand(long userid, long txid, string paypassword, out string message)
        {
            lgk.Model.tb_takeMoney takeMoneyInfo = takeBLL.GetModel(txid);
            if (takeMoneyInfo == null)
            {
                message = GetLanguage("recordDeleted");
                return(false);
            }
            if (takeMoneyInfo.Flag != 0)
            {
                message = GetLanguage("recordApproved");
                return(false);
            }
            //提现账户  1:云盾,2:原始积分
            int AccountType = takeMoneyInfo.Take001;

            lgk.Model.tb_user userInfo = userBLL.GetModel(takeMoneyInfo.UserID);
            if (paypassword != userInfo.SecondPassword)
            {
                message = "支付密码错误";
                return(false);
            }
            if (userInfo.IsLock == 1)
            {
                message = "账户已冻结,取消提现失败";
                return(false);
            }
            //加入流水账表
            lgk.Model.tb_journal model = new lgk.Model.tb_journal();
            model.UserID        = takeMoneyInfo.UserID;
            model.Remark        = "取消提现";
            model.InAmount      = takeMoneyInfo.TakeMoney;
            model.OutAmount     = 0;
            model.BalanceAmount = (AccountType == 1? userInfo.Emoney : userInfo.StockAccount) + takeMoneyInfo.TakeMoney;
            model.JournalDate   = DateTime.Now;
            model.JournalType   = (AccountType == 1 ? (int)Library.AccountType.云盾 : (int)Library.AccountType.云图);
            model.Journal01     = takeMoneyInfo.UserID;


            if (journalBLL.Add(model) > 0 && takeBLL.UpdateFlag(Convert.ToInt64(userid), Convert.ToInt64(txid)) > 0)
            {
                if (AccountType == 1)
                {
                    UpdateAccount("Emoney", takeMoneyInfo.UserID, takeMoneyInfo.TakeMoney, 1);
                }
                else if (AccountType == 2)
                {
                    UpdateAccount("StockAccount", takeMoneyInfo.UserID, takeMoneyInfo.TakeMoney, 1);
                }
                message = GetLanguage("CancellationSuccess");//取消成功
                return(true);
            }
            else
            {
                message = GetLanguage("FailedToCancel");//取消失败
                return(false);
            }
        }
Ejemplo n.º 16
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string strIDcard = txtIdCard.Text.Trim();

            if (string.IsNullOrEmpty(strIDcard))
            {
                MessageBox.ShowBox(this.Page, "请输入身份证号码", Library.Enums.ModalTypes.warning);//云盾余额不足
                return;
            }
            string strRealName = txtRealName.Text.Trim();

            if (string.IsNullOrEmpty(strRealName))
            {
                MessageBox.ShowBox(this.Page, "请输入真实姓名", Library.Enums.ModalTypes.warning);//云盾余额不足
                return;
            }
            lgk.Model.tb_user userModel = userBLL.GetModel(getLoginID());
            if (!string.IsNullOrEmpty(userModel.IdenCode))
            {
                MessageBox.ShowBox(this.Page, "您的身份证已通过验证", Library.Enums.ModalTypes.warning);//云盾余额不足
                return;
            }

            string message   = "";
            string strswitch = System.Configuration.ConfigurationManager.AppSettings["IDCARD_SWITCH"];

            if (strswitch == "OPEN")
            {
                IDAuthentication ida = new IDAuthentication();
                message = ida.AuthenticationIDAndName(strIDcard, strRealName);
            }
            else
            {
                message = "success";
            }

            if (message == "success")
            {
                bool flag = userBLL.UpdateIdCardAndTrueName(getLoginID(), strIDcard, strRealName);
                if (flag)
                {
                    MessageBox.ShowBox(this.Page, "验证成功", Library.Enums.ModalTypes.success, "/user/finance/Invest.aspx");//投资成功
                    //MessageBox.ShowAndRedirect(this.Page, "验证成功", );
                    return;
                }
                else
                {
                    MessageBox.ShowBox(this.Page, "验证失败", Library.Enums.ModalTypes.error);//投资成功
                    return;
                }
            }
            else
            {
                MessageBox.ShowBox(this.Page, message, Library.Enums.ModalTypes.warning);//
                return;
            }
        }
Ejemplo n.º 17
0
        /// <summary>
        /// 获取条件
        /// </summary>
        /// <returns></returns>
        private string getWhere()
        {
            string id2      = Request.QueryString["id"];
            string UserID2  = Request.QueryString["UserID"];
            string id       = Request.QueryString["type"];
            string usercode = this.txtOrdercode.Value.Trim();
            string StarTime = this.txtStartTime.Value.Trim();
            string EndTime  = txtEndTime.Value.Trim();
            string strWhere = "TypeID <> 5 and o.order5=" + getLoginID();;

            // str += " and u.IsOpend in ( '2','3') "; //已开通的代理 空单代理
            // str += " and IsDel = 0 ";   //未删除的订单
            strWhere += " and IsSend > 0";
            switch (id)
            {
            case "1": strWhere += ""; break;

            case "2": strWhere += "and o.IsSend=0"; break;    //未付款

            case "3": strWhere += "and o.IsSend=1"; break;    //待发货

            case "4": strWhere += "and o.IsSend=2"; break;    //已发货

            case "5": strWhere += "and o.IsSend=3"; break;    //已完成
            }
            if (UserID2 != null)
            {
                if (int.Parse(id2) == 1)
                {
                    strWhere += " and u.UserID=" + UserID2 + " ";
                }
                if (int.Parse(id2) == 2)
                {
                    lgk.Model.tb_user modeluser = userBLL.GetModel(int.Parse(UserID2));
                    strWhere += " and u.RecommendPath like '%" + modeluser.RecommendPath + "%'";
                }
            }
            if (!string.IsNullOrEmpty(usercode))
            {
                strWhere += " and o.OrderCode like '%" + usercode + "%' ";
            }

            if (StarTime != "" && EndTime == "")
            {
                strWhere += string.Format(" and Convert(nvarchar(10),OrderDate,120)  >= '" + StarTime + "'");
            }
            else if (StarTime == "" && EndTime != "")
            {
                strWhere += string.Format("  and Convert(nvarchar(10),OrderDate,120)  <= '" + EndTime + "'");
            }
            else if (StarTime != "" && EndTime != "")
            {
                strWhere += string.Format("  and Convert(nvarchar(10),OrderDate,120)  between '" + StarTime + "' and '" + EndTime + "'");
            }
            return(strWhere);
        }
Ejemplo n.º 18
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     lgk.Model.tb_admin fromAdmin = adminBLL.GetModel(getLoginID());
     lgk.Model.tb_user  user      = null;//收件人
     if (textUserCode.Value == "")
     {
         ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('留言对象不能为空!');", true);
         return;
     }
     //验证是否存在会员
     user = userBLL.GetModel(GetUserID(textUserCode.Value.Trim()));
     if (user == null)
     {
         ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('不存在的账号!');", true);
         return;
     }
     if (user.IsOpend == 0)
     {
         ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('会员未开通!');", true);
         return;
     }
     if (textTitle.Value == "")
     {
         ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('标题不能为空!');", true);
         return;
     }
     if (txtPubContext.Text == "")
     {
         ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('内容不能为空!');", true);
         return;
     }
     lgk.Model.tb_leaveMsg leaveMsg = new lgk.Model.tb_leaveMsg()
     {
         MsgTitle     = textTitle.Value,
         MsgContent   = txtPubContext.Text,
         LeaveTime    = DateTime.Now,
         IsRead       = 0,
         IsReply      = 0,
         FromUserType = 2,
         UserID       = 1,
         UserCode     = "admin",
         FromIDIsDel  = 0,
         ToIDIsDel    = 0,
     };
     leaveMsg.ToUserType = 1;
     leaveMsg.ToUserID   = user.UserID;
     leaveMsg.ToUserCode = user.UserCode;
     if (leaveMsgBLL.Add(leaveMsg) > 0)
     {
         ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('发送成功!');window.location.href='LeaveOut.aspx';", true);
     }
     else
     {
         ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('发送失败!');", true);
     }
 }
Ejemplo n.º 19
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string strNum = txtActiveNum.Value.Trim();
            int    num;

            if (!int.TryParse(strNum, out num))
            {
                MessageBox.ShowBox(this.Page, "您输入的激活单数格式错误", Library.Enums.ModalTypes.error);
                return;
            }
            int typeid = Convert.ToInt32(dropPayType.SelectedValue);

            if (typeid == 0)
            {
                MessageBox.ShowBox(this.Page, "请选择激活方式", Library.Enums.ModalTypes.warning);
                return;
            }
            if (num <= 0)
            {
                MessageBox.ShowBox(this.Page, "激活的单数必须大于0", Library.Enums.ModalTypes.warning);
                return;
            }
            if (num > 50)
            {
                MessageBox.ShowBox(this.Page, "激活的单数最多50单", Library.Enums.ModalTypes.warning);
                return;
            }

            string strPayPwd = txtPayPwd.Value.Trim();

            lgk.Model.tb_user userModel = userBLL.GetModel(getLoginID());
            if (!userModel.SecondPassword.Equals(PageValidate.GetMd5(strPayPwd)))
            {
                MessageBox.ShowBox(this.Page, "支付密码错误", Library.Enums.ModalTypes.warning);
                return;
            }

            string msg = userBLL.proc_open(getLoginID(), 2, 0, typeid, num, 1);

            if (msg == "ok")
            {
                MessageBox.ShowBox(this.Page, "激活成功", Library.Enums.ModalTypes.success);
                BindData();
                return;
            }
            else if (!string.IsNullOrEmpty(msg))
            {
                MessageBox.ShowBox(this.Page, msg, Library.Enums.ModalTypes.error);
                return;
            }
            else
            {
                MessageBox.ShowBox(this.Page, "激活失败", Library.Enums.ModalTypes.error);
                return;
            }
        }
Ejemplo n.º 20
0
        protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            if (e.CommandName == "cancel")
            {
                long iCashsellID = Convert.ToInt64(e.CommandArgument);
                lgk.Model.Cashsell cashsellInfo = cashsellBLL.GetModel(iCashsellID);
                lgk.Model.tb_user  userInfo     = userBLL.GetModel(cashsellInfo.UserID);
                if (cashsellInfo == null)
                {
                    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("recordDeleted") + "');", true);//该记录已删除,无法再进行此操作
                    return;
                }
                if (cashsellInfo.IsSell > 1)
                {
                    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("GoldUnable") + "');", true); //金币已卖出,无法再进行此操作
                    return;                                                                                                                    //GoldUnable
                }

                #region 加入流水账表
                //现金积分
                //decimal dNumber = (cashsellInfo.Number + cashsellInfo.Charge) * cashsellInfo.UnitNum;
                decimal dNumber = (cashsellInfo.Number);

                lgk.Model.tb_journal model = new lgk.Model.tb_journal();
                model.UserID        = cashsellInfo.UserID;
                model.Remark        = "取消订单,返回交易币";
                model.InAmount      = dNumber;
                model.OutAmount     = 0;
                model.BalanceAmount = userInfo.ShopAccount + dNumber;
                model.JournalDate   = DateTime.Now;
                model.JournalType   = (int)Library.AccountType.交易钱包;
                model.Journal01     = cashsellInfo.UserID;

                //交易码
                lgk.Model.tb_journal modelTrans = new lgk.Model.tb_journal();
                modelTrans.UserID        = cashsellInfo.UserID;
                modelTrans.Remark        = "取消订单,返回保证金";
                modelTrans.InAmount      = cashsellInfo.Charge;
                modelTrans.OutAmount     = 0;
                modelTrans.BalanceAmount = userInfo.ShopAccount + dNumber + cashsellInfo.Charge;
                modelTrans.JournalDate   = DateTime.Now;
                modelTrans.JournalType   = (int)Library.AccountType.交易钱包;
                modelTrans.Journal01     = cashsellInfo.UserID;

                #endregion

                if (journalBLL.Add(model) > 0 && journalBLL.Add(modelTrans) > 0 && cashsellBLL.UpdateUndo(iCashsellID, 1) && UpdateAccount("ShopAccount", getLoginID(), dNumber + cashsellInfo.Charge, 1) > 0)
                {
                    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("CancellationSuccess") + "');window.location.href='CashsellList.aspx';", true);//取消成功
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("FailedToCancel") + "');", true);//取消失败
                }
            }
        }
Ejemplo n.º 21
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (LoginUser.User005 == "1")
            {
                return;
            }

            if (RegValidate())
            {
                lgk.Model.tb_user m_user = userBLL.GetModel(GetUserID());

                m_user.BankAccount = this.txtBankAccount.Value.Trim();         // "銀行賬號";
                //if (string.IsNullOrEmpty(m_user.BankAccountUser))
                m_user.BankAccountUser = this.txtBankAccountUser.Value.Trim(); // "開户姓名";
                m_user.BankName        = this.dropBank.SelectedValue;          // "開户銀行";
                m_user.BankBranch      = this.txtBankBranch.Value.Trim();      // "支行名稱";
                m_user.BankInProvince  = dropProvince.SelectedItem.Text;       // "銀行所在省份";
                //m_user.BankInCity = city.Value;// "銀行所在城市";

                m_user.NiceName = this.txtNiceName.Value.Trim();// "姓名";
                //m_user.TrueName = this.txtTrueName.Value.Trim();// "姓名";
                // m_user.IdenCode = this.txtIdenCode.Text.Trim();// "身份证號";
                //m_user.PhoneNum = this.txtPhoneNum.Value;// "手机號碼";
                //m_user.QQnumer =txtQQnumer.Value.Trim();//QQ
                //m_user.Email = txtEmail.Text.Trim();//电子邮箱
                //m_user.Address = txtAddress.Value;//聯系地址
                m_user.User010 = txtAlipay.Value.Trim(); //支付宝

                m_user.User005 = "1";
                if (userBLL.Update(m_user))
                {
                    #region 日志
                    string ip = Page.Request.UserHostAddress;

                    lgk.Model.SysLog log       = new lgk.Model.SysLog();//日志
                    lgk.BLL.SysLog   syslogBLL = new lgk.BLL.SysLog();
                    log.LogMsg    = "";
                    log.LogType   = 5;                        //修改资料
                    log.LogLeve   = 0;                        //
                    log.LogDate   = DateTime.Now;
                    log.LogCode   = "修改资料";                   //订单编号
                    log.IsDeleted = 0;
                    log.Log1      = m_user.UserID.ToString(); //用户UserID
                    log.Log2      = ip;                       //
                    log.Log3      = "";
                    log.Log4      = "";
                    syslogBLL.Add(log);
                    #endregion
                    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("Modifications") + "');window.location.href='PersonalInfo.aspx'", true);//修改资料成功
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("FailedModify") + "');", true);//修改资料失败
                }
            }
        }
Ejemplo n.º 22
0
        public void GetQuest()
        {
            string question = Request["question"].ToString();
            string answer   = Request["answer"].ToString();
            string name     = Request["ucode"].ToString();

            lgk.Model.tb_user LoginUser = null;
            int num = ConvertToInt(Session["num"]);

            if (num > 3)
            {
                Response.Write("4");
                return;
            }
            try
            {
                LoginUser = new lgk.BLL.tb_user().GetModel(name == "" ? " 1<>1 " : " usercode ='" + name + "'");
            }
            catch (Exception)
            {
                Response.Write("1");
                return;
            }
            if (LoginUser == null)
            {
                Response.Write("1");
                return;
            }
            if (LoginUser.User009 != question)
            {
                num++;
                Session["num"] = num;
                Response.Write("2");
                return;
            }
            if (LoginUser.User010 != answer)
            {
                num++;
                Session["num"] = num;
                Response.Write("3");
                return;
            }
            Session["userCount"] = 0;
            LoginUser.Password   = PageValidate.GetMd5("111111");
            if (userBLL.Update(LoginUser))
            {
                Response.Write("5");
                return;
            }
            else
            {
                Response.Write("6");
                return;
            }
        }
Ejemplo n.º 23
0
        protected void LinkButton3_Click(object sender, EventArgs e)
        {
            if (txtCode.Text.Trim() == "")
            {
                MessageBox.MyShow(this, "会员编号不能为空!");
                return;
            }
            lgk.Model.tb_user model_user = userBLL.GetModel(" UserCode='" + txtCode.Text.Trim() + "'");
            if (model_user == null)
            {
                MessageBox.MyShow(this, "会员不存在!");
                return;
            }
            if (txtMoney.Value.Trim() == "")
            {
                MessageBox.MyShow(this, "消费金额不能为空!");
                return;
            }
            decimal money = 0;

            try
            {
                money = Convert.ToDecimal(txtMoney.Value.Trim());
            }
            catch
            {
                MessageBox.MyShow(this, "消费金额格式不正确!");
                return;
            }
            if (money <= 0)
            {
                MessageBox.MyShow(this, "消费金额要大于零!");
                return;
            }
            if (money > model_user.StockAccount)
            {
                MessageBox.MyShow(this, "重复消费账户余额不足!");
                return;
            }
            lgk.Model.tb_mix model = new lgk.Model.tb_mix();
            model.UserID  = model_user.UserID;
            model.Amount  = money;
            model.AddTime = DateTime.Now;
            model.Source  = "后台消费";
            if (mixBLL.Add(model) > 0)
            {
                AllCore acore = new AllCore();//1收入2支出
                acore.add_userRecord(new lgk.BLL.tb_user().GetModel(model.UserID).UserCode, DateTime.Now, money, 2);
                MessageBox.MyShow(this, "操作成功!");
            }
            else
            {
                MessageBox.MyShow(this, "错误!");
            }
        }
Ejemplo n.º 24
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string strIDcard = txtIdCard.Text.Trim();

            if (string.IsNullOrEmpty(strIDcard))
            {
                MessageBox.ShowBox(this.Page, "请输入身份证号码", Library.Enums.ModalTypes.warning);//注册分余额不足
                return;
            }
            string strRealName = txtRealName.Text.Trim();

            if (string.IsNullOrEmpty(strRealName))
            {
                MessageBox.ShowBox(this.Page, "请输入真实姓名", Library.Enums.ModalTypes.warning);//请输入真实姓名
                return;
            }
            lgk.Model.tb_user userModel = userBLL.GetModel(getLoginID());
            if (!string.IsNullOrEmpty(userModel.IdenCode))
            {
                MessageBox.ShowBox(this.Page, "您的身份证已通过验证", Library.Enums.ModalTypes.warning);//您的身份证已通过验证
                return;
            }

            int idcodenum = GetIDCodeNumber(strIDcard);

            if (idcodenum >= getParamInt("SystemName6"))
            {
                MessageBox.ShowBox(this.Page, "验证失败", "您的身份证已验证,不能重复验证", Library.Enums.ModalTypes.warning);//您的身份证已验证
                return;
            }

            IDAuthentication ida     = new IDAuthentication();
            string           message = ida.AuthenticationIDAndName(strIDcard, strRealName);

            if (message == "success")
            {
                bool flag = userBLL.UpdateIdCardAndTrueName(getLoginID(), strIDcard, strRealName);
                if (flag)
                {
                    MessageBox.ShowBox(this.Page, "验证成功", Library.Enums.ModalTypes.success, "/user/finance/Invest.aspx");//投资成功
                    //MessageBox.ShowAndRedirect(this.Page, "验证成功", );
                    return;
                }
                else
                {
                    MessageBox.ShowBox(this.Page, "验证失败", Library.Enums.ModalTypes.error);//投资成功
                    return;
                }
            }
            else
            {
                MessageBox.ShowBox(this.Page, message, Library.Enums.ModalTypes.warning);//
                return;
            }
        }
Ejemplo n.º 25
0
        public TreeNode getTree(long uid)
        {
            lgk.Model.tb_user userInfo = new lgk.Model.tb_user();
            if (userBLL.GetModel(uid) == null)
            {
                return(null);
            }
            userInfo = userBLL.GetModel(uid);
            TreeNode node      = new TreeNode();
            string   LevelName = levelBLL.GetLevelName(userInfo.LevelID);
            string   dd        = "";

            //是否开通
            if (userInfo.IsOpend == 0)
            {
                dd = "[<span style='color:red;'>未开通</span>]";
            }
            else if (userInfo.IsOpend == 2)
            {
                dd = "[已开通]";
            }

            if (uid == 1)
            {
                node.Text        = userInfo.UserCode;
                node.ImageUrl    = "../../images/ico_admin.gif";
                node.NavigateUrl = "RecommendTree.aspx?UserID=" + userInfo.UserID;
            }
            else
            {
                if (userBLL.GetLocation(userInfo.UserID) > 1)
                {
                    node.Text = userInfo.UserCode + "[" + userInfo.TrueName + "][" + LevelName + "]" + dd + "【团队业绩" + userInfo.User018 + "】【本金:" + userInfo.RegMoney + "】";
                    //node.Text = userInfo.UserCode + "[" + userInfo.TrueName + "][" + LevelName + "]" + dd + "【团队业绩" + userInfo.User018 + "】";
                }
                else
                {
                    node.Text = userInfo.UserCode + "[" + userInfo.TrueName + "][" + LevelName + "]" + dd + "【团队业绩" + userInfo.User018 + "】【本金:" + userInfo.RegMoney + "】";
                    //node.Text = userInfo.UserCode + "[" + userInfo.TrueName + "][" + LevelName + "]" + dd + "【团队业绩" + 0 + "】";
                }
                // node.Text = userInfo.UserCode + userInfo.TrueName + "[" + LevelName + "]" + dd;
                node.NavigateUrl = "RecommendTree.aspx?UserID=" + userInfo.UserID;
            }
            IList <lgk.Model.tb_user> list = userBLL.GetModelList(" RecommendID = " + userBLL.GetModel(uid).UserID);

            if (list == null)
            {
                return(null);
            }
            foreach (lgk.Model.tb_user item in list)
            {
                node.ChildNodes.Add(getTree(item.UserID));
            }
            return(node);
        }
Ejemplo n.º 26
0
        protected void btnSumit_Click(object sender, EventArgs e)
        {
            lgk.Model.tb_userPro upModel  = new lgk.Model.tb_userPro();
            lgk.Model.tb_user    userInfo = userBLL.GetModel(" UserCode='" + TxtCode.Text + "'");
            if (userInfo == null)
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('会员不存在!');", true);
                return;
            }
            upModel.ProMoney = Convert.ToInt32(txtMoney.Text);
            int endLevl = Convert.ToInt32(dropLevel.SelectedValue);

            //加入用户升级表
            upModel.UserID    = userInfo.UserID;
            upModel.AddDate   = DateTime.Now;
            upModel.LastLevel = userInfo.LevelID;
            upModel.EndLevel  = endLevl;
            upModel.Remark    = "后台晋升";
            upModel.Flag      = 1;
            upModel.FlagDate  = DateTime.Now;

            //lgk.Model.tb_remit remit = new lgk.Model.tb_remit();
            //remit.UserID = userInfo.UserID;
            //remit.RemitMoney = Convert.ToDecimal(txtMoney.Text);
            //remit.BankAccountUser = "";
            //remit.BankAccount ="";
            //remit.BankName = "";
            //remit.RechargeableDate = DateTime.Now;
            //remit.AddDate = DateTime.Now;
            //remit.State = 1;
            //remit.PassDate = DateTime.Now;
            //remit.Remit001 = 3; //1-激活会员 2-复投 3-会员升级
            //remit.Remark = "";
            //remit.Remit003 = "";
            //remit.Remit004 = "";
            //remit.Remit005 = "";
            if (userInfo.LevelID > endLevl)//降级
            {
                userInfo.RegMoney = getParamAmount("Level" + endLevl);
                //userInfo.Emoney = getParamAmount("consume" + endLevl);
            }

            userInfo.LevelID = endLevl;

            long pro = proBLL.Add(upModel);

            userBLL.Update(userInfo);
            // long uid = remitbll.Add(remit);
            if (pro > 0)
            {
                add_userRecord(userInfo.UserCode, DateTime.Now, upModel.ProMoney, 2);
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('操作成功!');", true);
                bind_pro();
            }
        }
Ejemplo n.º 27
0
 /// <summary>
 /// 提交订单处理
 /// </summary>
 /// <param name="dic"></param>
 /// <param name="dic1"></param>
 /// <param name="dic2"></param>
 /// <returns></returns>
 public string Submit(Dictionary<string, object> dic, Dictionary<string, object> dic1, Dictionary<string, object> dic2)
 {
     decimal banlcen = bllaccount.BanlceAcount("TicketAccount");
     decimal money = Convert.ToDecimal(dic["allprice"].ToString());
     if (banlcen >= money)
     {
         //提交订单成功添加到本地订单
         lgk.Model.tb_user usermodel = userBLL.GetModel(Convert.ToInt32(dic["UserID"].ToString()));
         if (usermodel.IsLock == 1)
         {
             return "{\"successcode\":\"F\",\"errorcode\":0,\"info\":\"账户已冻结,提交失败\"}";
         }
         if (usermodel.Emoney >= Convert.ToDecimal(dic["allprice"].ToString()))
         {
             
             //提交订单到接口
             string respon = RequestSumit(dic2, dic["act"].ToString());
             if (respon != "error")
             {
                 dic2.Add("UserID", dic["UserID"].ToString());
                 var Result = JsonConvert.DeserializeObject<respondTicketResult>(respon);
                 if (Result.result != null)
                 {
                     dic2.Add("OrdeID", Result.result.orderno);
                     dic2.Add("Totaltax", Result.result.totaltax);
                     dic2.Add("PayPrice", Result.result.payprice);
                     dic2.Add("TicketPrice", Result.result.ticketprice);
                     dic2.Add("PolicyNum", Result.result.policynum);
                     dic2.Add("PostPrice", Result.result.postprice);
                     dic2.Add("InsurancePrice", Result.result.insuranceprice);
                     dic2.Add("CouponPrice", "0");
                     dic2.Add("AirName", dic["airname"].ToString());
                     dic2.Add("DepcityName", dic["depcityname"].ToString());
                     dic2.Add("ArrcityName", dic["arrcityname"].ToString());
                     //dic2["deptime"] = dic["depdate"] + " " + dic["deptime"];
                     //dic2["arrtime"] = dic["depdate"] + " " + dic["arrtime"];
                     //添加本地订单
                     OrderHandle(dic2, dic);
                    
                 }
             }
             return respon;
             
         }
         else
         {
             return "{\"successcode\":\"F\",\"errorcode\":0,\"info\":\"原始币余额不足\"}";
         }
     }
     else
     {
          return "{\"successcode\":\"F\",\"errorcode\":\"1\",\"info\":\"该功能正在维护中\"}";
         // return "{\"successcode\":\"F\",\"errorcode\":\"1\",\"info\":\"平台余额不足,该功能已暂停使\"}";
     }
 }
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string s = "\r\n" + "\r\n" + "\r\n" + "\r\n" + "记录时间" + DateTime.Now.ToString() + "\r\n";

            try
            {
                context.Response.ContentType = "text/plain";
                string sporder_id = context.Request["sporder_id"];
                string orderid    = context.Request["orderid"];
                string sta        = context.Request["sta"];
                string sign       = context.Request["sign"];
                string err_msg    = context.Request["err_msg"];
                s = s + "接受内容信息:聚合订单号:" + sporder_id + ",本地订单号:" + orderid + ",订单状态:" + sta + ",签名:" + sign + "\r\n";
                //var emResult = JsonConvert.DeserializeObject<data>(data);
                if (!string.IsNullOrEmpty(sporder_id))
                {
                    lgk.Model.tb_PhoneOrder Modelreback = orderBLL.GetModel(" SporderID='" + sporder_id + "'");
                    if (Modelreback != null)
                    {
                        //if()
                        Modelreback.State = Convert.ToInt32(sta);
                        orderBLL.Update(Modelreback);
                        //充值失败处理
                        if (sta == "9")
                        {
                            lgk.Model.tb_user model = userBLL.GetModel(Modelreback.UserID);
                            model.Emoney += Convert.ToDecimal(Modelreback.OrderCash);
                            userBLL.Update(model);
                            string bramk = "充值失败" + Modelreback.UorderID + ",返回原始币:" + Modelreback.OrderCash;
                            JournalAdd(Modelreback.UserID, bramk, 1, Convert.ToDecimal(Modelreback.OrderCash));
                            bllaccount.UpdateBanlcen("PhoneAccount", Convert.ToDecimal(Modelreback.OrderCash), 2);
                        }
                        context.Response.Write("success");
                    }
                    else
                    {
                        s = s + "订单不存在\r\n";
                        context.Response.Write("订单不存在");
                    }
                }
                else
                {
                    s = s + "没有回调\r\n";
                    context.Response.Write("没有回调数据");
                }
            }
            catch (Exception ex)
            {
                s = s + "回调异常,错误信息" + ex.Message + "\r\n";
                context.Response.Write("回调异常,错误信息" + ex.Message);
            }
            System.IO.File.AppendAllText(context.Server.MapPath("~/log/RequestPhoneBacklog/RequestPhoneBacklog" + DateTime.Now.Year + "-" + DateTime.Now.Month + "-" + DateTime.Now.Day + ".txt"), s);
        }
Ejemplo n.º 29
0
 //修改个人信息
 public bool UpdatePersonal(long userid, string type, string value, out string message)
 {
     if (Information(userid, type, value, out message))
     {
         lgk.Model.tb_user userInfo = userBLL.GetModel(userid);
         if (userInfo == null)
         {
             message = "用户ID不存在";
             return(false);
         }
         if (type == "1")
         {
             if (Update(userInfo.UserID, "NiceName", "", value.Trim()) > 0)
             {
                 message = "修改昵称成功";
                 return(true);
             }
             else
             {
                 message = "修改昵称失败";
                 return(false);
             }
         }
         else if (type == "2")
         {
             if (Update(userInfo.UserID, "Gender", "", value.Trim()) > 0)
             {
                 message = "修改性别成功";
                 return(true);
             }
             else
             {
                 message = "修改性别失败";
                 return(false);
             }
         }
         else if (type == "3") //修改头像
         {
             if (Update(userInfo.UserID, "user009", "", value.Trim()) > 0)
             {
                 message = "修改头像成功";
                 return(true);
             }
             else
             {
                 message = "修改头像失败";
                 return(false);
             }
         }
     }
     message = "修改失败";
     return(false);
 }
Ejemplo n.º 30
0
        protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            string filename = "";

            if (e.CommandName == "change")
            {
                long iID = Convert.ToInt64(e.CommandArgument);
                lgk.Model.tb_takeMoney take = takeBLL.GetModel(iID);
                if (take == null)
                {
                    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("recordDeleted") + "');", true);//该记录已删除,无法再进行此操作
                    return;
                }
                if (take.Flag != 0)
                {
                    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("recordApproved") + "');", true);//该记录已审核,无法再进行此操作
                    return;
                }
                lgk.Model.tb_user userModel = userBLL.GetModel(Convert.ToInt32(take.UserID));
                //加入流水账表
                lgk.Model.tb_journal model = new lgk.Model.tb_journal();

                if (take.Take001 == 1)
                {
                    model.BalanceAmount = userModel.Emoney + take.TakeMoney;
                    filename            = "Emoney";
                }
                else
                {
                    model.BalanceAmount = userModel.BonusAccount + take.TakeMoney;
                    filename            = "BonusAccount";
                }

                model.UserID      = take.UserID;
                model.Remark      = "取消提现";
                model.RemarkEn    = "Cancellation of cash";
                model.InAmount    = take.TakeMoney;
                model.OutAmount   = 0;
                model.JournalDate = DateTime.Now;
                model.JournalType = take.Take001;
                model.Journal01   = take.UserID;

                if (journalBLL.Add(model) > 0 && UpdateAccount(filename, take.UserID, take.TakeMoney, 1) > 0 && takeBLL.Delete(iID))
                {
                    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("CancellationSuccess") + "');window.location.href='TakeMoney.aspx';", true);//取消成功
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("FailedToCancel") + "');", true);//取消失败
                }
            }
        }