Ejemplo n.º 1
0
        private void 移出ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.bindingSource风控.Current == null)
            {
                MessageBox.Show("必须先选定风控员才能分配交易员");
                return;
            }


            AASClient.AASServiceReference.DbDataSet.平台用户Row DataRow1 = (this.bindingSource风控.Current as DataRowView).Row as AASClient.AASServiceReference.DbDataSet.平台用户Row;
            string 风控员 = DataRow1.用户名;


            List <string> Traders = new List <string>();

            foreach (DataGridViewRow DataGridViewRow1 in this.dataGridView已分配交易员.Rows)
            {
                if (DataGridViewRow1.Cells["选择交易员"].Value != null)
                {
                    bool bool1 = (bool)DataGridViewRow1.Cells["选择交易员"].Value;
                    if (bool1)
                    {
                        Traders.Add(DataGridViewRow1.Cells[1].Value as string);
                    }
                }
            }



            Program.AASServiceClient.DeleteTraderFromRC(风控员, Traders.ToArray());

            this.bindingSource已分配交易员.DataSource = Program.AASServiceClient.QueryJyBelongFK(风控员);

            this.bindingSource待分配交易员.DataSource = Program.AASServiceClient.QueryJyNotBelongFK(风控员);
        }
Ejemplo n.º 2
0
        public static bool AutoReLogin()
        {
            try
            {
                if (Program.AASServiceClient != null)
                {
                    Program.AASServiceClient.Close();
                }
                Program.EndpointAddress = new EndpointAddress(new Uri(string.Format("net.tcp://{0}:{1}/", serverIPCache, Program.Port)), EndpointIdentity.CreateDnsIdentity("localhost"));

                Program.AASServiceClient = new AASServiceReference.AASServiceClient(Program.callbackInstance, Program.NetTcpBinding, Program.EndpointAddress);
                Program.AASServiceClient.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None;
                Program.AASServiceClient.ClientCredentials.UserName.UserName = userNameCache;
                Program.AASServiceClient.ClientCredentials.UserName.Password = passwordCache + "\t" + CommonUtils.GetMacAddress();
                Program.Current平台用户 = Program.AASServiceClient.QuerySingleUser(Program.Version)[0];
                return(true);
            }
            catch (System.ServiceModel.Security.MessageSecurityException)
            {
                //if (ex.InnerException == null)
                //{
                //    Program.logger.LogRunning("自动登录失败:{0}", ex.Message);
                //}
                //else
                //{
                //    Program.logger.LogRunning("自动登录失败:{0}", ex.InnerException.Message);
                //}
            }
            catch (Exception)
            {
                //Program.logger.LogRunning("自动登录失败:{0}", ex.Message);
            }
            return(false);
        }
Ejemplo n.º 3
0
        private void dataGridView普通用户_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            AASClient.AASServiceReference.DbDataSet.平台用户Row DataRow1 = (this.bindingSource普通用户.Current as DataRowView).Row as AASClient.AASServiceReference.DbDataSet.平台用户Row;



            this.bindingSourceMAC.DataSource = Program.AASServiceClient.QueryMACBelongUser(DataRow1.用户名);
        }
Ejemplo n.º 4
0
        private void  除用户ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AASClient.AASServiceReference.DbDataSet.平台用户Row DataRow1 = (this.bindingSource用户.Current as DataRowView).Row as AASClient.AASServiceReference.DbDataSet.平台用户Row;

            Program.AASServiceClient.DeleteUser(DataRow1.用户名);

            this.bindingSource用户.DataSource = Program.AASServiceClient.QueryUser();
        }
Ejemplo n.º 5
0
        private void toolStripMenuItem重置密码_Click(object sender, EventArgs e)
        {
            AASClient.AASServiceReference.DbDataSet.平台用户Row DataRow1 = (this.bindingSource用户.Current as DataRowView).Row as AASClient.AASServiceReference.DbDataSet.平台用户Row;

            ResetPasswordForm ResetPasswordForm1 = new ResetPasswordForm(DataRow1);

            ResetPasswordForm1.ShowDialog();
        }
Ejemplo n.º 6
0
        private void 添加ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AASClient.AASServiceReference.DbDataSet.平台用户Row DataRow1 = (this.bindingSource普通用户.Current as DataRowView).Row as AASClient.AASServiceReference.DbDataSet.平台用户Row;


            AddMACForm AddMACForm1 = new AddMACForm(DataRow1.用户名);

            AddMACForm1.ShowDialog();

            this.bindingSourceMAC.DataSource = Program.AASServiceClient.QueryMACBelongUser(DataRow1.用户名);
        }
Ejemplo n.º 7
0
        private void dataGridView风控_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            AASClient.AASServiceReference.DbDataSet.平台用户Row DataRow1 = (this.bindingSource风控.Current as DataRowView).Row as AASClient.AASServiceReference.DbDataSet.平台用户Row;
            string 风控员 = DataRow1.用户名;


            this.bindingSource已分配交易员.DataSource = Program.AASServiceClient.QueryJyBelongFK(风控员);



            this.bindingSource待分配交易员.DataSource = Program.AASServiceClient.QueryJyNotBelongFK(风控员);
        }
Ejemplo n.º 8
0
        private void toolStripMenuItem修改用户_Click(object sender, EventArgs e)
        {
            AASClient.AASServiceReference.DbDataSet.平台用户Row DataRow1 = (this.bindingSource用户.Current as DataRowView).Row as AASClient.AASServiceReference.DbDataSet.平台用户Row;



            ModifyUserForm ModifyUserForm1 = new ModifyUserForm(DataRow1);
            DialogResult   DialogResult1   = ModifyUserForm1.ShowDialog();

            if (DialogResult1 != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }

            this.bindingSource用户.DataSource = Program.AASServiceClient.QueryUser();
        }
Ejemplo n.º 9
0
        public static bool AutoReLogin()
        {
            if (isConnectting)
            {
                return(false);
            }
            else
            {
                lock (sync)
                {
                    if (isConnectting)
                    {
                        return(false);
                    }
                    else
                    {
                        isConnectting = true;
                        try
                        {
                            if (Program.AASServiceClient != null)
                            {
                                Program.AASServiceClient.Close();
                            }
                            Program.EndpointAddress = new EndpointAddress(new Uri(string.Format("net.tcp://{0}:{1}/", serverIPCache, Program.Port)), EndpointIdentity.CreateDnsIdentity("localhost"));

                            Program.AASServiceClient = new AASServiceReference.AASServiceClient(Program.callbackInstance, Program.NetTcpBinding, Program.EndpointAddress);
                            Program.AASServiceClient.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None;
                            Program.AASServiceClient.ClientCredentials.UserName.UserName = userNameCache;
                            Program.AASServiceClient.ClientCredentials.UserName.Password = passwordCache + "\t" + CommonUtils.GetMacAddress();
                            Program.Current平台用户 = Program.AASServiceClient.QuerySingleUser(Program.Version)[0];
                            Program.AASServiceClient.FectchAllTable(Program.Current平台用户.用户名);
                            return(true);
                        }
                        catch (Exception) { }
                        return(false);
                    }
                }
            }
        }
Ejemplo n.º 10
0
        public ModifyUserForm(AASClient.AASServiceReference.DbDataSet.平台用户Row AASUser1)
        {
            InitializeComponent();

            this.平台用户 = AASUser1;
        }
Ejemplo n.º 11
0
        public ResetPasswordForm(AASClient.AASServiceReference.DbDataSet.平台用户Row UserDataRow)
        {
            InitializeComponent();

            this.userDataRow = UserDataRow;
        }