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


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

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


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

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

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

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

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

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

示例7: ShowInfo

 private void ShowInfo(int _id)
 {
     BLL.manager bll = new BLL.manager();
     Model.manager model = bll.GetModel(_id);
     ddlRoleId.SelectedValue = model.role_id.ToString();
     rblIsLock.SelectedValue = model.is_lock.ToString();
     txtUserName.Text = model.user_name;
     txtUserName.ReadOnly = true;
     if (!string.IsNullOrEmpty(model.user_pwd))
     {
         txtUserPwd.Attributes["value"] = txtUserPwd1.Attributes["value"] = defaultpassword;
     }
     txtRealName.Text = model.real_name;
     txtTelephone.Text = model.telephone;
     txtEmail.Text = model.email;
 }
开发者ID:sichina,项目名称:or-dtcms2.0,代码行数:16,代码来源:manager_edit.aspx.cs

示例8: ShowInfo

        private void ShowInfo(int id)
        {
            litpwdtip.Text = "不填则不修改密码";
            BLL.manager bll = new BLL.manager();

            Model.manager model = bll.GetModel(id);

            rblIsLock.SelectedValue = model.is_lock.ToString();

            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;
            txtRemark.Text = model.remark;
        }
开发者ID:jxiaox,项目名称:weixinpfnew,代码行数:18,代码来源:hotel_admin_edit.aspx.cs

示例9: ShowInfo

        private void ShowInfo(int _id)
        {
            lblid.Text = _id.ToString();
            BLL.manager bll = new BLL.manager();
            Model.manager model = bll.GetModel(_id);

            lblUserName.Text = model.user_name;


            txtRealName.Text = model.real_name;
            txtTelephone.Text = model.telephone;
            txtEmail.Text = model.email;
            txtqq.Text = model.qq;
            ddlProvince.SelectedValue = model.province;
            ddlCity.SelectedValue = model.city;
            txtArea.Text = model.county;
           

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

示例10: ShowInfo

 private void ShowInfo(int _id)
 {
     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");
     if (!string.IsNullOrEmpty(model.password))
     {
         txtPassword.Attributes["value"] = txtPassword1.Attributes["value"] = defaultpassword;
     }
     txtRealName.Text = model.real_name;
     txtTelephone.Text = model.telephone;
     txtEmail.Text = model.email;
 }
开发者ID:silverdan,项目名称:ahxrmyy2.0,代码行数:24,代码来源:manager_edit.aspx.cs

示例11: btnSubmit_Click

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

            if (userName.Equals("") || userPwd.Equals(""))
            {
                lblTip.Visible = true;
                lblTip.Text = "请输入用户名或密码";
                return;
            }
            if (code.Equals(""))
            {
                lblTip.Visible = true;
                lblTip.Text = "请输入验证码";
                return;
            }
            if (Session[DTKeys.SESSION_CODE] == null)
            {
                lblTip.Visible = true;
                lblTip.Text = "系统找不到验证码";
                return;
            }
            if (code.ToLower() != Session[DTKeys.SESSION_CODE].ToString().ToLower())
            {
                lblTip.Visible = true;
                lblTip.Text = "验证码输入不正确";
                return;
            }
            BLL.manager bll = new BLL.manager();
            Model.manager model = bll.GetModel(userName, DESEncrypt.Encrypt(userPwd));
            if (model == null)
            {
                lblTip.Visible = true;
                lblTip.Text = "用户名或密码有误";
                return;
            }
            Session[DTKeys.SESSION_ADMIN_INFO] = model;
            Session.Timeout = 45;
            //写入登录日志
            Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig(Utils.GetXmlMapPath(DTKeys.FILE_SITE_XML_CONFING));
            if (siteConfig.logstatus > 0)
            {
                Model.manager_log modelLog = new Model.manager_log();
                modelLog.user_id = model.id;
                modelLog.user_name = model.user_name;
                modelLog.action_type = "login";
                modelLog.note = "用户登录";
                modelLog.login_ip = DTRequest.GetIP();
                modelLog.login_time = DateTime.Now;
                new BLL.manager_log().Add(modelLog);
            }
            //写入Cookies
            if (cbRememberId.Checked)
            {
                Utils.WriteCookie("DTRememberName", model.user_name, 14400);
            }
            else
            {
                Utils.WriteCookie("DTRememberName", model.user_name, -14400);
            }
            Utils.WriteCookie("AdminName", "DTcms", model.user_name);
            Utils.WriteCookie("AdminPwd", "DTcms", model.user_pwd);
            Response.Redirect("index.aspx");
            return;
        }
开发者ID:qljiong,项目名称:LearnDTCMS,代码行数:67,代码来源:login.aspx.cs

示例12: DoEdit

        private bool DoEdit(int _id)
        {
            //地区
            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.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 (txtPassword.Text.Trim() != "")
            {
                //获取用户已生成的salt作为密钥加密
                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.wxNum = int.Parse(txtMaxNum.Text);

            model.qq = txtqq.Text;
            model.email = txtEmail.Text;

            model.province = prov;
            model.city = city;
            model.county = dist;
            model.sort_id = MyCommFun.Str2Int(txtSortid.Text);

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

            return result;
        }
开发者ID:yi724926089,项目名称:MyWx,代码行数:48,代码来源:manager_edit.aspx.cs

示例13: PublishGroup

        public void PublishGroup(string jsondata, string version, string equType, string equName)
        {
            string json_result = string.Empty;
            //解析jsondata
            if (string.IsNullOrEmpty(jsondata))
            {
                json_result = "{\"status\":\"false\",\"data\":\"参数不能为空!\"}";
                Context.Response.Write(json_result);
                HttpContext.Current.ApplicationInstance.CompleteRequest();
                return;
            }
            try
            {
                JavaScriptSerializer serializer = new JavaScriptSerializer();
                Dictionary<string, object> json = (Dictionary<string, object>)serializer.DeserializeObject(jsondata);

                Model.tourgroup model = new Model.tourgroup();
                BLL.tourgroup bll = new BLL.tourgroup();
                int manager_id = 0;
                int.TryParse(json["groupteamid"].ToString(), out manager_id);

                //验证旅行社的有效性
                BLL.manager bll_manager = new BLL.manager();
                Model.manager managerModel = bll_manager.GetModel(manager_id);
                if (managerModel == null || managerModel.is_lock != 0 || DateTime.Parse(managerModel.end_date) < DateTime.Now)
                {
                    json_result = "{\"status\":\"false\",\"data\":\"此旅行社现不能发团,请联系管理员!\"}";
                    Context.Response.Write(json_result);
                    HttpContext.Current.ApplicationInstance.CompleteRequest();
                    return;
                }

                model.manager_id = manager_id;
                model.channel_id = (int)DTEnums.ChannelEnum.lvtuan;
                model.title = json["title"].ToString();
                model.category_id = int.Parse(json["category"].ToString());
                model.content = "";
                model.book_require = json["bookrequire"].ToString();

                #region 类别处理
                //处理类别,根据名称与标识转为类别ID
                int languagetype = 0;
                int accounttype = 0;
                int linecity = 0;
                int property = 0;
                int restauranttype = 0;
                int tickettype = 0;
                int fromplaceid = 0;
                int toplaceid = 0;

                //将省级名称转为ID
                if (json.ContainsKey("fromplace") && !string.IsNullOrEmpty(json["fromplace"].ToString()))
                {
                    fromplaceid = bll_city.GetParentIdByName(json["fromplace"].ToString(), 1);
                    if (fromplaceid == 0)
                    {
                        json_result = "{\"status\":\"false\",\"data\":\"客源地不存在,请重新选择!\"}";
                        Context.Response.Write(json_result);
                        HttpContext.Current.ApplicationInstance.CompleteRequest();
                        return;
                    }
                }
                if (json.ContainsKey("toplace") && !string.IsNullOrEmpty(json["toplace"].ToString()))
                {
                    toplaceid = bll_city.GetParentIdByName(json["toplace"].ToString(), 1);
                    if (toplaceid == 0)
                    {
                        json_result = "{\"status\":\"false\",\"data\":\"目的地不存在,请重新选择!\"}";
                        Context.Response.Write(json_result);
                        HttpContext.Current.ApplicationInstance.CompleteRequest();
                        return;
                    }
                }

                if (json.ContainsKey("languagetype") && !string.IsNullOrEmpty(json["languagetype"].ToString()))
                {
                    languagetype = bll_category.GetCategoryIdByName(json["languagetype"].ToString(), DTEnums.CategoryEnum.language.ToString());
                    if (languagetype == 0)
                    {
                        json_result = "{\"status\":\"false\",\"data\":\"语种类型不存在,请重新选择!\"}";
                        Context.Response.Write(json_result);
                        HttpContext.Current.ApplicationInstance.CompleteRequest();
                        return;
                    }
                }
                if (json.ContainsKey("accounttype") && !string.IsNullOrEmpty(json["accounttype"].ToString()))
                {
                    accounttype = bll_category.GetCategoryIdByName(json["accounttype"].ToString(), DTEnums.CategoryEnum.period.ToString());
                    if (accounttype == 0)
                    {
                        json_result = "{\"status\":\"false\",\"data\":\"账单周期不存在,请重新选择!\"}";
                        Context.Response.Write(json_result);
                        HttpContext.Current.ApplicationInstance.CompleteRequest();
                        return;
                    }
                }
                if (json.ContainsKey("linecity") && !string.IsNullOrEmpty(json["linecity"].ToString()))
                {
                    linecity = bll_category.GetCategoryIdByName(json["linecity"].ToString(), DTEnums.CategoryEnum.world.ToString());
                    if (linecity == 0)
//.........这里部分代码省略.........
开发者ID:codefighting,项目名称:shouxinzhihui,代码行数:101,代码来源:JsonService.asmx.cs

示例14: DoEdit

        private bool DoEdit(int _id)
        {
            bool result = true;
            BLL.manager bll = new BLL.manager();
            Model.manager model = bll.GetModel(_id);

            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);
            //判断密码是否更改
            if (txtUserPwd.Text.Trim() != defaultpassword)
            {
                model.user_pwd = DESEncrypt.Encrypt(txtUserPwd.Text.Trim());
            }
            model.real_name = txtRealName.Text.Trim();
            model.telephone = txtTelephone.Text.Trim();
            model.email = txtEmail.Text.Trim();

            if (!bll.Update(model))
            {
                result = false;
            }

            return result;
        }
开发者ID:egojit,项目名称:B2C,代码行数:25,代码来源:manager_edit.aspx.cs

示例15: DoEdit

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

            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 (txtPassword.Text.Trim() != defaultpassword)
            {
                //获取用户已生成的salt作为密钥加密
                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))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改管理员:" + model.user_name); //记录日志
                result = true;
            }

            return result;
        }
开发者ID:wangjinfang,项目名称:DTCMS,代码行数:34,代码来源:manager_edit.aspx.cs


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