📄 selectmembers.ascx.cs
字号:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Collections.Generic;
namespace YXShop.Web.Admin.Control
{
public partial class SelectMembers : System.Web.UI.UserControl
{
private string _width;
private string _onchange;
private string _UName;
private int _UID = -1;
private string _UCode = string.Empty;
private string _title = "选择员工";
public int Depart = -1;
/// <summary>
/// 控件宽度
/// </summary>
public string width
{
get
{
return (_width == null) ? "" : _width;
}
set
{
_width = value;
}
}
public string onChange
{
get
{
return (_onchange == null) ? "" : _onchange;
}
set
{
_onchange = value;
}
}
/// <summary>
/// 用户名称
/// </summary>
public string UName
{
get
{
return (_UName == null) ? "" : _UName;
}
set
{
_UName = value;
}
}
/// <summary>
/// 用户编号
/// </summary>
public int UID
{
get
{
return _UID;
}
set
{
if (value != 0)
{
//YXShop.BLL.MemberInfo data = new YXShop.BLL.MemberInfo();
//List<YXShop.Model.MemberInfo> datam = data.GetListByColumn("UID",value);
YXShop.BLL.UserCommon ucBll = new YXShop.BLL.UserCommon();
List<YXShop.Model.UserCommon> ucList = ucBll.GetListByColumn("UID", value);
_UName = ucList[0].UserName;//datam[0].uUserName;
_UID = value;
_UCode = ucList[0].UID.ToString();// datam[0].uUserId.ToString();
}
else
{
_UID = 0;
_UCode = string.Empty;
}
}
}
public string UCODE
{
get
{
return _UCode;
}
set
{
if ((value != string.Empty) && (value != null) && (value != _UCode))
{
//YXShop.BLL.MemberInfo data = new YXShop.BLL.MemberInfo();
//List<YXShop.Model.MemberInfo> datam = data.GetListByColumn("UID", value);
YXShop.BLL.UserCommon ucBll = new YXShop.BLL.UserCommon();
List<YXShop.Model.UserCommon> ucList = ucBll.GetListByColumn("UID", value);
_UName = ucList[0].UserName;//datam[0].uUserName;
_UID = Convert.ToInt32(ucList[0].UID);
}
_UCode = value;
}
}
public string title
{
get
{
return (_title == null) ? "" : _title;
}
set
{
_title = value;
}
}
public bool ReadOnly
{
get
{
if (ViewState["ReadOnly"] == null)
{
return false;
}
else
{
return (bool)ViewState["ReadOnly"];
}
}
set
{
ViewState["ReadOnly"] = value;
}
}
override protected void OnInit(EventArgs e)
{
base.OnInit(e);
_UName = Request[ClientID + "Name"];
if ((Request[ClientID + "Code"] != null) && (Request[ClientID + "Code"] != string.Empty))
{
UCODE = Request[ClientID + "Code"];
}
else
{
UCODE = string.Empty;
}
if ((Request[ClientID + "Depart"] != null) && (Request[ClientID + "Depart"] != string.Empty))
{
Depart = int.Parse(Request[ClientID + "Depart"]);
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -