Ejemplo n.º 1
0
        /// <summary>
        /// 对管理员用户名和密码进行验证,并个性化设置操作
        /// </summary>
        /// <param name="pec">个性化资金实体类</param>
        /// <param name="LoginName">管理员用户名</param>
        /// <param name="PassWord">密码</param>
        /// <param name="message">返回的信息</param>
        /// <returns>格式化资金是否成功</returns>
        public bool PersonalizationCapital(PersonalizationCapital pec, string LoginName, string PassWord, out string message)
        {
            //验证管理员用户名和密码是否通过验证
            bool lastly = true;
            Out_TransactionManage outTran = new Out_TransactionManage();
            bool login = outTran.AdminLoginConfirmation(LoginName, PassWord, out message);

            if (login == true)
            {
                #region 对获取的数据通过柜台进行分组,并根据分组后柜台调用柜台服务接口
                Dictionary <string, CapitalPersonalization> list = outTran.CounterGrouping(pec);
                //循环list中键值,并分别通过键值获取柜台信息和通过键值获取个性化资金信息再调用柜台的个性化资金接口
                foreach (string key in list.Keys)
                {
                    string     CID       = key;
                    int        CounterID = int.Parse(CID);
                    CT_Counter T         = StaticDalClass.CounterDAL.GetModel((int)CounterID);;
                    //调用柜台的个性化资金接口
                    bool state = AccountManageServiceProxy.GetInstance().PersonalizationCapital(T, list[key], out message);
                    if (state == false)
                    {
                        lastly = false;
                    }
                }
                return(lastly);

                #endregion 对获取的数据通过柜台进行分组,并根据分组后柜台调用柜台服务接口
            }
            return(false);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 追加资金(此方法之前是没有实现的,这里实现只是用于验证管理员是否正确,为了测试工具使用,如果日后要用再
        /// 作修改,因为这里也要验证管理员)
        /// </summary>
        /// <param name="UserID">交易员ID</param>
        /// <param name="initFund"></param>
        /// <param name="MLoginName">管理员登陆名称</param>
        /// <param name="ManagerPWd">管理员密码</param>
        /// <param name="message"></param>
        /// <returns></returns>
        public bool AddFund(int UserID, InitFund initFund, string MLoginName, string ManagerPWd, out string message)
        {
            message = string.Empty;
            Out_TransactionManage outTran = new Out_TransactionManage();
            bool login = outTran.AdminLoginConfirmation(MLoginName, ManagerPWd, out message);

            return(login);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 每次当服务启动时更新数据
        /// </summary>
        public void StartUpdateService()
        {
            if (IsUpdateTime())
            {
                CommonTable.CommodityCodeUpdate CommodityCodeUpdate = new CommodityCodeUpdate();

                //把StockInfo表和HKStockInfo表中新增的代码添加到交易商品_撮合机_分配表中
                LogHelper.WriteDebug("开始调用新增代码添加到撮合机的方法:XHCodeAutoRCTradeCommodityAssign()" + DateTime.Now);
                CommodityCodeUpdate.XHCodeAutoRCTradeCommodityAssign();
                LogHelper.WriteDebug("结束调用新增代码添加到撮合机的方法:XHCodeAutoRCTradeCommodityAssign()" + DateTime.Now);

                //从StockInfo表中更新新增和修改的现货代码
                LogHelper.WriteDebug("开始调用更新新增和修改的现货代码的方法:CodeUpdata()" + DateTime.Now);
                CommodityCodeUpdate.CodeUpdata();
                LogHelper.WriteDebug("结束调用更新新增和修改的现货代码的方法:CodeUpdata()" + DateTime.Now);

                //从HKStockInfo表中更新新增和修改的港股交易商品代码更新
                LogHelper.WriteDebug("开始调用更新新增和修改港股代码的方法:HKCodeUpdata()" + DateTime.Now);
                CommodityCodeUpdate.HKCodeUpdata();
                LogHelper.WriteDebug("结束调用更新新增和修改港股代码的方法:HKCodeUpdata()" + DateTime.Now);

                //期货代码更新
                LogHelper.WriteDebug("开始调用期货代码更新的方法:CheckCodeIsExpired()" + DateTime.Now);
                CommodityCodeUpdate.CheckCodeIsExpired();
                LogHelper.WriteDebug("结束调用期货代码更新的方法:CheckCodeIsExpired()" + DateTime.Now);

                //自动解冻
                LogHelper.WriteDebug("开始调用自动解冻的方法:AutoUnFreeze()" + DateTime.Now);
                ManagementCenter.BLL.UserManage.TransactionManage TransactionManage = new TransactionManage();
                TransactionManage.AutoUnFreeze();
                LogHelper.WriteDebug("结束调用自动解冻的方法:AutoUnFreeze()" + DateTime.Now);

                //删除标志状态为FrontTarnDelState=5的交易员
                LogHelper.WriteDebug("开始调用删除标志状态为FrontTarnDelState=5的交易员的方法:DelTran()" + DateTime.Now);

                ManagementCenter.BLL.UserManage.Out_TransactionManage outTransactionManage = new Out_TransactionManage();
                outTransactionManage.DelTran();
                LogHelper.WriteDebug("结束调用删除标志状态为FrontTarnDelState=5的交易员的方法:DelTran()" + DateTime.Now);

                //更新非交易日期
                int Currentyear = System.DateTime.Now.Year;
                int nyear       = System.DateTime.Now.AddDays(1).Year;
                if (Currentyear != nyear)
                {
                    LogHelper.WriteDebug("开始调用更新非交易日期的方法:InitNotTrandingDay()" + DateTime.Now);
                    ManagementCenter.BLL.CommonTable.QHCodeInit.InitNotTrandingDay(nyear);
                    LogHelper.WriteDebug("结束更新非交易日期的方法:InitNotTrandingDay()" + DateTime.Now);
                }
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 添加交易员
 /// </summary>
 /// <param name="Number">数目</param>
 /// <param name="initFund"></param>
 /// <param name="MLoginName">管理员登陆名称</param>
 /// <param name="ManagerPWd">管理员密码</param>
 /// <param name="message">返回的信息</param>
 /// <returns></returns>
 public List <Entity.UM_UserInfo> BatchAddTransaction(int Number, InitFund initFund, string MLoginName, string ManagerPWd, out string message)
 {
     UserManage.Out_TransactionManage tm = new Out_TransactionManage();
     return(tm.BatchAddTransaction(Number, initFund, MLoginName, ManagerPWd, out message));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 追加资金
 /// </summary>
 /// <param name="model">追加资金实体</param>
 /// <param name="mess">返回信息</param>
 /// <returns>返回是否成功</returns>
 public bool AddFundFP(ManagementCenter.Model.UM_FundAddInfo model, out string mess)
 {
     UserManage.Out_TransactionManage tm = new Out_TransactionManage();
     return(tm.AddFundFP(model, out mess));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 调用自由转帐(同币种)方法
 /// </summary>
 /// <param name="traderID">交易员ID(用户ID)</param>
 /// <param name="FromCapitalAccountType">转出资金账户类型</param>
 /// <param name="ToCapitalAccountType">转入资金账户类型</param>
 /// <param name="TransferAmount">转账数量</param>
 /// <param name="currencyType">币种类型</param>
 /// <param name="outMessage">输出消息</param>
 /// <returns>返回转账是否成功</returns>
 public bool ConvertFreeTransferEntityFP(int traderID, int FromCapitalAccountType, int ToCapitalAccountType, decimal TransferAmount, int currencyType, out string outMessage)
 {
     UserManage.Out_TransactionManage tm = new Out_TransactionManage();
     return(tm.ConvertFreeTransferEntityFP(traderID, FromCapitalAccountType, ToCapitalAccountType, TransferAmount,
                                           currencyType, out outMessage));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// 管理员查询根据交易员查询交易员各资金账户相关信息
 /// </summary>
 /// <param name="adminId">管理员ID(可传空值:因柜台没验证)</param>
 /// <param name="adminPassword">管理员密码(可传空值:因柜台没验证)</param>
 /// <param name="traderID">交易员ID</param>
 /// <param name="strErrorMessage">输出信息</param>
 /// <returns>返回交易员的资金明细</returns>
 public List <TradersAccountCapitalInfo> AdminFindTraderCapitalAccountInfoByIDFP(string adminId, string adminPassword, string traderID, out string strErrorMessage)
 {
     UserManage.Out_TransactionManage tm = new Out_TransactionManage();
     return(tm.AdminFindTraderCapitalAccountInfoByIDFP(adminId, adminPassword, traderID, out strErrorMessage));
 }
Ejemplo n.º 8
0
        //===============================================提供给金融工程平台的方法=====================================
        #region 提供给金融工程平台的方法

        #region 金融工程平台调用的添加交易员

        /// <summary>
        /// 金融工程平台调用的添加交易员
        /// </summary>
        /// <param name="MLoginName">登陆名称(管理员角色)</param>
        /// <param name="ManagerPWd">登陆密码(管理员密码)</param>
        /// <param name="UserInfo">用户基本信息</param>
        /// <param name="initfund">初始化资金</param>
        /// <param name="l_AccountEntity">账户列表实体</param>
        /// <param name="message">输出信息</param>
        /// <returns></returns>
        public UM_UserInfo AddTransactionFP(string MLoginName, string ManagerPWd, UM_UserInfo UserInfo, InitFund initfund, out List <AccountEntity> l_AccountEntity, out string message)
        {
            UserManage.Out_TransactionManage tm = new Out_TransactionManage();
            return(tm.AddTransactionFP(MLoginName, ManagerPWd, UserInfo, initfund, out l_AccountEntity, out message));
        }
Ejemplo n.º 9
0
 /// <summary>
 /// 交易员验证
 /// </summary>
 /// <param name="UserID">交易员ID</param>
 /// <param name="PassWord">交易员密码</param>
 /// <param name="message">返回的信息</param>
 /// <returns></returns>
 public Entity.CT_Counter TransactionConfirm(int UserID, string PassWord, out string message)
 {
     UserManage.Out_TransactionManage tm = new Out_TransactionManage();
     return(tm.LoginConfirmation(UserID, PassWord, out message));
 }
Ejemplo n.º 10
0
 /// <summary>
 ///  删除交易员
 /// </summary>
 /// <param name="userInfo">交易员实体</param>
 /// <param name="MLoginName">管理员登陆名称</param>
 /// <param name="ManagerPWd">管理员密码</param>
 /// <param name="message">返回的信息</param>
 /// <returns></returns>
 public bool BatchDelectTransaction(List <Entity.UM_UserInfo> userInfo, string MLoginName, string ManagerPWd, out string message)
 {
     UserManage.Out_TransactionManage tm = new Out_TransactionManage();
     return(tm.BatchDelectTransaction(userInfo, MLoginName, ManagerPWd, out message));
 }