示例#1
0
        /// <summary>
        /// 委托
        /// </summary>
        /// <param name="StepID">步骤ID</param>
        /// <param name="Account">委托帐号</param>
        /// <param name="Comment">意见</param>
        private void Transfer(BPMConnection cn, int StepID, string Transfer_TransferTo, string Comment)
        {
            string memberFullName = GetMember(cn, Transfer_TransferTo).FullName;

            if (string.IsNullOrEmpty(memberFullName))
            {
                throw new Exception("委托失败,帐号【" + Transfer_TransferTo + "】非法");
            }
            BPM.Client.User user = BPMProcStep.Transfer(cn, StepID, memberFullName);
            if (user == null)
            {
                throw new Exception("委托失败");
            }
        }
示例#2
0
    protected override void OnPreRender(EventArgs e)
    {
        using (BPMConnection cn = new BPMConnection())
        {
            cn.WebOpen();

            BPM.Client.User         user    = BPM.Client.User.FromAccount(cn, YZAuthHelper.LoginUserAccount);
            UserInfoSelfMantSetting setting = new UserInfoSelfMantSetting();
            setting.Load(cn);

            this._labUser.Text = HttpUtility.HtmlEncode(YZStringHelper.GetUserFriendlyName(user.Account, user.DisplayName));

            this._txtFullName.Text = user.DisplayName;
            this._txtDesc.Text     = user.Description;

            if (user.Sex != Sex.Unknown)
            {
                this._rdoSex.SelectedValue = user.Sex.ToString();
            }

            this._txtBirthday.Text   = YZStringHelper.DateToString(user.Birthday);
            this._txtHRID.Text       = user.HRID;
            this._txtDateHired.Text  = YZStringHelper.DateToString(user.DateHired);
            this._txtOffice.Text     = user.Office;
            this._txtCostCenter.Text = user.CostCenter;
            this._txtPhone.Text      = user.OfficePhone;
            this._txtHomePhone.Text  = user.HomePhone;
            this._txtMobile.Text     = user.Mobile;
            this._txtEMail.Text      = user.EMail;
            this._txtWebSite.Text    = user.WWWHomePage;

            List <WebControl> diasbleControls = new List <WebControl>();

            if (!setting.CanWrite(UserProperty.DisplayName))
            {
                diasbleControls.Add(this._txtFullName);
            }

            if (!setting.CanWrite(UserProperty.Description))
            {
                diasbleControls.Add(this._txtDesc);
            }

            if (!setting.CanWrite(UserProperty.Sex))
            {
                diasbleControls.Add(this._rdoSex);
            }

            if (!setting.CanWrite(UserProperty.Birthday))
            {
                diasbleControls.Add(this._txtBirthday);
            }

            if (!setting.CanWrite(UserProperty.HRID))
            {
                diasbleControls.Add(this._txtHRID);
            }

            if (!setting.CanWrite(UserProperty.DateHierd))
            {
                diasbleControls.Add(this._txtDateHired);
            }

            if (!setting.CanWrite(UserProperty.Office))
            {
                diasbleControls.Add(this._txtOffice);
            }

            if (!setting.CanWrite(UserProperty.CostCenter))
            {
                diasbleControls.Add(this._txtCostCenter);
            }

            if (!setting.CanWrite(UserProperty.OfficePhone))
            {
                diasbleControls.Add(this._txtPhone);
            }

            if (!setting.CanWrite(UserProperty.HomePhone))
            {
                diasbleControls.Add(this._txtHomePhone);
            }

            if (!setting.CanWrite(UserProperty.Mobile))
            {
                diasbleControls.Add(this._txtMobile);
            }

            if (!setting.CanWrite(UserProperty.EMail))
            {
                diasbleControls.Add(this._txtEMail);
            }

            if (!setting.CanWrite(UserProperty.WWWHomePage))
            {
                diasbleControls.Add(this._txtWebSite);
            }

            foreach (WebControl control in diasbleControls)
            {
                control.Attributes["disabled"] = "disabled";
                control.CssClass = "form-input form-input-disabled";
            }
        }

        base.OnPreRender(e);
    }