Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        public bool EditAccountAndSendMail(Account acc)
        {
            Account tmpacc = new ApplyForLiveAccountBll().GetAccountByAccountID(acc.AccountId.ToString());

            tmpacc.AccountName     = acc.AccountName;
            tmpacc.AccountPassword = acc.AccountPassword;
            tmpacc.Explanation     = acc.Explanation;
            tmpacc.Agents          = acc.Agents;
            return(new MT4AccountBll().EditAccount(tmpacc, true));
        }
Exemplo n.º 3
0
        public JsonResult GetAccount()
        {
            string         search   = Request.Params["search"];
            string         type     = Request.Params["type"];
            int            offset   = int.Parse(Request.Params["offset"]);
            int            pagesize = int.Parse(Request.Params["pageSize"]);
            int            total    = 0;
            List <Account> acc      = new ApplyForLiveAccountBll().GetAccount(offset, pagesize, search, type, out total);
            var            gridData = new { rows = acc, total = total };

            return(Json(gridData));
        }
Exemplo n.º 4
0
        public string AcceptApplication()
        {
            //ProfessionInfo profe = Session["professionInfo"] as ProfessionInfo;
            string _professionInfo = Request.Cookies["ProfessionInfo"].Value;

            byte[]          professionInfo    = Convert.FromBase64String(_professionInfo);
            MemoryStream    ms_professionInfo = new MemoryStream(professionInfo, 0, professionInfo.Length);
            BinaryFormatter bf_professionInfo = new BinaryFormatter();
            ProfessionInfo  profe             = bf_professionInfo.Deserialize(ms_professionInfo) as ProfessionInfo;


            //PersonalInformation personalInfo = Session["PersonalInformation"] as PersonalInformation;
            string _personalInformation = Request.Cookies["PersonalInformation"].Value;

            byte[]              personalInformation    = Convert.FromBase64String(_personalInformation);
            MemoryStream        ms_personalInformation = new MemoryStream(personalInformation, 0, personalInformation.Length);
            BinaryFormatter     bf_personalInformation = new BinaryFormatter();
            PersonalInformation personalInfo           = bf_personalInformation.Deserialize(ms_personalInformation) as PersonalInformation;

            personalInfo.Explanation = "";

            //Account account = Session["Account"] as Account;
            string _account = Request.Cookies["Account"].Value;

            byte[]          b_account  = Convert.FromBase64String(_account);
            MemoryStream    ms_account = new MemoryStream(b_account, 0, b_account.Length);
            BinaryFormatter bf_account = new BinaryFormatter();
            Account         account    = bf_account.Deserialize(ms_account) as Account;

            account.Agents = account.Agents.Replace("$", "");

            if (profe != null && personalInfo != null && account != null)
            {
                int result = new ApplyForLiveAccountBll().ApplyForLiveAccount(account, profe, personalInfo);
                if (result != 0)
                {
                    DeleteCookie("professionInfo");
                    DeleteCookie("PersonalInformation");
                    DeleteCookie("account");
                    return("success");
                }
                else
                {
                    return("");
                }
            }
            else
            {
                return("");
            }
        }