本文整理汇总了C#中BLL.users.GetList方法的典型用法代码示例。如果您正苦于以下问题:C# BLL.users.GetList方法的具体用法?C# BLL.users.GetList怎么用?C# BLL.users.GetList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BLL.users
的用法示例。
在下文中一共展示了BLL.users.GetList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RptBind
private void RptBind(string _strWhere, string _orderby)
{
this.page = DTRequest.GetQueryInt("page", 1);
this.txtKeywords.Text = this.keywords;
BLL.users bll = new BLL.users();
this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
this.rptList.DataBind();
//绑定页码
txtPageNum.Text = this.pageSize.ToString();
string pageUrl = Utils.CombUrlTxt("user_audit.aspx", "keywords={0}&page={1}",
this.keywords, "__id__");
PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
}
示例2: btnLogin_Click
protected void btnLogin_Click(object sender, EventArgs e)
{
BLL.users userService = new BLL.users();
string userName = txtUserName.Text.Trim();
string password = Maticsoft.Common.DEncrypt.DESEncrypt.Encrypt(txtPassword.Text.Trim(), ConfigHelper.GetConfigString("PassWordEncrypt"));
//string password = txtPassword.Text.Trim();
DataTable userList = userService.GetList("userName='" + userName + "' and password='" + password + "' and roleId in (4,10,11)").Tables[0];
if (userList.Rows.Count > 0)
{
if (userList.Rows[0]["status"].ToString() == "0")
{
MessageBox.Show(this, "此用户名已被冻结,无法登陆!");
return;
}
//写入Cookie
try
{
Common.Cookie.SetObject(StatusHelpercs.Cookie_Admin_UserId, 2, userList.Rows[0]["userId"].ToString());
Common.Cookie.SetObject(StatusHelpercs.Cookie_Admin_UserName, 2, txtUserName.Text.Trim());
Common.Cookie.SetObject(StatusHelpercs.Cookie_Admin_TrueName, 2, DESEncrypt.Encrypt(userList.Rows[0]["trueName"].ToString()));
Common.Cookie.SetObject(StatusHelpercs.Cookie_Admin_RoleId, 2, userList.Rows[0]["roleId"].ToString());
Common.Cookie.SetObject(StatusHelpercs.Cookie_Admin_RoleName, 2, DESEncrypt.Encrypt(userList.Rows[0]["roleName"].ToString()));
Common.Cookie.SetObject(StatusHelpercs.Cookie_Admin_DeptId, 2, userList.Rows[0]["deptId"].ToString());
Common.Cookie.SetObject(StatusHelpercs.Cookie_Admin_IsAdmin, 2, userList.Rows[0]["isAdmin"].ToString());
Common.Cookie.SetObject(StatusHelpercs.Cookie_Admin_Avatar, 2, userList.Rows[0]["avatar_small"].ToString());
Common.Cookie.SetObject(StatusHelpercs.Cookie_Admin_LastLoginTime, 2, DateTime.Parse(userList.Rows[0]["lastLoginTime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss"));
}
catch
{
//Session["userName"] = txtUserName.Text.Trim();
//Session["userType"] = ddrUserTyp.SelectedValue;
//Session["orgId"] = userList.Rows[0]["orgId"].ToString();
}
//更新最后登陆时间
Model.users userModel = userService.GetModel(int.Parse(userList.Rows[0]["userId"].ToString()));
userModel.lastLoginTime = DateTime.Now;
userService.Update(userModel);
Response.Redirect("index.aspx");
//MessageBox.ShowAndRedirect(this, "登录成功!", "index.html");
}
else
{
MessageBox.Show(this, "用户名或密码错误!");
}
}
示例3: RptBind
private void RptBind(string _strWhere, string _orderby)
{
this.page = MXRequest.GetQueryInt("page", 1);
if (this.group_id > 0)
{
this.ddlGroupId.SelectedValue = this.group_id.ToString();
}
this.txtKeywords.Text = this.keywords;
BLL.users bll = new BLL.users();
this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
this.rptList.DataBind();
//绑定页码
txtPageNum.Text = this.pageSize.ToString();
string pageUrl = Utils.CombUrlTxt("user_list.aspx", "group_id={0}&keywords={1}&page={2}",
this.group_id.ToString(), this.keywords, "__id__");
PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
}