/// <summary>读取数据</summary> public override void LoadData() { int id = ConvertHelper.Cint0(hidId.Text); if (id > 0) { //获取指定Id的管理员实体 var model = ManagerBll.GetInstence().GetModelForCache(x => x.Id == id); if (model == null) { return; } //给页面控件赋值 if (!string.IsNullOrEmpty(model.PhotoImg) && model.PhotoImg.Length > 4) { imgPhoto.ImageUrl = model.PhotoImg; } txtCName.Text = model.CName; txtEName.Text = model.EName; //编辑时,登陆账号不能进行修改操作 txtLoginName.Enabled = false; rblSex.SelectedValue = model.Sex; ddlBranch_Id.SelectedValue = model.Branch_Id + ""; //职位 hidPositionId.Text = model.Position_Id; txtPosition.Text = model.Position_Name; dpBirthday.Text = model.Birthday; rblIsEnable.SelectedValue = model.IsEnable + ""; rblIsMultiUser.SelectedValue = model.IsMultiUser + ""; txtNationalName.Text = model.NationalName; txtMobile.Text = model.Mobile; txtAddress.Text = model.Address; txtLoginName.Text = model.LoginName; txtNativePlace.Text = model.NativePlace; txtRecord.Text = model.Record; txtGraduateCollege.Text = model.GraduateCollege; txtGraduateSpecialty.Text = model.GraduateSpecialty; txtTel.Text = model.Tel; txtQq.Text = model.Qq; txtMsn.Text = model.Msn; txtEmail.Text = model.Email; txtContent.Text = model.Content; //绑定选择职位按键 ButtonSelectPosition.OnClientClick = SelectWindows.GetSaveStateReference(hidPositionId.ClientID) + SelectWindows.GetShowReference("../Systems/Powers/PositionSelect.aspx?Id=" + hidPositionId.Text + "&" + MenuInfoBll.GetInstence().PageUrlEncryptStringNoKey(hidPositionId.Text)); } else { //绑定选择职位按键 ButtonSelectPosition.OnClientClick = SelectWindows.GetSaveStateReference(hidPositionId.ClientID) + SelectWindows.GetShowReference("../Systems/Powers/PositionSelect.aspx?" + MenuInfoBll.GetInstence().PageUrlEncryptString()); } }
/// <summary> /// 关闭子窗口事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected virtual void SelectWindows_Close(object sender, WindowCloseEventArgs e) { //读取新选择的职位名称 txtPosition.Text = PositionBll.GetInstence().GetName(hidPositionId.Text); //绑定选择职位按键 ButtonSelectPosition.OnClientClick = SelectWindows.GetSaveStateReference(hidPositionId.ClientID) + SelectWindows.GetShowReference("../Systems/Powers/PositionSelect.aspx?Id=" + hidPositionId.Text + "&" + MenuInfoBll.GetInstence().PageUrlEncryptStringNoKey(hidPositionId.Text)); }