コード例 #1
0
        private void GetUserInfo()
        {
            _UserModel = new Model.BasUser();
            int tmpId = 0;

            int.TryParse(this._UserId, out tmpId);
            _UserModel = userBll.Detail(tmpId.ToString());
            if (_ModuleCode != null)
            {
                this.lblUserInfo.Text = "设置“" + _UserModel.RealName + "”权限";
            }
        }
コード例 #2
0
 private void tvMenu_AfterSelect(object sender, TreeViewEventArgs e)
 {
     try
     {
         _CurrentTreeNode = this.tvMenu.SelectedNode;
         if (_CurrentTreeNode.Level == 1)
         {
             this.btnSave.Enabled = false;
             Hi.Model.BasUser model = Hi.IBLL.HiInstanceBll.UserBll().Detail(_CurrentTreeNode.Name);
             this.lblInfo.Text = "正在设置“" + _CurrentTreeNode.Text + "”操作权限.";
             SetPurview(model.Purview);
             this.btnSave.Enabled = true;
         }
     }
     catch (Exception ex)
     {
         MsgBox.ShowError(ex.Message);
         Error.ErrorMsg(ex);
     }
 }
コード例 #3
0
        private Hi.Model.BasUser SetDetail()
        {
            Hi.Model.BasUser model = new Hi.Model.BasUser();
            model.UserId = this.IdValue;

            model.UserCode     = this.txtUsercode.Text;
            model.UserPassword = MD5.MD5Encrypt(this.txtUserpassword.Text);
            model.RealName     = this.txtRealname.Text;

            model.Sex           = this.rdoBoy.Checked?"1":"0";
            model.UserTelephone = this.txtUsertelephone.Text;
            model.Email         = this.txtEmail.Text;
            model.Qq            = this.txtQq.Text;

            model.Address  = this.txtAddress.Text;
            model.IsLocked = this.rdo2.Checked ? "2" : (this.rdo1.Checked ? "1" : "0");

            model.Remark  = this.txtRemark.Text;
            model.OrgId   = this.cmbDepartment.SelectedValue.ToString();
            model.OrgName = this.cmbDepartment.Text;
            return(model);
        }
コード例 #4
0
ファイル: FrmPurviewDetailEdit.cs プロジェクト: TjcJose/Hi
 private void GetUserInfo()
 {
     _UserModel  = new Model.BasUser();
        int tmpId = 0;
        int.TryParse(this._UserId, out tmpId);
        _UserModel = userBll.Detail(tmpId.ToString());
        if (_ModuleCode != null)
        this.lblUserInfo.Text = "���á�" + _UserModel.RealName + "��Ȩ��";
 }
コード例 #5
0
ファイル: FrmUserEdit.cs プロジェクト: TjcJose/Hi
        /// <summary>
        /// ��д��ȡ��ϸ�¼�
        /// </summary>
        protected override void Detail()
        {
            if (string.IsNullOrEmpty(IdValue))
            {
                this.txtUserpassword.Text = Utils.GetRandomString(6);
                return;
            }
            else
            {
                this.txtUserpassword.Enabled = false;
                this.txtUserpassword.Text = "******";
                this.txtUsercode.Enabled = false;
            }
            Hi.Model.BasUser model = new Hi.Model.BasUser();
            model = Hi.IBLL.HiInstanceBll.UserBll().Detail(this.IdValue);
            if (model == null)
                return;
            this.txtUsercode.Text = model.UserCode;

            this.txtRealname.Text = model.RealName;
            if (model.Sex.Trim() == "1")
            {
                this.rdoBoy.Checked = true;
                this.rdoBirl.Checked = false;
            }
            else
            {
                this.rdoBoy.Checked = false;
                this.rdoBirl.Checked = true;
            }
            this.txtUsertelephone.Text = model.UserTelephone;
            this.txtEmail.Text = model.Email;
            this.txtQq.Text = model.Qq;

            this.txtAddress.Text = model.Address;

            this.txtRemark.Text = model.Remark;
            //this.cmbDepartment.SelectedIndex = this.cmbDepartment.FindString(model.OrgId.ToString());
            //ModuleData.SetComboBoxSelectedIndex(this.cmbDepartment,1,model.OrgId);
            this.cmbDepartment.Text = model.OrgName;
            if (model.IsLocked == "2")
            {
                this.rdo2.Checked = true;
                //this.rdo1.Checked = false;
                //this.rdo0.Checked = false;
                this.groupBox1.Enabled = false;

            }
            else if (model.IsLocked == "1")
            {
                this.rdo2.Checked = false;
                this.rdo1.Checked = true;
                this.rdo0.Checked = false;
                this.groupBox1.Enabled = true;

            }
            else
            {
                this.rdo2.Checked = false;
                this.rdo1.Checked = false;
                this.rdo0.Checked = true;
                this.groupBox1.Enabled = true;

            }
        }
コード例 #6
0
ファイル: FrmUserEdit.cs プロジェクト: TjcJose/Hi
        private Hi.Model.BasUser SetDetail()
        {
            Hi.Model.BasUser model = new Hi.Model.BasUser();
            model.UserId =  this.IdValue;

            model.UserCode = this.txtUsercode.Text;
            model.UserPassword = MD5.MD5Encrypt(this.txtUserpassword.Text);
            model.RealName = this.txtRealname.Text;

            model.Sex = this.rdoBoy.Checked?"1":"0";
            model.UserTelephone = this.txtUsertelephone.Text;
            model.Email = this.txtEmail.Text;
            model.Qq = this.txtQq.Text;

            model.Address = this.txtAddress.Text;
            model.IsLocked = this.rdo2.Checked ? "2" : (this.rdo1.Checked ? "1" : "0");

            model.Remark = this.txtRemark.Text;
            model.OrgId = this.cmbDepartment.SelectedValue.ToString();
            model.OrgName = this.cmbDepartment.Text;
            return model;
        }
コード例 #7
0
        /// <summary>
        /// 重写获取详细事件
        /// </summary>
        protected override void Detail()
        {
            if (string.IsNullOrEmpty(IdValue))
            {
                this.txtUserpassword.Text = Utils.GetRandomString(6);
                return;
            }
            else
            {
                this.txtUserpassword.Enabled = false;
                this.txtUserpassword.Text    = "******";
                this.txtUsercode.Enabled     = false;
            }
            Hi.Model.BasUser model = new Hi.Model.BasUser();
            model = Hi.IBLL.HiInstanceBll.UserBll().Detail(this.IdValue);
            if (model == null)
            {
                return;
            }
            this.txtUsercode.Text = model.UserCode;

            this.txtRealname.Text = model.RealName;
            if (model.Sex.Trim() == "1")
            {
                this.rdoBoy.Checked  = true;
                this.rdoBirl.Checked = false;
            }
            else
            {
                this.rdoBoy.Checked  = false;
                this.rdoBirl.Checked = true;
            }
            this.txtUsertelephone.Text = model.UserTelephone;
            this.txtEmail.Text         = model.Email;
            this.txtQq.Text            = model.Qq;

            this.txtAddress.Text = model.Address;

            this.txtRemark.Text = model.Remark;
            //this.cmbDepartment.SelectedIndex = this.cmbDepartment.FindString(model.OrgId.ToString());
            //ModuleData.SetComboBoxSelectedIndex(this.cmbDepartment,1,model.OrgId);
            this.cmbDepartment.Text = model.OrgName;
            if (model.IsLocked == "2")
            {
                this.rdo2.Checked = true;
                //this.rdo1.Checked = false;
                //this.rdo0.Checked = false;
                this.groupBox1.Enabled = false;
            }
            else if (model.IsLocked == "1")
            {
                this.rdo2.Checked      = false;
                this.rdo1.Checked      = true;
                this.rdo0.Checked      = false;
                this.groupBox1.Enabled = true;
            }
            else
            {
                this.rdo2.Checked      = false;
                this.rdo1.Checked      = false;
                this.rdo0.Checked      = true;
                this.groupBox1.Enabled = true;
            }
        }