Beispiel #1
0
        private void frmUpdateSysUserInfo_Load(object sender, EventArgs e)
        {
            this.txtLoginId.Text = this._loginid;//加载登录id
            DataTable dt       = SysUserMgr.GetOneUser(this._loginid);
            DataTable dtDepart = DepartMgr.GetAllDepartment();

            this.cbxDepart.DataSource    = dtDepart;
            this.cbxDepart.DisplayMember = dtDepart.Columns[0].ToString();
            this.cbxDepart.ValueMember   = dtDepart.Columns[1].ToString();

            if (dt != null)
            {
                this.txtName.Text   = dt.Rows[0][2].ToString();
                this.cbxDepart.Text = DepartMgr.GetNameFromId(dt.Rows[0][3].ToString());
                this.txtTel.Text    = dt.Rows[0][4].ToString();
                this.txtEmail.Text  = dt.Rows[0][5].ToString();
            }



            if (this._isother)
            {
                this.txtOldPass.PasswordChar = new char();
                this.txtOldPass.Text         = SysUserMgr.GetPass(this._loginid);
                //自己不可更改自身所在部门,只有由其他人进行更改才行
                this.cbxDepart.Enabled = true;
            }
        }
Beispiel #2
0
        private void frmEqAdd_Load(object sender, EventArgs e)
        {
            initcbx(this.cbxFunds, "Funds");
            initcbx(this.cbxPriceType, "PriceType");
            initcbx(this.cbxUsage, "Usage");
            initcbx(this.cbxDirection, "Direction");
            initcbx(this.cbxBuyWay, "BuyWay");
            initcbx(this.cbxGetWay, "GetWay");
            initcbx(this.cbxCarUse, "CarUse");
            initcbx(this.cbxCarBP, "CarBP");
            initcbx(this.cbxFormation, "Formation");
            initcbx(this.cbxPR, "Pr");
            initcbx(this.cbxCertNature, "CertNature");
            initcbx(this.cbxStructure, "Structure");
            initcbx(this.cbxUnit, "Unit");
            initcbx(this.cbxKeepPlace, "KeepPlace");
            initcbx(this.cbxRelicLv, "RelicLv");
            initcbx(this.cbxCampus, "Campus");

            this.txtDepartment.Text = SysUserMgr.GetDepartmentIDByUser(this._user);
            this.txtDepartment.Text = DepartMgr.GetNameFromId(this.txtDepartment.Text);
            this.dtpAddDate.Text    = DateTime.Now.ToShortDateString();
            this.txtAgent.Text      = this._user;
            //cbxEqKeeper的初始化与其他不同,其ValueMember和DisplayMember是不一样的
            initcbxEmployee(this.cbxEqKeeper);
            initcbxEmployee(this.cbxPurchaser);
        }
Beispiel #3
0
        /// <summary>
        /// 加载资产的资料;
        /// </summary>
        private void LoadEqInfo()
        {
            DataTable dt = EqMgr.GetOneEqInfo(this._eqno);

            if (dt != null)
            {
                this.textSerialNO.Text   = DateTime.Now.ToString("yyyyMMddHHmmss");
                this.textEqNO.Text       = dt.Rows[0]["EqNo"].ToString();
                this.textName.Text       = dt.Rows[0]["EqName"].ToString();
                this.textKeepPlace.Text  = dt.Rows[0]["KeepPlace"].ToString();
                this.textDepartment.Text = DepartMgr.GetNameFromId(dt.Rows[0]["Department"].ToString());
                this.textKeeper.Text     = dt.Rows[0]["EqKeeper"].ToString();
            }
        }