public string retJue(object obj) { string a = ""; if (tj.GetModelList("j_id=" + obj.ToString() + "").Count != 0) { a = tj.GetModel(Convert.ToInt64(obj)).j_name; } return(a); }
public void bind() { txtIdKard.Text = tmm.m_idcard; if (tj.GetModelList("j_id=" + tmm.m_jiao + "").Count != 0) { txtjuese.Text = tj.GetModel(Convert.ToInt64(tmm.m_jiao)).j_name; } if (tb.GetModelList("b_id=" + tmm.m_bum + "").Count != 0) { txtbumen.Text = tb.GetModel(Convert.ToInt64(tmm.m_bum)).b_name; } if (td.GetModelList("d_id=" + tmm.m_duty + "").Count != 0) { txtZhiwu.Text = td.GetModel(Convert.ToInt64(tmm.m_duty)).d_name; } if (tmm.m_xjb.ToString().Trim() != "") { List <Tunnel_xjbType> xjbList = xjbB.GetModelList(string.Format("id in ({0})", tmm.m_xjb.Replace("|", ","))); foreach (Tunnel.Model.Tunnel_xjbType item in xjbList) { txtXJB.Text += item.Typename + ","; } if (txtXJB.Text.Trim() != "") { txtXJB.Text = txtXJB.Text.Trim().Substring(0, txtXJB.Text.Trim().Length - 1); } } if (tmm.m_KSID.ToString().Trim() != "") { List <Tunnel_SelType> ksList = st.GetModelList(string.Format("KSID in ({0})", tmm.m_KSID)); string ks = ""; foreach (Tunnel_SelType item in ksList) { if (ks == item.KSID.ToString()) { continue; } else { lblKS.Text += item.TypeName + ","; ks = item.KSID.ToString(); } } } txtMail.Text = tmm.m_mail; txtName.Text = tmm.m_name; txtState.Text = tmm.m_state == 1 ? "锁定" : "开启"; txtTel.Text = tmm.m_mobile; txtUserName.Text = tmm.m_login; txtBirth.Text = tmm.m_birth.ToShortDateString() == "1800-1-1" ? "" : tmm.m_birth.ToShortDateString(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!string.IsNullOrEmpty(Request.QueryString["updid"])) { jid = Request.QueryString["updid"].ToString(); tjj = tj.GetModel(Convert.ToInt64(jid)); txtName.Text = tjj.j_name; txtfl.Text = tjj.j_flag; } else { Tunnel.Common.Message.Show("非法访问", "tunnel_jueseguanli.aspx"); } } }
/// <summary> /// 得到 类型ID 和 ID /// </summary> public void getIdtypeId(ref int tmpId, ref int typeId) { if (!string.IsNullOrEmpty(Request.QueryString["uid"])) { tmpId = Convert.ToInt32(Request.QueryString["uid"].ToString()); tempName = "用户管理"; Tunnel.BLL.Tunnel_menber menberBLL = new Tunnel.BLL.Tunnel_menber(); Tunnel.Model.Tunnel_menber menberModel = menberBLL.GetModel(tmpId); tempName_TypeName = menberModel.m_name; typeId = 1; if (!string.IsNullOrEmpty(Request.QueryString["uid"])) { GetUserAllPermission(int.Parse(Request.QueryString["uid"])); } } if (!string.IsNullOrEmpty(Request.QueryString["jid"])) { tmpId = Convert.ToInt32(Request.QueryString["jid"].ToString()); tempName = "角色管理"; Tunnel.BLL.Tunnel_jiaose jiaoseBLL = new Tunnel.BLL.Tunnel_jiaose(); Tunnel.Model.Tunnel_jiaose jiaoseModel = jiaoseBLL.GetModel(tmpId); tempName_TypeName = jiaoseModel.j_name; this.tmpSet.Visible = false; typeId = 2; } if (!string.IsNullOrEmpty(Request.QueryString["did"])) { tmpId = Convert.ToInt32(Request.QueryString["did"].ToString()); tempName = "职位管理"; Tunnel.BLL.Tunnel_duty dutyBLL = new Tunnel.BLL.Tunnel_duty(); Tunnel.Model.Tunnel_duty dutyModel = dutyBLL.GetModel(tmpId); tempName_TypeName = dutyModel.d_name; this.tmpSet.Visible = false; typeId = 3; } if (!string.IsNullOrEmpty(Request.QueryString["bid"])) { tmpId = Convert.ToInt32(Request.QueryString["bid"].ToString()); Tunnel.BLL.Tunnel_bum bumBLL = new Tunnel.BLL.Tunnel_bum(); Tunnel.Model.Tunnel_bum bumModels = bumBLL.GetModel(tmpId); tempName_TypeName = bumModels.b_name; tempName = "部门管理"; this.tmpSet.Visible = false; typeId = 4; } }
/// <summary> /// 用户角色名称 /// </summary> public string JiaoSe(int userId) { Tunnel.BLL.Tunnel_menber tm = new Tunnel_menber(); Tunnel.Model.Tunnel_menber tmm = new Tunnel.Model.Tunnel_menber(); tmm = tm.GetModel(Convert.ToInt64(userId.ToString())); string jiaose = "无角色"; if (userId == 1) { jiaose = "系统管理员"; } if (tmm.m_jiao != 0) { Tunnel_jiaose tj = new Tunnel_jiaose(); Tunnel.Model.Tunnel_jiaose tjj = new Tunnel.Model.Tunnel_jiaose(); tjj = tj.GetModel(Convert.ToInt64(tmm.m_jiao.ToString())); if (tjj != null) { jiaose = tjj.j_name; } } return(jiaose); }