Пример #1
0
        private void LoadData()
        {
            string userCode = Request["UserCode"] + "";

            try
            {
                EntityData ds = SystemManageDAO.GetStandard_SystemUserByCode(userCode);
                if (ds.HasRecord())
                {
                    this.lblUserID.Text   = ds.GetString("UserID");
                    this.lblUserName.Text = ds.GetString("UserName");

                    this.lblShortName.Text = ds.GetString("ShortUserName");
                    this.lblEMail.Text     = RmsPM.BLL.PageHelpDisplay.ChangeMessageForDisplay(ds.GetString("MailBox"), "</br>", ';');
                    this.lblPhone.Text     = ds.GetString("Phone");
                    this.lblMobile.Text    = ds.GetString("Mobile");
                    this.lblAddress.Text   = ds.GetString("Address");
                    this.lblFax.Text       = ds.GetString("Fax");
                    this.lblBirthDay.Text  = ds.GetDateTimeOnlyDate("BirthDay");
                    this.lblPhoneHome.Text = ds.GetString("PhoneHome");
                    this.lblSortID.Text    = ds.GetString("SortID");

                    this.tdStationName.InnerHtml = BLL.SystemRule.GetUserStationNameHtml(userCode);


                    this.lblSex.Text = ds.GetString("Sex");
                    int status = ds.GetInt("Status");
                    if (status == 1)
                    {
                        this.lblU.Text = "禁用";
                    }
                    else
                    {
                        this.lblU.Text = "启用";
                    }
                }

                //显示财务编码
                this.lblSubjectSetDesc.Text = BLL.FinanceRule.GetFinanceSubjectSetDesc(ds.Tables["SystemUserSubjectSet"]);

                ds.Dispose();

//				RoleStrategyBuilder sb = new RoleStrategyBuilder();
//				sb.AddStrategy( new Strategy( RoleStrategyName.UserCode,userCode ));
//				string sql = sb.BuildMainQueryString();
//				QueryAgent qa = new QueryAgent();
//				EntityData entity = qa.FillEntityData("Role",sql);
//				this.dgList.DataSource = entity.CurrentTable;
//				this.dgList.DataBind();
//				entity.Dispose();
//				qa.Dispose();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "显示出错"));
            }
        }
Пример #2
0
        private void LoadData()
        {
            string userCode = Request["UserCode"] + "";

            try
            {
                EntityData ds = SystemManageDAO.GetStandard_SystemUserByCode(userCode);
                if (ds.HasRecord())
                {
                    UserID.Text             = ds.GetString("UserID");
                    UserName.Text           = ds.GetString("UserName");
                    this.txtOldUserID.Value = UserID.Text;

                    MailBox.Text = ds.GetString("MailBox");
                    Phone.Text   = ds.GetString("Phone");
                    Mobile.Text  = ds.GetString("Mobile");
                    Address.Text = ds.GetString("Address");
                    Fax.Text     = ds.GetString("Fax");


                    //					this.trPassword.Visible = false;

                    this.txtSortID.Text    = ds.GetString("SortID");
                    this.txtPhoneHome.Text = ds.GetString("PhoneHome");
                    this.txtShortName.Text = ds.GetString("ShortUserName");

                    Birthday.Value = ds.GetDateTimeOnlyDate("BirthDay");

                    if (ds.GetString("Sex") != "")
                    {
                        if (ds.GetString("Sex").ToString() == "男")
                        {
                            male.Checked = true;
                        }
                        else
                        {
                            female.Checked = true;
                        }
                    }

                    int status = ds.GetInt("Status");
                    this.rdoStatus0.Checked = (status != 1);
                    this.rdoStatus1.Checked = (status == 1);

                    string ud_sAttachMentCode = BLL.WBSRule.GetAttachMentCodeByUserCode(this.txtUserCode.Value);

                    if (ud_sAttachMentCode != "")
                    {
                        this.imgSign.Visible       = true;
                        this.btnDeleteSign.Visible = true;
                        this.imgSign.ImageUrl      = "../Project/WBSAttachMentView.aspx?Action=View&AttachMent=0&AttachMentCode=" + ud_sAttachMentCode;
                    }
                    else
                    {
                        this.imgSign.Visible       = false;
                        this.btnDeleteSign.Visible = false;
                    }
                }
                else
                {
                    this.rdoStatus0.Checked = true;
                    this.male.Checked       = true;
                }

                //显示财务编码
                this.ucInputSubjectSet.LoadData(ds.Tables["SystemUserSubjectSet"]);

                ds.Dispose();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "加载页面错误。"));
            }
        }