當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。