コード例 #1
0
        public JsonResult Mt4AccountInfo()
        {
            DGMUserInfo user = Session["DGMUserInfo"] as DGMUserInfo;
            DGMUserInfo info = new MT4AccountBll().GetAccountInfo(user.DGMUser_Login);

            return(Json(info));
        }
コード例 #2
0
        public string ShowAccountInfo(string login)
        {
            string        aa       = "";
            DGMUserInfo   userInfo = Session["DGMUserInfo"] as DGMUserInfo;
            MT4AccountBll mt4Bll   = new MT4AccountBll();

            userInfo = mt4Bll.GetAccountInfo(login);
            userInfo.DGMUser_Account = new AccountBll().GetAccountByAccountNumber(login);
            if (userInfo != null && userInfo.DGMUser_Account != null)
            {
                string AccountName  = userInfo.DGMUser_Account.CH_Surname + userInfo.DGMUser_Account.CH_Name; //姓名
                string AccountLogin = userInfo.DGMUser_Login;                                                 //账户
                string AccountEmail = userInfo.DGMUser_Account.Email;                                         //邮箱
                string pwd          = userInfo.DGMUser_Account.AccountPassword;
                aa += AccountName + "#" + AccountLogin + "#" + AccountEmail + "#" + pwd;
                ApplyForLiveAccountBll applyBll       = new ApplyForLiveAccountBll();
                ProfessionInfo         professioninfo = applyBll.GetProfessionInfoByAccountInformationId(userInfo.DGMUser_Account.InformationId);
                PersonalInformation    personal       = applyBll.GetPersonalInformationByProfessionInfoPersonalInformationId(professioninfo.PersonalInformationId);
                if (personal != null)
                {
                    string AccountPhone   = personal.PhoneNumber; //电话
                    string AccountAddress = personal.LiveAddress; //地址
                    //string AccountRevenue = professioninfo.BEFOREYearRevenue;//税前年收入
                    //string AccountInvested = professioninfo.DepositAndInvestment;//储蓄和投资总额
                    aa += "#" + AccountPhone + "#" + AccountAddress;
                }
            }
            return(aa);
        }
コード例 #3
0
        /// <summary>
        /// 获取MT4平台信息
        /// </summary>
        /// <param name="AccountID">用户账号</param>
        /// <returns></returns>
        public DGMUserInfo GetAccountInfo(string AccountID)
        {
            DGMUserInfo userInfo = null;

            string sql = "select * from mt4_users  where login = "******"mt4");
                //MySqlConnection conn = new MySqlConnection(MYSqlHelper.ConnectionStringManager);
                //conn.Open();
                //MySqlDataAdapter adp = new MySqlDataAdapter();
                //adp.SelectCommand = new MySqlCommand(sql, conn);
                //DataSet ds = new DataSet();
                //adp.Fill(ds);

                //conn.Close();
                //if (ds.Tables.Count > 0)
                //{
                foreach (DataRow mDr in myDataset.Tables[0].Rows)
                {
                    userInfo = new DGMUserInfo();
                    //遍历列
                    userInfo.DGMUser_Login = mDr["LOGIN"].ToString();                                                                                                        //账号
                                                                                                                                                                             //account.AccountName = Convert.ToString(DBReader["GROUP"]);//所属组
                    userInfo.DGMUser_PREVMONTHBALANCE = mDr["PREVMONTHBALANCE"].ToString();                                                                                  //上月余额
                    userInfo.DGMUser_Balance          = mDr["BALANCE"].ToString();                                                                                           //余额
                    userInfo.DGMUser_Equity           = mDr["EQUITY"].ToString();
                    userInfo.DGMUser_PREVBALANCE      = mDr["PREVBALANCE"].ToString();                                                                                       //上次余额
                    userInfo.DGMUser_Name             = mDr["NAME"].ToString();                                                                                              //用户昵
                                                                                                                                                                             //userInfo.AccountName = Convert.ToString(DBReader["COUNTRY"]);//国家
                                                                                                                                                                             //userInfo.AccountName = Convert.ToString(DBReader["CITY"]);//城市
                                                                                                                                                                             //userInfo.AccountName = Convert.ToString(DBReader["STATE"]);//州
                                                                                                                                                                             //userInfo.AccountName = Convert.ToString(DBReader["ZIPCODE"]);//邮编
                    userInfo.DGMUser_Address   = mDr["COUNTRY"].ToString() + "_" + mDr["CITY"].ToString() + "_" + mDr["STATE"].ToString() + "_" + mDr["ADDRESS"].ToString(); //地址
                    userInfo.DGMUser_Phone     = mDr["PHONE"].ToString();                                                                                                    //电话
                    userInfo.DGMUser_Property1 = mDr["EMAIL"].ToString();                                                                                                    //邮箱
                    userInfo.DGMUser_REGDATE   = mDr["REGDATE"].ToString();                                                                                                  //注册日期
                    userInfo.DGMUser_LEVERAGE  = mDr["LEVERAGE"].ToString();                                                                                                 //杠杆
                }
                //}
            }
            catch (Exception ex)
            {
                LogHelper.WriteSystemErrorLog("数据库连接错误!", "数据库错误", ex.Message.ToString(), @"E:/WebErrorLog/SystemErrorLog");
            }
            finally
            {
            }
            return(userInfo);
        }