Ejemplo n.º 1
0
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            frmUserSearch frm = new frmUserSearch();

            frm.ShowDialog();
            List <TB_User> user = frm.mUser;

            if (user != null)
            {
                warp.Children.Clear();
                for (int i = 0; i < user.Count; i++)
                {
                    uc_user uc = new uc_user(user[i]);
                    if (user[i].Id != (txtleder.Tag as TB_User).Id)
                    {
                        uc.txtName.Text = user[i].USER_NAME;
                        warp.Children.Add(uc);
                        uc.DelSelectUser += uc_DelSelectUser;
                    }
                    else
                    {
                        MessageHelper.ShowMessage("组员不能与负责人一致");
                        continue;
                    }
                }
            }
        }
Ejemplo n.º 2
0
 private void txtUser_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     try
     {
         if (txtUser.Tag == null)
         {
             frmUserSearch frm = new frmUserSearch();
             frm.ShowDialog();
             if (frm.mUser != null && frm.mUser[0].Id > 0)
             {
                 this.txtUser.Tag  = frm.mUser[0];
                 this.txtUser.Text = frm.mUser[0].USER_CODE;
             }
             else
             {
                 this.txtUser.Tag  = null;
                 this.txtUser.Text = "";
             }
         }
     }
     catch (Exception ex)
     {
         MessageHelper.ShowMessage(ex.Message);
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 添加项目负责人
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnLeader_Click(object sender, RoutedEventArgs e)
        {
            frmUserSearch frm = new frmUserSearch();

            frm.ShowDialog();
            if (frm.mUser != null)
            {
                TB_User user = frm.mUser[0];
                this.txtleder.Text = user.USER_NAME;
                this.txtleder.Tag  = user;
            }
        }