当前位置: 首页>>代码示例>>C#>>正文


C# BLL.manager类代码示例

本文整理汇总了C#中BLL.manager的典型用法代码示例。如果您正苦于以下问题:C# BLL.manager类的具体用法?C# BLL.manager怎么用?C# BLL.manager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BLL.manager类属于命名空间,在下文中一共展示了BLL.manager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnSubmit_Click

        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            BLL.manager bll = new BLL.manager();
            Model.manager model = GetAdminInfo();

            if (DESEncrypt.Encrypt(txtOldPwd.Text.Trim()) != model.user_pwd)
            {
                JscriptMsg("旧密码不正确!", "", "Warning");
                return;
            }
            if (txtUserPwd.Text.Trim() != txtUserPwd1.Text.Trim())
            {
                JscriptMsg("两次密码不一致!", "", "Warning");
                return;
            }
            model.user_pwd = DESEncrypt.Encrypt(txtUserPwd.Text.Trim());

            if (!bll.Update(model))
            {
                JscriptMsg("保存过程中发生错误啦!", "", "Error");
                return;
            }
            Session[DTKeys.SESSION_ADMIN_INFO] = null;
            JscriptMsg("密码修改成功啦!", "modifypassword.aspx", "Success");
        }
开发者ID:codefighting,项目名称:shouxinzhihui,代码行数:26,代码来源:modifypassword.aspx.cs

示例2: DoEdit

        private bool DoEdit()
        {
            int _id = MyCommFun.Str2Int(lblid.Text);
            //地区
            string prov = ddlProvince.SelectedItem.Value;
            string city = ddlCity.SelectedItem.Value;
            string dist = txtArea.Text.Trim();


            bool result = false;
            BLL.manager bll = new BLL.manager();
            Model.manager model = bll.GetModel(_id);


            model.real_name = txtRealName.Text.Trim();
            model.telephone = txtTelephone.Text.Trim();
            model.email = txtEmail.Text.Trim();
            model.qq = txtqq.Text;
            model.email = txtEmail.Text;

            model.province = prov;
            model.city = city;
            model.county = dist;


            if (bll.Update(model))
            {
                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改个人资料:" + model.user_name); //记录日志
                result = true;
            }

            return result;
        }
开发者ID:wujiang1984,项目名称:WechatBuilder,代码行数:33,代码来源:editormyinfo.aspx.cs

示例3: IsAdminLogin

 /// <summary>
 /// 判断管理员是否已经登录(解决Session超时问题)
 /// </summary>
 public bool IsAdminLogin()
 {
     //如果Session为Null
     if (Session[DTKeys.SESSION_ADMIN_INFO] != null)
     {
         return true;
     }
     else
     {
         //检查Cookies
         string adminname = Utils.GetCookie("AdminName", "DTcms");
         string adminpwd = Utils.GetCookie("AdminPwd", "DTcms");
         if (adminname != "" && adminpwd != "")
         {
             BLL.manager bll = new BLL.manager();
             Model.manager model = bll.GetModel(adminname, adminpwd);
             if (model != null)
             {
                 Session[DTKeys.SESSION_ADMIN_INFO] = model;
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:silverdan,项目名称:ahxrmyy2.0,代码行数:28,代码来源:ManagePage.cs

示例4: RptBind

        /// <summary>
        /// 绑定列表
        /// </summary>
        private void RptBind()
        {
            BLL.wx_hotel_user dcBll = new BLL.wx_hotel_user();
            List<Model.wx_hotel_user> hotelAdmins = dcBll.GetModelList("hotelId=" + hotelid);

            BLL.manager managerBll = new BLL.manager();
            DataSet dsData = new DataSet();
            if (hotelAdmins.Any())
            {
                string strWhere = string.Empty;
                for (int index = 0; index <= hotelAdmins.Count - 1; index++)
                {
                    strWhere += "," + hotelAdmins[index].ManagerId;
                }

                strWhere = "(" + strWhere.Substring(1) + ")";

                dsData = managerBll.GetList(0, "id in " + strWhere, string.Empty);
                rptList.DataSource = dsData;
            }
            else
            {
                rptList.DataSource = new List<Model.manager>();
            }

            rptList.DataBind();
        }
开发者ID:jxiaox,项目名称:weixinpfnew,代码行数:30,代码来源:hotel_user_list.aspx.cs

示例5: btnSubmit_Click

        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            BLL.manager bll = new BLL.manager();
            Model.manager model = GetAdminInfo();

            if (DESEncrypt.Encrypt(txtOldPassword.Text.Trim(), model.salt) != model.password)
            {
                JscriptMsg("旧密码不正确!", "", "Warning");
                return;
            }
            if (txtPassword.Text.Trim() != txtPassword1.Text.Trim())
            {
                JscriptMsg("两次密码不一致!", "", "Warning");
                return;
            }
            model.password = DESEncrypt.Encrypt(txtPassword.Text.Trim(), model.salt);
            model.real_name = txtRealName.Text.Trim();
            model.telephone = txtTelephone.Text.Trim();
            model.email = txtEmail.Text.Trim();

            if (!bll.Update(model))
            {
                JscriptMsg("保存过程中发生错误!", "", "Error");
                return;
            }
            Session[DTKeys.SESSION_ADMIN_INFO] = null;
            JscriptMsg("密码修改成功!", "manager_pwd.aspx", "Success");
        }
开发者ID:LutherW,项目名称:MTMS,代码行数:29,代码来源:manager_pwd.aspx.cs

示例6: ShowInfo

 private void ShowInfo(int _id)
 {
     BLL.manager bll = new BLL.manager();
     Model.manager model = bll.GetModel(_id);
    lblUserName.Text = model.user_name;
     
 }
开发者ID:wujiang1984,项目名称:WechatBuilder,代码行数:7,代码来源:manager_pwd.aspx.cs

示例7: ShowInfo

        private void ShowInfo(int _id)
        {
            litpwdtip.Text = "不填则不修改密码";
            BLL.manager bll = new BLL.manager();
            Model.manager model = bll.GetModel(_id);
            ddlRoleId.SelectedValue = model.role_id.ToString();
            if (model.is_lock == 0)
            {
                cbIsLock.Checked = true;
            }
            else
            {
                cbIsLock.Checked = false;
            }
            txtUserName.Text = model.user_name;
            txtUserName.ReadOnly = true;
            txtUserName.Attributes.Remove("ajaxurl");
           
            txtRealName.Text = model.real_name;
            txtTelephone.Text = model.telephone;
            txtEmail.Text = model.email;
            txtMaxNum.Text = model.wxNum.ToString();
            ddlProvince.SelectedValue = model.province;
            ddlCity.SelectedValue = model.city;
            txtArea.Text = model.county;
            txtqq.Text = model.qq;
            txtEmail.Text = model.email;
            txtSortid.Text = MyCommFun.ObjToStr(model.sort_id);  // model.sort_id;
          

          }
开发者ID:wujiang1984,项目名称:WechatBuilder,代码行数:31,代码来源:manager_edit.aspx.cs

示例8: btnDelete_Click

 //批量删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("manager_list", DTEnums.ActionEnum.Delete.ToString()); //检查权限
     int sucCount = 0;
     int errorCount = 0;
     BLL.manager bll = new BLL.manager();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             if (bll.Delete(id))
             {
                 sucCount += 1;
             }
             else
             {
                 errorCount += 1;
             }
         }
     }
     AddAdminLog(DTEnums.ActionEnum.Delete.ToString(), "删除管理员" + sucCount + "条,失败" + errorCount + "条"); //记录日志
     JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!", Utils.CombUrlTxt("manager_list.aspx", "keywords={0}", this.keywords));
 }
开发者ID:sfwjiao,项目名称:MyTestProject,代码行数:26,代码来源:manager_list.aspx.cs

示例9: DoAdd

 private bool DoAdd()
 {
     bool result = true;
     Model.manager model = new Model.manager();
     BLL.manager bll = new BLL.manager();
     if (bll.Exists(txtUserName.Text.Trim()))
     {
         JscriptMsg("该登录名已存在!", "", "Error");
         return false;
     }
     model.role_id = int.Parse(ddlRoleId.SelectedValue);
     model.role_type = new BLL.manager_role().GetModel(model.role_id).role_type;
     model.is_lock = int.Parse(rblIsLock.SelectedValue);
     model.user_name = txtUserName.Text.Trim();
     model.user_pwd = DESEncrypt.Encrypt(txtUserPwd.Text.Trim());
     model.real_name = txtRealName.Text.Trim();
     model.telephone = txtTelephone.Text.Trim();
     model.email = txtEmail.Text.Trim();
     model.add_time = DateTime.Now;
     model.start_date = txtStartDate.Text.Trim();
     model.end_date = txtEndDate.Text.Trim();
     if (bll.Add(model) < 1)
     {
         result = false;
     }
     return result;
 }
开发者ID:codefighting,项目名称:shouxinzhihui,代码行数:27,代码来源:manager_edit.aspx.cs

示例10: ShowInfo

 private void ShowInfo(int _id)
 {
     BLL.manager bll = new BLL.manager();
     Model.manager model = bll.GetModel(_id);
     txtUserName.Text = model.user_name;
     txtRealName.Text = model.real_name;
     txtTelephone.Text = model.telephone;
     txtEmail.Text = model.email;
 }
开发者ID:LutherW,项目名称:MTMS,代码行数:9,代码来源:manager_pwd.aspx.cs

示例11: RptBind

 private void RptBind(string _strWhere, string _orderby)
 {
     this.page = DTRequest.GetQueryInt("page", 1);
     this.txtKeywords.Text = this.keywords;
     BLL.manager bll = new BLL.manager();
     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("manager_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__");
     PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
 }
开发者ID:sichina,项目名称:or-dtcms2.0,代码行数:12,代码来源:manager_list.aspx.cs

示例12: GetManagerInfo

 /// <summary>
 /// 取得旅行社信息
 /// </summary>
 public Model.manager GetManagerInfo()
 {
     if (IsManageLogin())
     {
         Model.manager model = HttpContext.Current.Session[DTKeys.SESSION_ADMIN_INFO] as Model.manager;
         if (model != null)
         {
             //为了能查询到最新的用户信息,必须查询最新的用户资料
             model = new BLL.manager().GetModel(model.id);
             return model;
         }
     }
     return null;
 }
开发者ID:codefighting,项目名称:shouxinzhihui,代码行数:17,代码来源:BasePage.cs

示例13: btnDelete_Click

 //批量删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("sys_manager", DTEnums.ActionEnum.Delete.ToString()); //检查权限
     BLL.manager bll = new BLL.manager();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked && GetAdminInfo().id != id)
         {
             bll.Delete(id);
         }
     }
     JscriptMsg("批量删除成功啦!", Utils.CombUrlTxt("manager_list.aspx", "keywords={0}", this.keywords), "Success");
 }
开发者ID:codefighting,项目名称:shouxinzhihui,代码行数:16,代码来源:manager_list.aspx.cs

示例14: btnSubmit_Click

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string userName = txtUserName.Text.Trim();
            string userPwd = txtPassword.Text.Trim();

            if (userName.Equals("") || userPwd.Equals(""))
            {
                msgtip.InnerHtml = "请输入用户名或密码";
                return;
            }
            if (Session["AdminLoginSun"] == null)
            {
                Session["AdminLoginSun"] = 1;
            }
            else
            {
                Session["AdminLoginSun"] = Convert.ToInt32(Session["AdminLoginSun"]) + 1;
            }
            //判断登录错误次数
            if (Session["AdminLoginSun"] != null && Convert.ToInt32(Session["AdminLoginSun"]) > 5)
            {
                msgtip.InnerHtml = "错误超过5次,关闭浏览器重新登录!";
                return;
            }
            BLL.manager bll = new BLL.manager();

            Model.manager model = bll.GetModel(userName, userPwd, true);
            if (model == null)
            {
                msgtip.InnerHtml = "用户名或密码有误,请重试!";
                return;
            }
            // 保存当前的后台管理员
            Session[MXKeys.SESSION_ADMIN_INFO] = model;
            Session.Timeout = 45;
            //写入登录日志
            Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig();
            if (siteConfig.logstatus > 0)
            {
                new BLL.manager_log().Add(model.id, model.user_name, MXEnums.ActionEnum.Login.ToString(), "用户登录");
            }
            //写入Cookies
            Utils.WriteCookie("DTRememberName", model.user_name, 14400);
            Utils.WriteCookie("AdminName", "MxWeiXinPF", model.user_name);
            Utils.WriteCookie("AdminPwd", "MxWeiXinPF", model.password);
            Response.Redirect("wxIndex.aspx");
            return;
        }
开发者ID:xiangyan99,项目名称:Weixin,代码行数:48,代码来源:login.aspx.cs

示例15: CheckDateValid_Manager

 public void CheckDateValid_Manager()
 {
     try
     {
         BLL.manager bll_manager = new BLL.manager();
         int result = bll_manager.CheckDateValid_Manager();
         Utils.WriteFileText("账户检查成功,过期条数:" + result + ",检查时间:" + DateTime.Now.ToString(), "Log/manager.txt");
         HttpContext.Current.ApplicationInstance.CompleteRequest();
     }
     catch (Exception ex)
     {
         Utils.WriteFileText("账户检查失败,失败信息:" + ex.Message, "Log/manager.txt");
         HttpContext.Current.ApplicationInstance.CompleteRequest();
         //return;
     }
 }
开发者ID:codefighting,项目名称:shouxinzhihui,代码行数:16,代码来源:TOURISM.asmx.cs


注:本文中的BLL.manager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。