void user_id_Click(object sender, EventArgs e)
        {
            UCChooseUser ucchooseuser = new UCChooseUser();

            ucchooseuser.SingleMode = false;
            ucchooseuser.ShowDialog();
            //Userinfo userinfo = ucchooseuser.SelectedUsers.;
            var xx = "";

            if (ucchooseuser.SelectedUsers != null && ucchooseuser.SelectedUsers.Count > 0)
            {
                if (ucchooseuser.SelectedUsers.Count > 1)
                {
                    int i = 0;
                    foreach (Userinfo userinfo in ucchooseuser.SelectedUsers)
                    {
                        if (i == 0)
                        {
                            xx += userinfo.user_id;
                        }
                        else
                        {
                            xx += "," + userinfo.user_id;
                        }
                        i++;
                    }
                }
                else
                {
                    xx += ucchooseuser.SelectedUsers[0].user_id;
                }
            }
            ucchooseuser.Dispose();
            user_id.Text = xx;
        }
예제 #2
0
        void linkLogin_Click(object sender, EventArgs e)
        {
            UCChooseUser login = new UCChooseUser();

            login.SingleMode = true;
            if (login.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {   //登录成功
                TmoComm.login_userInfo = login.SelectedUsers[0];
                CheckChooseUser();
            }
            login.Dispose();
        }
예제 #3
0
        void identity_MouseClickKeyDown(object sender, EventArgs e)
        {
            UCChooseUser cu = new UCChooseUser();

            cu.SingleMode = true;
            if (cu.ShowDialog() == DialogResult.OK)
            {
                identity.EditValue = cu.SelectedUsers[0];
                address.Text       = cu.SelectedUsers[0].address;
                phone.Text         = cu.SelectedUsers[0].phone;
            }
            cu.Dispose();
        }
예제 #4
0
        void user_id_Click(object sender, EventArgs e)
        {
            UCChooseUser ucchooseuser = new UCChooseUser();

            ucchooseuser.SingleMode = true;
            ucchooseuser.ShowDialog();
            Userinfo userinfo = ucchooseuser.SelectedUsers.FirstOrDefault();

            if (userinfo != null)
            {
                user_id.Text = userinfo.user_id;
            }
            ucchooseuser.Dispose();
        }
예제 #5
0
        private void user_id_Click(object sender, EventArgs e)
        {
            if (DbOperaType == DBOperateType.Update)
            {
                return;
            }

            UCChooseUser cu = new UCChooseUser();

            if (cu.ShowDialog(this) == DialogResult.OK)
            {
                _users = cu.SelectedUsers;
                if (_users == null || !_users.Any())
                {
                    return;
                }

                ucInterveneSystem1.Userinfo = _users.FirstOrDefault();
                user_id.Text = StringPlus.GetArrayStr(_users.Select(x => x.name).ToArray(), ",");
                user_id.Tag  = StringPlus.GetArrayStr(_users.Select(x => x.user_id).ToArray(), ",");

                if (this.inte_way.EditValue != null)
                {
                    int way = (int)inte_way.EditValue;
                    if (way == 1) //邮件
                    {
                        inte_addr.Text = StringPlus.GetArrayStr(_users.Select(x => x.email).ToArray(), ",");
                    }
                    else if (way == 2) //短信
                    {
                        inte_addr.Text = StringPlus.GetArrayStr(_users.Select(x => x.phone).ToArray(), ",");
                    }
                    else if (way == 3) //电话
                    {
                        inte_addr.Text = StringPlus.GetArrayStr(_users.Select(x => string.IsNullOrWhiteSpace(x.phone) ? x.tel : x.phone).ToArray(), ",");
                    }
                    else if (way == 4) //面访
                    {
                        inte_addr.Text = StringPlus.GetArrayStr(_users.Select(x => x.address).ToArray(), ",");
                    }
                }
            }
            cu.Dispose();
        }