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


C# BLL.manager.Exists方法代码示例

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


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

示例1: 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

示例2: manager_validate

 private void manager_validate(HttpContext context)
 {
     string user_name = MXRequest.GetString("param");
     if (string.IsNullOrEmpty(user_name))
     {
         context.Response.Write("{ \"info\":\"请输入用户名\", \"status\":\"n\" }");
         return;
     }
     BLL.manager bll = new BLL.manager();
     if (bll.Exists(user_name))
     {
         context.Response.Write("{ \"info\":\"用户名已被占用,请更换!\", \"status\":\"n\" }");
         return;
     }
     context.Response.Write("{ \"info\":\"用户名可使用\", \"status\":\"y\" }");
     return;
 }
开发者ID:wujiang1984,项目名称:WechatBuilder,代码行数:17,代码来源:admin_ajax.ashx.cs

示例3: DoAdd

        private bool DoAdd()
        {
            //地区
            string prov = ddlProvince.SelectedItem.Value;
            string city = ddlCity.SelectedItem.Value;
            string dist = txtArea.Text.Trim();

            Model.manager model = new Model.manager();
            BLL.manager bll = new BLL.manager();
            model.role_id = int.Parse(ddlRoleId.SelectedValue);
            model.role_type = new BLL.manager_role().GetModel(model.role_id).role_type;
            if (cbIsLock.Checked == true)
            {
                model.is_lock = 0;
            }
            else
            {
                model.is_lock = 1;
            }
            //检测用户名是否重复
            if (bll.Exists(txtUserName.Text.Trim()))
            {
                return false;
            }
            model.user_name = txtUserName.Text.Trim();
            //获得6位的salt加密字符串
            model.salt = Utils.GetCheckCode(6);
            //以随机生成的6位字符串做为密钥加密
            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();
            model.add_time = DateTime.Now;
            model.wxNum = int.Parse(txtMaxNum.Text);
            model.agentId = GetAdminInfo().id;
            model.qq = txtqq.Text;
            model.email = txtEmail.Text;
            model.reg_ip = MXRequest.GetIP();
            model.province = prov;
            model.city = city;
            model.county = dist;
            model.sort_id=MyCommFun.Obj2Int(txtSortid.Text);

            if (bll.Add(model) > 0)
            {
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加用户:" + model.user_name); //记录日志
                return true;
            }
            return false;
        }
开发者ID:yi724926089,项目名称:MyWx,代码行数:50,代码来源:manager_edit.aspx.cs

示例4: DoAdd

        private bool DoAdd()
        {
            Model.manager adminEntity = GetAdminInfo(); //取得管理员信息

            Model.manager model = new Model.manager();
            BLL.manager bll = new BLL.manager();

            //固定为餐饮管理员的角色

            model.role_id = int.Parse(ddlRoleId.SelectedValue);
            model.role_type = new BLL.manager_role().GetModel(model.role_id).role_type;
            
            model.is_lock = MyCommFun.Str2Int(rblIsLock.SelectedValue);
            //检测用户名是否重复
            if (bll.Exists(txtUserName.Text.Trim()))
            {
                return false;
            }

            model.user_name = txtUserName.Text.Trim();
            //获得6位的salt加密字符串
            model.salt = Utils.GetCheckCode(6);
            //以随机生成的6位字符串做为密钥加密
            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();
            model.add_time = DateTime.Now;
            model.wxNum = 0;
            model.agentId = GetAdminInfo().id;
            model.qq = string.Empty;
            model.email = txtEmail.Text;
            model.reg_ip = MXRequest.GetIP();
            model.agentLevel = -1;
            model.remark = txtRemark.Text;
            model.agentId = adminEntity.id;
            int addId = bll.Add(model);

            if (addId > 0)
            {
                //添加商铺与管理人员的关联
                BLL.wx_hotel_user hotelUserBll = new BLL.wx_hotel_user();
                Model.wx_hotel_user hotelUser = new Model.wx_hotel_user();
                hotelUser.ManagerId = addId;
                hotelUser.HotelId = hotelid;
                hotelUser.AdminId = GetAdminInfo().id;
                int addhotelAdminId = hotelUserBll.Add(hotelUser);

                if (addhotelAdminId <= 0)
                {
                    bll.Delete(addId);
                    addId = 0;
                }

            }

            if (addId > 0)
            {
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加酒店管理员:" + model.user_name); //记录日志
                return true;
            }
            return false;
        }
开发者ID:jxiaox,项目名称:weixinpfnew,代码行数:63,代码来源:hotel_user_edit.aspx.cs

示例5: DoAdd

        private bool DoAdd()
        {
            //地区
            string prov = ddlProvince.SelectedItem.Value;
            string city = ddlCity.SelectedItem.Value;
            string dist = "";

            Model.manager model = new Model.manager();
            BLL.manager bll = new BLL.manager();
            model.role_id = 2;
            model.role_type = new BLL.manager_role().GetModel(model.role_id).role_type;
            model.is_lock = 0;

            //检测用户名是否重复
            if (bll.Exists(txtUserName.Text.Trim()))
            {
                return false;
            }
            model.user_name = txtUserName.Text.Trim();
            //获得6位的salt加密字符串
            model.salt = Utils.GetCheckCode(6);
            //以随机生成的6位字符串做为密钥加密
            model.password = DESEncrypt.Encrypt(txtPassword.Text.Trim(), model.salt);
            model.real_name = txtRealName.Text.Trim();
            model.telephone = txtTelephone.Text.Trim();
            model.email ="";
            model.add_time = DateTime.Now;
            model.wxNum = 3;
            model.agentId = 1;
            model.qq = txtqq.Text;
            model.email = "";
            model.reg_ip = MXRequest.GetIP();
            model.province = prov;
            model.city = city;
            model.county = dist;
            model.sort_id = 99;

            if (bll.Add(model) > 0)
            {
               // mp.AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "注册用户:" + model.user_name); //记录日志
                return true;
            }
            return false;
        }
开发者ID:yi724926089,项目名称:MyWx,代码行数:44,代码来源:reg.aspx.cs

示例6: DoAdd

        private bool DoAdd()
        {
            Model.manager model = new Model.manager();
            BLL.manager bll = new BLL.manager();
            model.role_id = int.Parse(ddlRoleId.SelectedValue);
            model.role_type = new BLL.manager_role().GetModel(model.role_id).role_type;
            if (cbIsLock.Checked == true)
            {
                model.is_lock = 0;
            }
            else
            {
                model.is_lock = 1;
            }
            //检测用户名是否重复
            if (bll.Exists(txtUserName.Text.Trim()))
            {
                return false;
            }
            model.user_name = txtUserName.Text.Trim();
            //获得6位的salt加密字符串
            model.salt = Utils.GetCheckCode(6);
            //以随机生成的6位字符串做为密钥加密
            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();
            model.add_time = DateTime.Now;

            if (bll.Add(model) > 0)
            {
                AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加管理员:" + model.user_name); //记录日志
                return true;
            }
            return false;
        }
开发者ID:wangjinfang,项目名称:DTCMS,代码行数:36,代码来源:manager_edit.aspx.cs


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